/* Base Styles */
.emi-calculator-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 25px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.3s ease;
}

.emi-calculator-header {
    text-align: center;
    margin-bottom: 25px;
}

.emi-calculator-header h2 {
    color: #2c3e50;
    margin: 0 0 5px 0;
    font-size: 28px;
    font-weight: 700;
}

.emi-calculator-header p {
    color: #7f8c8d;
    margin: 0;
    font-size: 15px;
}

.emi-calculator-header i {
    color: #3498db;
    margin-right: 10px;
}

/* Form Styles */
.emi-calculator-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
    font-size: 15px;
}

.form-group label i {
    width: 20px;
    margin-right: 8px;
    color: #3498db;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    color: #7f8c8d;
    font-size: 16px;
}

.form-control {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
}

.form-control.input-error {
    border-color: #e74c3c;
}

.tenure-container {
    display: flex;
    gap: 10px;
}

.tenure-input {
    flex: 2;
}

.tenure-select {
    flex: 1;
    padding-left: 15px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 15px;
}

/* Button Styles */
.btn-calculate {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    box-shadow: 0 4px 6px rgba(52, 152, 219, 0.2);
}

.btn-calculate:hover {
    background: linear-gradient(135deg, #2980b9, #3498db);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(52, 152, 219, 0.3);
}

.btn-calculate:active {
    transform: translateY(0);
}

.btn-calculate i {
    margin-right: 8px;
}

/* Results Section */
.result-container {
    margin-top: 30px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    animation: fadeIn 0.5s ease-out;
}

.result-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 20px;
}

.result-container h3 i {
    margin-right: 10px;
    color: #3498db;
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.result-label {
    font-weight: 600;
    color: #7f8c8d;
    font-size: 14px;
}

.result-value {
    font-weight: 700;
    color: #2c3e50;
    font-size: 15px;
}

.result-value.highlight {
    color: #27ae60;
    font-size: 16px;
}

/* Pie Chart Section */
.emi-pie-chart {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.chart-container {
    width: 150px;
    height: 150px;
    margin: 0 auto;
}

.chart-legend {
    flex: 1;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.legend-color {
    display: inline-block;
    width: 15px;
    height: 15px;
    border-radius: 3px;
    margin-right: 10px;
}

.legend-color.principal {
    background-color: #3498db;
}

.legend-color.interest {
    background-color: #e74c3c;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .emi-calculator-container {
        padding: 20px;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
    
    .tenure-container {
        flex-direction: column;
    }
    
    .emi-pie-chart {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .emi-calculator-container {
        padding: 15px;
    }
    
    .emi-calculator-header h2 {
        font-size: 24px;
    }
    
    .form-control {
        padding: 10px 12px 10px 35px;
        font-size: 15px;
    }
    
    .input-icon {
        font-size: 14px;
    }
}