/* Vietnamese Salary Calculator Styles */
.app-container {
    max-width: 100%;
    padding: 20px;
    background: white;
}

.calculator-container {
    max-width: 800px;
    margin: 0 auto;
}

.input-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    display: block;
}

.calculation-type {
    margin-bottom: 25px;
}

.toggle-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.toggle-btn {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn.active {
    background: #667eea;
    color: white;
}

.toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

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

.input-group label {
    font-weight: 500;
    color: #34495e;
    margin-bottom: 8px;
    display: block;
}

.input-group input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.input-group input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.region-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.region-option {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.region-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.region-option input[type="radio"] {
    margin-right: 10px;
    accent-color: #667eea;
}

.region-option input[type="radio"]:checked + span {
    color: #667eea;
    font-weight: 500;
}

.calculate-button {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.calculate-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

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

.btn-icon {
    font-size: 20px;
}

.results-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.results-section h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 24px;
    text-align: center;
}

.result-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    color: white;
}

.result-breakdown {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.result-breakdown h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 18px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

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

.result-item.highlight {
    background: rgba(102, 126, 234, 0.1);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    border-bottom: none;
}

.result-item.total {
    background: rgba(52, 152, 219, 0.1);
    padding: 12px;
    border-radius: 6px;
    margin-top: 10px;
    border-bottom: none;
}

.result-item .label {
    flex: 1;
    color: #34495e;
}

.result-item .value {
    font-weight: 600;
    color: #2c3e50;
}

.policy-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.policy-section h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 22px;
    text-align: center;
}

.policy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.policy-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-left: 4px solid #27ae60;
}

.policy-item strong {
    color: #2c3e50;
}

.policy-item span {
    color: #27ae60;
    font-weight: 600;
}

.tax-brackets {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.tax-brackets h4 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.tax-brackets ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tax-brackets li {
    padding: 8px 0;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #f1f1f1;
}

.tax-brackets li:last-child {
    border-bottom: none;
}

.tax-brackets strong {
    color: #e74c3c;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-container {
        padding: 15px;
    }
    
    .input-section,
    .results-section,
    .policy-section {
        padding: 20px;
    }
    
    .toggle-buttons {
        flex-direction: column;
    }
    
    .region-selection {
        grid-template-columns: 1fr;
    }
    
    .result-summary {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .policy-grid {
        grid-template-columns: 1fr;
    }
    
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

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

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

/* Loading state improvements */
.calculate-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.calculate-button.loading {
    position: relative;
}

.calculate-button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}