* {
    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;
}

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

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    padding: 20px;
}

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

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

.page-nav {
    margin-top: 20px;
}

.nav-link {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s, transform 0.2s;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.withdrawal-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

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

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

.shared-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

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

.scenario {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
}

.scenario h3 {
    color: #333;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.3em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 0.95em;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

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

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

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

.results-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.results-section h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.comparison-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.scenario-results h3 {
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.summary-item {
    padding: 15px 20px;
    border-radius: 10px;
    text-align: center;
    color: white;
}

.summary-item.scenario1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.summary-item.scenario2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.difference-summary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    color: white;
}

.difference-summary h3 {
    margin-bottom: 15px;
    font-size: 1.2em;
}

.difference-value {
    font-size: 2.5em;
    font-weight: 700;
}

.summary-item .label {
    display: block;
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 8px;
}

.summary-item .value {
    display: block;
    font-size: 1.8em;
    font-weight: 700;
}

.chart-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#retirementChart {
    max-height: 400px;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    .shared-inputs,
    .scenarios-container,
    .comparison-container {
        grid-template-columns: 1fr;
    }

    .calculator-section,
    .chart-section {
        padding: 20px;
    }

    .scenario {
        padding: 15px;
    }
}

