* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

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

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.calculator-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

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

.input-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #555;
    font-size: 1.1rem;
}

.input-section input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: border-color 0.3s ease;
    margin-bottom: 20px;
}

.input-section input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#calculate-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.result-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
}

.result-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

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

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

.result-item .label {
    font-weight: 500;
    color: #666;
}

.result-item .value {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.result-item .value.highlight {
    color: #dc3545;
    font-size: 1.2rem;
}

.breakdown-section {
    background: #fff3cd;
    border-radius: 10px;
    padding: 25px;
    border-left: 4px solid #ffc107;
}

.breakdown-section h3 {
    color: #856404;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

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

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

.breakdown-range {
    font-weight: 500;
    color: #856404;
}

.breakdown-calculation {
    font-family: 'Courier New', monospace;
    color: #6c757d;
    font-size: 0.9rem;
}

.breakdown-tax {
    font-weight: 600;
    color: #dc3545;
}

.tax-brackets {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.tax-brackets h3 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
    font-size: 1.4rem;
}

.bracket-grid {
    display: grid;
    gap: 15px;
}

.bracket-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.bracket-range {
    font-weight: 500;
    color: #555;
}

.bracket-rate {
    font-weight: 600;
    color: #667eea;
    font-size: 1.1rem;
}

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

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .calculator-card {
        padding: 20px;
    }
    
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .breakdown-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .bracket-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

.error-message {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 5px;
    display: none;
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}