/* EMI Calculator Styles */
.ec-container {
    max-width: 1000px;
    margin: 20px auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.ec-header {
    background: linear-gradient(135deg, #0061ff, #60efff);
    color: white;
    padding: 20px;
    text-align: center;
}

.ec-header h1 {
    font-size: 28px;
    margin-bottom: 5px;
}

.ec-header p {
    font-size: 16px;
    opacity: 0.9;
}

.ec-input-section {
    margin-bottom: 20px;
    padding: 0 20px;
}

.ec-input-group {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
}

.ec-input-group h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
}

.ec-inputs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.ec-input {
    display: flex;
    flex-direction: column;
}

.ec-input label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #495057;
    font-size: 14px;
}

.ec-input input[type="number"] {
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.ec-input input[type="number"]:focus {
    outline: none;
    border-color: #0061ff;
    box-shadow: 0 0 0 3px rgba(0, 97, 255, 0.1);
}

.ec-range-container {
    width: 100%;
    padding: 0 5px;
}

.ec-range {
    width: 100%;
    height: 5px;
    -webkit-appearance: none;
    background: #ddd;
    border-radius: 5px;
    outline: none;
}

.ec-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #0061ff;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ec-range::-webkit-slider-thumb:hover {
    background: #004ecc;
    transform: scale(1.1);
}

.ec-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #0061ff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.ec-range::-moz-range-thumb:hover {
    background: #004ecc;
    transform: scale(1.1);
}

.ec-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
    padding: 0 20px;
}

.ec-btn {
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ec-btn-primary {
    background: linear-gradient(135deg, #0061ff, #60efff);
    color: white;
}

.ec-btn-secondary {
    background: #e9ecef;
    color: #495057;
}

.ec-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.ec-results {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 0 20px 20px;
}

.ec-results h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 22px;
}

.ec-result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.ec-result-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.ec-result-card h3 {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
}

.ec-result-value {
    font-size: 24px;
    font-weight: 700;
    color: #0061ff;
    margin-bottom: 5px;
}

.ec-result-unit {
    font-size: 14px;
    color: #888;
}

.ec-detailed-results {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.ec-detailed-results h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.ec-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.ec-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
}

.ec-detail-item:last-child {
    border-bottom: none;
}

.ec-detail-label {
    color: #666;
    font-weight: 500;
}

.ec-detail-value {
    font-weight: 600;
    color: #0061ff;
}

.ec-pie-chart {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.ec-pie-chart h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.ec-chart-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.ec-chart-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ec-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ec-legend-color {
    width: 15px;
    height: 15px;
    border-radius: 3px;
}

.ec-legend-text {
    font-size: 14px;
    color: #333;
}

.ec-amortization {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 0 20px 20px;
}

.ec-amortization h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 22px;
}

.ec-amortization-table-container {
    overflow-x: auto;
}

.ec-amortization-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.ec-amortization-table th {
    background: #0061ff;
    color: white;
    padding: 12px 15px;
    text-align: left;
}

.ec-amortization-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.ec-amortization-table tr:last-child td {
    border-bottom: none;
}

.ec-amortization-table tr:nth-child(even) {
    background: #f9f9f9;
}

.ec-amortization-table tr:hover {
    background: #f0f7ff;
}

.ec-no-data {
    text-align: center;
    color: #888;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ec-result-grid {
        grid-template-columns: 1fr;
    }
    
    .ec-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .ec-buttons {
        grid-template-columns: 1fr;
    }
    
    .ec-chart-container {
        flex-direction: column;
    }
}