/* Retirement Tax Bracket Calculator - Professional CSS 2025 */
:root {
    --primary-color: #204080;
    --secondary-color: #5AC8FA;
    --dark-color: #0056CC;
    --light-color: #E3F2FD;
    --success-color: #48bb78;
    --warning-color: #f6ad55;
    --error-color: #e53e3e;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --border-color: #e2e8f0;
    --shadow-light: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-heavy: 0 10px 25px rgba(0,0,0,0.15);
    --gradient-primary: linear-gradient(135deg, #204080 0%, #5AC8FA 100%);
    
    /* Retirement-specific colors */
    --retirement-blue: #2563eb;
    --retirement-gold: #f59e0b;
    --retirement-green: #059669;
    --projection-purple: #7c3aed;
    --bracket-orange: #ea580c;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: #ffffff;
}

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

/* Breadcrumb */
.breadcrumb {
    background: #f8fafc;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb-content {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--retirement-blue) 0%, var(--retirement-gold) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.1) 2px, transparent 2px);
    background-size: 50px 50px;
    animation: retirementPattern 20s linear infinite;
}

@keyframes retirementPattern {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(50px) translateY(50px); }
}

.hero-content {
    position: relative;
    z-index: 2;
}

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

.hero p {
    font-size: 1.2rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Calculator Section */
.calculator-section {
    padding: 5rem 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.calculator-wrapper {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 3rem;
    align-items: start;
}

.calculator-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow-heavy);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.calculator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--retirement-blue), var(--retirement-gold));
}

.calculator-header {
    text-align: center;
    margin-bottom: 3rem;
}

.calculator-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.calculator-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Form Styling */
.calculator-form {
    space-y: 2rem;
}

.form-section {
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e3f2fd 100%);
    border-radius: 16px;
    border-left: 4px solid var(--retirement-blue);
}

.form-section h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--retirement-blue);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section h3::before {
    content: '📊';
    font-size: 1.2rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.input-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.input-label.required::after {
    content: ' *';
    color: var(--error-color);
    font-weight: 700;
}

.input-field {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

.input-field:focus {
    outline: none;
    border-color: var(--retirement-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.input-field.error {
    border-color: var(--error-color);
    background-color: rgba(229, 62, 62, 0.05);
    animation: fieldShake 0.5s ease-in-out;
}

@keyframes fieldShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.help-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* Retirement Scenario Selector */
.scenario-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.scenario-option {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.scenario-option:hover {
    border-color: var(--retirement-blue);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.scenario-option input[type="radio"] {
    margin: 0;
    width: 20px;
    height: 20px;
    accent-color: var(--retirement-blue);
}

.scenario-option input[type="radio"]:checked + .scenario-content {
    color: var(--retirement-blue);
}

.scenario-option input[type="radio"]:checked {
    background: var(--retirement-blue);
}

.scenario-option.selected {
    border-color: var(--retirement-blue);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(245, 158, 11, 0.05) 100%);
}

.scenario-content {
    flex: 1;
}

.scenario-label {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.5rem;
}

.scenario-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Calculate Button */
.calculate-section {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--light-color);
}

.calculate-btn {
    background: linear-gradient(135deg, var(--retirement-blue) 0%, var(--retirement-gold) 100%);
    color: white;
    border: none;
    padding: 1.25rem 3rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    position: relative;
    overflow: hidden;
}

.calculate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.calculate-btn:hover::before {
    left: 100%;
}

.calculate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.4);
}

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

.btn-text {
    font-size: 1.2rem;
}

.btn-icon {
    font-size: 1.3rem;
}

/* Results Section */
.results-section {
    margin-top: 3rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e3f2fd 100%);
    border-radius: 20px;
    border: 2px solid var(--retirement-blue);
    position: relative;
    animation: resultsAppear 0.6s ease-out;
}

@keyframes resultsAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-section h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--retirement-blue);
    margin-bottom: 2rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.results-section h3::before {
    content: '🎯';
    font-size: 1.5rem;
}

/* Tax Bracket Results Grid */
.bracket-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.bracket-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.bracket-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

.bracket-card.current {
    border-color: var(--retirement-blue);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, white 100%);
}

.bracket-card.future {
    border-color: var(--retirement-gold);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, white 100%);
}

.bracket-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.bracket-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-variant-numeric: tabular-nums;
}

.bracket-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* Projection Section */
.projection-section {
    margin-top: 2rem;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.projection-section h4 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--projection-purple);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.projection-section h4::before {
    content: '📈';
}

.projection-content {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.projection-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.projection-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.projection-list li:last-child {
    border-bottom: none;
}

.projection-year {
    font-weight: 600;
    color: var(--text-primary);
}

.projection-rate {
    font-weight: 700;
    color: var(--retirement-blue);
    font-variant-numeric: tabular-nums;
}

/* Sidebar Information */
.sidebar {
    space-y: 2rem;
}

.info-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.info-card:hover {
    box-shadow: var(--shadow-heavy);
    transform: translateY(-2px);
}

.info-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--retirement-blue);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.info-card ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.info-card li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.info-card li::before {
    content: '✓';
    color: var(--success-color);
    font-weight: 700;
    margin-top: 0.1rem;
}

/* Related Calculators */
.related-calculators {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e3f2fd 100%);
}

.related-calculators h2 {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.related-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    text-align: center;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
    border-color: var(--retirement-blue);
}

.related-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--retirement-blue), var(--retirement-gold));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
}

.related-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.related-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.related-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--retirement-blue);
    text-decoration: none;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--retirement-blue);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.related-link:hover {
    background: var(--retirement-blue);
    color: white;
    transform: translateX(4px);
}

/* Validation Modal */
.validation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.validation-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.validation-modal.show .modal-content {
    transform: scale(1);
}

.modal-content h3 {
    color: var(--error-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.modal-content h3::before {
    content: '⚠️';
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.modal-close {
    background: var(--error-color);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .calculator-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .calculator-card {
        padding: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .scenario-selector {
        grid-template-columns: 1fr;
    }
    
    .bracket-results-grid {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .calculate-btn {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .calculator-card {
        padding: 1.5rem;
    }
    
    .form-section {
        padding: 1.5rem;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 1.9rem;
    }
}

/* Print Styles */
@media print {
    .hero,
    .related-calculators,
    .sidebar {
        display: none;
    }
    
    .calculator-section {
        padding: 1rem 0;
    }
    
    .calculate-btn {
        display: none;
    }
    
    .results-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-secondary: #333333;
        --shadow-light: 0 2px 4px rgba(0,0,0,0.3);
    }
    
    .input-field {
        border-width: 3px;
    }
    
    .bracket-card {
        border-width: 2px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
} 