@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: auto;
    color: #334155;
}

.calculator-container {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.1),
        0 4px 10px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transform: translateY(0);
    transition: all 0.3s ease;
    max-width: 1000px;
    width: 100%;
}

.calculator-container:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.12),
        0 6px 15px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.calculator-header {
    text-align: center;
    margin-bottom: 32px;
}

.calculator-header h1 {
    margin: 0 0 20px 0;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.calculator-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.tax-counter, .status {
    font-weight: 600;
    color: #475569;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.tax-counter:hover, .status:hover {
    color: #1e40af;
}

.reset-button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.reset-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

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

.entity-selector {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
    gap: 12px;
    flex-wrap: wrap;
}

.entity-tab {
    padding: 12px 20px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.entity-tab:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: #334155;
}

.entity-tab-active {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    color: white !important;
    border-color: #1d4ed8;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.form-group {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(226, 232, 240, 0.6);
    transition: all 0.2s ease;
}

.form-group:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

.input-field {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    transition: all 0.2s ease;
    background: #ffffff;
    box-sizing: border-box;
    color: #374151;
}

.input-field:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: #ffffff;
}

.rate-field {
    background: linear-gradient(145deg, #fefbf3, #fef3c7);
    border-color: #f59e0b;
}

.rate-field:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0 !important;
    font-weight: 500 !important;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: #3b82f6;
}

.results-display {
    margin-top: 32px;
}

.results-container {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(51, 65, 85, 0.8);
}

.results-container h3 {
    margin: 0 0 24px 0;
    color: #f1f5f9;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(71, 85, 105, 0.3);
    transition: all 0.2s ease;
}

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

.result-item:hover {
    background: rgba(51, 65, 85, 0.3);
    padding-left: 12px;
    padding-right: 12px;
    border-radius: 6px;
}

.result-label {
    font-weight: 500;
    color: #cbd5e1;
    font-size: 0.95rem;
}

.result-value {
    font-weight: 700;
    font-size: 1rem;
    font-family: 'Inter', monospace;
}

.result-value.income {
    color: #10b981;
}

.result-value.rate {
    color: #06b6d4;
}

.result-item.deduction .result-value {
    color: #10b981;
}

.result-item.tax .result-value {
    color: #ef4444;
}

.result-item.gross-income, .result-item.net-income, .result-item.effective-rate {
    font-size: 1.1rem;
    background: rgba(51, 65, 85, 0.4);
    margin: 12px -16px;
    padding: 16px;
    border-radius: 8px;
    border-bottom: none;
}

.result-item.gross-income .result-value,
.result-item.net-income .result-value {
    font-size: 1.2rem;
    font-weight: 700;
}

.result-item.effective-rate .result-value {
    font-size: 1.1rem;
    font-weight: 700;
}

/* Responsive design */
@media (max-width: 768px) {
    .calculator-container {
        margin: 10px;
        padding: 24px;
    }
    
    .calculator-header h1 {
        font-size: 2rem;
    }
    
    .calculator-info {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .entity-selector {
        flex-direction: column;
        align-items: center;
    }
    
    .entity-tab {
        min-width: 200px;
        text-align: center;
    }
    
    .input-grid {
        grid-template-columns: 1fr;
    }
}