/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header h1 i {
    margin-right: 15px;
    color: #ffd700;
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Main content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* Calculator card */
.calculator-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.input-section {
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    color: #1e3c72;
    z-index: 1;
}

.input-wrapper input,
.input-wrapper select {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.input-wrapper input:focus,
.input-wrapper select:focus {
    outline: none;
    border-color: #1e3c72;
    background: white;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

/* Radio group */
.radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #555;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: white;
}

.radio-label:hover {
    border-color: #1e3c72;
    background: #f8f9fa;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: #1e3c72;
    background: #1e3c72;
}

.radio-label:has(input[type="radio"]:checked),
.radio-label.selected {
    background: #e8f2ff;
    border: 2px solid #1e3c72;
    border-radius: 8px;
    padding: 12px 16px;
    font-weight: 600;
    color: #1e3c72;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(30, 60, 114, 0.15);
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

/* Calculate button */
.calculate-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 60, 114, 0.3);
}

.calculate-btn:active {
    transform: translateY(0);
}

/* Results section */
.results-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    border: 2px solid #e9ecef;
}

.results-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
    text-align: center;
}

.results-grid {
    display: grid;
    gap: 15px;
    margin-bottom: 25px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.result-item.total {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.result-label {
    font-weight: 500;
}

.result-value {
    font-weight: 600;
    font-size: 1.1rem;
}

.breakdown {
    border-top: 2px solid #e9ecef;
    padding-top: 20px;
}

.breakdown h4 {
    color: #555;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.breakdown-item:last-child {
    border-bottom: none;
}

/* Info section */
.info-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.info-section h3 {
    color: #333;
    margin-bottom: 25px;
    font-size: 1.5rem;
    text-align: center;
}

.info-cards {
    display: grid;
    gap: 20px;
}

.info-card {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    border-left: 4px solid #1e3c72;
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-2px);
}

.info-card i {
    color: #1e3c72;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.info-card h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.info-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Footer */
.footer {
    text-align: center;
    color: white;
    opacity: 0.8;
    font-size: 0.9rem;
}

.footer i {
    color: #ff6b6b;
    margin: 0 5px;
}

/* Responsive design */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .header h1 {
        font-size: 2.5rem;
    }
    
    .calculator-card,
    .info-section {
        padding: 20px;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .container {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .calculator-card,
    .info-section {
        padding: 15px;
    }
}

/* Animation for results */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-section.show {
    animation: fadeInUp 0.5s ease-out;
}

/* Loading state */
.calculate-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.calculate-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
