/* Main Layout */
.main-content {
    padding-bottom: 3rem;
    min-height: 100vh;
}

/* Header */
.header {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 2rem;
}

/* Dark mode specific header styling */
[data-theme="dark"] .header {
    background: rgba(17, 24, 39, 0.95);
    border-bottom: 1px solid rgba(75, 85, 99, 0.3);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    font-family: var(--font-headings);
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

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

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

.back-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

/* Calculator Grid */
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Input Card */
.input-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.results-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.input-card h3,
.results-card h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(59, 130, 246, 0.1);
}

.section-header h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
}

.toggle-section {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.toggle-section:hover {
    background: #3b82f6;
    color: white;
}

/* Input Groups */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.9rem;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    color: var(--text-color);
}

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

/* Input Controls */
.input-controls {
    display: flex;
    flex-direction: column;
    margin-left: 0.5rem;
}

.increment-btn,
.decrement-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0.125rem 0;
    transition: all 0.3s ease;
}

.increment-btn:hover,
.decrement-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Quick Buttons */
.quick-amounts {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.quick-btn {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.quick-btn:hover,
.quick-btn.active {
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.input-group small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Expenses Section */
.expenses-section {
    margin-top: 1rem;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.expenses-section.hidden {
    display: none;
}

.expense-card {
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.expense-card h5 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.action-btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.action-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.action-btn.secondary {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.2);
}

.action-btn.secondary:hover {
    background: rgba(107, 114, 128, 0.2);
    transform: translateY(-2px);
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(59, 130, 246, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.metric-card.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.metric-card.success {
    border-color: rgba(34, 197, 94, 0.3);
}

.metric-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.metric-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.8;
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.metric-card small {
    font-size: 0.875rem;
    opacity: 0.7;
}

/* Retirement Readiness */
.readiness-section {
    margin-bottom: 2rem;
}

.readiness-section h4 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
}

.readiness-bar {
    background: rgba(229, 231, 235, 0.8);
    border-radius: 12px;
    height: 20px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.readiness-progress {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    height: 100%;
    border-radius: 12px;
    transition: width 1s ease;
    width: 92%;
}

.readiness-text {
    text-align: center;
    font-weight: 600;
    color: var(--text-color);
}

/* Chart Container */
.chart-container {
    margin: 2rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    height: 400px;
}

/* Calculations Table */
.calculations-table-section {
    margin: 2rem 0;
}

.calculations-table-section h4 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
}

.table-container {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    overflow: hidden;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.calculations-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.calculations-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0.75rem;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.calculations-table td {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
    color: var(--text-color);
}

.calculations-table tr:hover {
    background: rgba(59, 130, 246, 0.05);
}

.calculations-table tr.life-event {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid #f59e0b;
}

.calculations-table tr.retirement-year {
    background: rgba(34, 197, 94, 0.1);
    border-left: 4px solid #22c55e;
    font-weight: 600;
}

.calculations-table .amount {
    font-weight: 600;
    text-align: right;
}

.calculations-table .amount.positive {
    color: #059669;
}

.calculations-table .amount.negative {
    color: #dc2626;
}

.calculations-table .event-text {
    font-weight: 500;
    color: #d97706;
    font-size: 0.8rem;
}

/* Shortfall Section */
.shortfall-section {
    background: rgba(255, 243, 205, 0.8);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.shortfall-section h4 {
    margin: 0 0 1rem 0;
    color: #d97706;
    font-size: 1.1rem;
    font-weight: 600;
}

.shortfall-grid {
    display: grid;
    gap: 0.75rem;
}

.shortfall-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
}

.shortfall-label {
    color: var(--text-color);
    font-weight: 500;
}

.shortfall-value {
    font-weight: 700;
    color: #d97706;
}

/* Timeline Section */
.timeline-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.timeline-section h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.timeline-container {
    position: relative;
    padding: 1rem 0;
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.timeline-year {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
    margin-right: 1rem;
}

.timeline-content {
    flex: 1;
    background: rgba(248, 250, 252, 0.8);
    padding: 1rem;
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
}

.timeline-event {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.timeline-amount {
    color: #059669;
    font-weight: 700;
}

/* Breakdown Section */
.breakdown-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.breakdown-section h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.breakdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.breakdown-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

.breakdown-card h4 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.inflation-comparison,
.goal-list {
    display: grid;
    gap: 0.75rem;
}

.inflation-item,
.goal-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 8px;
}

.inflation-item.primary {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    font-weight: 600;
}

/* Tips Section */
.tips-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.tips-section h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
}

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

.tip-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.tip-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.tip-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.tip-card h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.tip-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Info Section */
.info-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.info-section h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
}

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

.info-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

.info-card h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.info-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Dark Mode Support */
[data-theme="dark"] .input-card,
[data-theme="dark"] .results-card,
[data-theme="dark"] .timeline-section,
[data-theme="dark"] .breakdown-section,
[data-theme="dark"] .tips-section,
[data-theme="dark"] .info-section {
    background: rgba(31, 41, 55, 0.95);
    border-color: rgba(75, 85, 99, 0.3);
}

[data-theme="dark"] .input-group input,
[data-theme="dark"] .input-group select {
    background: rgba(55, 65, 81, 0.8);
    border-color: rgba(75, 85, 99, 0.3);
    color: #f9fafb;
}

[data-theme="dark"] .metric-card,
[data-theme="dark"] .expense-card,
[data-theme="dark"] .breakdown-card,
[data-theme="dark"] .tip-card,
[data-theme="dark"] .info-card {
    background: rgba(55, 65, 81, 0.8);
    border-color: rgba(75, 85, 99, 0.3);
}

[data-theme="dark"] .timeline-content,
[data-theme="dark"] .inflation-item,
[data-theme="dark"] .goal-item,
[data-theme="dark"] .shortfall-item {
    background: rgba(55, 65, 81, 0.8);
}

[data-theme="dark"] .table-container {
    background: rgba(55, 65, 81, 0.8);
}

[data-theme="dark"] .calculations-table td {
    border-bottom-color: rgba(75, 85, 99, 0.3);
}

[data-theme="dark"] .calculations-table tr:hover {
    background: rgba(75, 85, 99, 0.2);
}

[data-theme="dark"] .calculations-table tr.life-event {
    background: rgba(245, 158, 11, 0.2);
}

[data-theme="dark"] .calculations-table tr.retirement-year {
    background: rgba(34, 197, 94, 0.2);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .calculator-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .breakdown-grid {
        grid-template-columns: 1fr;
    }
    
    .input-row {
        grid-template-columns: 1fr;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .timeline-year {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    .calculations-table {
        font-size: 0.75rem;
    }

    .calculations-table th,
    .calculations-table td {
        padding: 0.5rem 0.25rem;
    }

    .table-container {
        max-height: 300px;
    }

    .nav {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding-bottom: 2rem;
    }
    
    .input-card,
    .results-card,
    .timeline-section,
    .breakdown-section,
    .tips-section,
    .info-section {
        padding: 1.5rem;
    }
    
    .chart-container {
        height: 300px;
    }
    
    .quick-amounts {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .calculations-table {
        font-size: 0.7rem;
    }

    .calculations-table th:nth-child(3),
    .calculations-table td:nth-child(3),
    .calculations-table th:nth-child(4),
    .calculations-table td:nth-child(4) {
        display: none;
    }
} 