/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Professional Color Palette */
    --primary-blue: #2563eb;
    --primary-blue-dark: #1d4ed8;
    --secondary-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --neutral-50: #f8fafc;
    --neutral-100: #f1f5f9;
    --neutral-200: #e2e8f0;
    --neutral-300: #cbd5e1;
    --neutral-400: #94a3b8;
    --neutral-500: #64748b;
    --neutral-600: #475569;
    --neutral-700: #334155;
    --neutral-800: #1e293b;
    --neutral-900: #0f172a;

    /* Asset Colors */
    --stocks-color: #3b82f6;
    --bonds-color: #10b981;
    --etfs-color: #f59e0b;
    --cash-color: #6b7280;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--neutral-50);
    background-image:
        radial-gradient(circle at 25% 25%, rgba(37, 99, 235, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(16, 185, 129, 0.02) 0%, transparent 50%);
    color: var(--neutral-800);
    line-height: 1.6;
    font-weight: 400;
    min-height: 100vh;
}

/* Full Screen Welcome */
.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    overflow: hidden;
}

/* Floating Particles */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(odd) {
    animation-direction: reverse;
}

.particle:nth-child(1) { width: 8px; height: 8px; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { width: 12px; height: 12px; left: 20%; animation-delay: 1s; }
.particle:nth-child(3) { width: 6px; height: 6px; left: 30%; animation-delay: 2s; }
.particle:nth-child(4) { width: 10px; height: 10px; left: 40%; animation-delay: 0.5s; }
.particle:nth-child(5) { width: 14px; height: 14px; left: 50%; animation-delay: 1.5s; }
.particle:nth-child(6) { width: 8px; height: 8px; left: 60%; animation-delay: 3s; }
.particle:nth-child(7) { width: 12px; height: 12px; left: 70%; animation-delay: 2.5s; }
.particle:nth-child(8) { width: 6px; height: 6px; left: 80%; animation-delay: 4s; }
.particle:nth-child(9) { width: 10px; height: 10px; left: 90%; animation-delay: 3.5s; }
.particle:nth-child(10) { width: 8px; height: 8px; left: 15%; animation-delay: 5s; }

.welcome-content {
    max-width: 1000px;
    width: 90%;
    text-align: center;
    color: white;
    position: relative;
}

.welcome-header h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Creator Line */
.creator-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.7s both;
}

.by-text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

.creator-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fbbf24;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.creator-school {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

.tagline {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 3rem;
    font-weight: 400;
    animation: fadeInUp 1s ease 0.9s both;
}

.game-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.preview-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.preview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.preview-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.preview-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.preview-card p {
    opacity: 0.9;
    font-weight: 300;
}

.welcome-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

/* Welcome Footer */
.welcome-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    animation: fadeInUp 1s ease 1.2s both;
}

.footer-link {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.3s ease;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.footer-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.separator {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

/* Button Styles */
.btn-primary {
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-blue-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary.large {
    padding: 1.25rem 3rem;
    font-size: 1.25rem;
}

.btn-secondary {
    background: white;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
}

.btn-secondary.small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Game Container */
.game-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    min-height: 100vh;
}

/* Game Header */
.game-header {
    background: white;
    border-bottom: 1px solid var(--neutral-200);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.header-left h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.25rem;
}

.month-indicator {
    font-size: 0.9rem;
    color: var(--neutral-500);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.progress-bar {
    width: 200px;
    height: 8px;
    background: var(--neutral-200);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Market Data Indicator */
.market-indicator {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.market-data-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.5rem;
    min-width: 60px;
}

.market-data-item .symbol {
    font-weight: 600;
    color: var(--neutral-600);
    font-size: 0.7rem;
    margin-bottom: 0.25rem;
}

.market-data-item .change {
    font-weight: 700;
    font-size: 0.8rem;
}

.market-data-item .change.positive {
    color: var(--accent-green);
}

.market-data-item .change.negative {
    color: var(--accent-red);
}

.market-data-item .change.loading {
    color: var(--neutral-500);
    animation: pulse 2s infinite;
}

/* Market Data Status */
.market-data-status {
    font-size: 0.8rem;
    color: var(--neutral-600);
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: opacity 0.5s ease;
}

.portfolio-summary {
    text-align: right;
}

.portfolio-summary .label {
    display: block;
    font-size: 0.8rem;
    color: var(--neutral-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.portfolio-summary .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--neutral-800);
    display: block;
}

.portfolio-summary .change {
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

.portfolio-summary .change.positive {
    color: var(--accent-green);
}

.portfolio-summary .change.negative {
    color: var(--accent-red);
}

/* Allocation Overview */
.allocation-overview {
    background: white;
    margin: 2rem;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    align-items: center;
}

.allocation-pie {
    display: flex;
    justify-content: center;
}

.allocation-legend {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.legend-color.stocks { background: var(--stocks-color); }
.legend-color.bonds { background: var(--bonds-color); }
.legend-color.etfs { background: var(--etfs-color); }
.legend-color.cash { background: var(--cash-color); }

/* Strategy Section */
.strategy-section {
    margin: 2rem;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.strategy-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--neutral-800);
    margin-bottom: 0.5rem;
}

.strategy-subtitle {
    color: var(--neutral-500);
    margin-bottom: 2rem;
}

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

.preset-card {
    border: 2px solid var(--neutral-200);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--neutral-50);
}

.preset-card:hover {
    border-color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.preset-card.selected {
    border-color: var(--primary-blue);
    background: rgba(37, 99, 235, 0.05);
    box-shadow: var(--shadow-md);
}

.preset-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.preset-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--neutral-800);
    margin-bottom: 0.5rem;
}

.preset-card p {
    color: var(--neutral-500);
    margin-bottom: 1rem;
}

.preset-allocation {
    font-size: 0.85rem;
    color: var(--neutral-600);
    font-weight: 500;
}

/* Custom Allocation */
.custom-allocation {
    background: var(--neutral-50);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
}

.custom-allocation h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--neutral-800);
    margin-bottom: 1.5rem;
}

.allocation-sliders {
    display: grid;
    gap: 2rem;
}

.slider-container {
    display: grid;
    gap: 0.75rem;
}

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

.asset-name {
    font-weight: 600;
    color: var(--neutral-700);
    font-size: 1rem;
}

.slider-value {
    font-weight: 700;
    color: var(--primary-blue);
    font-size: 1.1rem;
}

.modern-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--neutral-200);
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

.modern-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-blue);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.modern-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.modern-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-blue);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.slider-description {
    font-size: 0.85rem;
    color: var(--neutral-500);
    font-style: italic;
}

.allocation-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 2px solid var(--neutral-200);
}

.total-label {
    font-weight: 600;
    color: var(--neutral-700);
}

.total-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-blue);
}

.warning {
    color: var(--accent-red);
    font-weight: 500;
    font-size: 0.9rem;
}

.strategy-actions {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

/* Comprehensive Monthly Report Screen */
.results-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    z-index: 2500;
    display: none;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 1rem;
    box-sizing: border-box;
}

.results-container {
    max-width: 1200px;
    width: 100%;
    color: white;
    padding-bottom: 2rem;
}

/* Report Header */
.report-header {
    text-align: center;
    margin-bottom: 2rem;
}

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

.performance-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 600px;
    margin: 0 auto;
}

.performance-emoji {
    font-size: 4rem;
    animation: bounce 2s infinite;
}

.performance-text h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.performance-text p {
    font-size: 1.3rem;
    opacity: 0.9;
}

.performance-summary.positive {
    border-left: 4px solid #4ade80;
}

.performance-summary.negative {
    border-left: 4px solid #f87171;
}

/* Portfolio Comparison */
.portfolio-comparison {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.comparison-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

/* Market Event Section */
.market-event-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: left;
}

.market-event-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.event-card-report {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.event-title-big {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 1rem;
}

.event-description-simple {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.event-impact h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: #4ade80;
}

.event-impact p {
    font-size: 1rem;
    opacity: 0.9;
}

/* Investment Breakdown Section */
.investment-breakdown-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.investment-breakdown-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.breakdown-grid {
    display: grid;
    gap: 1rem;
}

.breakdown-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 4px solid;
}

.breakdown-item.stocks { border-left-color: var(--stocks-color); }
.breakdown-item.bonds { border-left-color: var(--bonds-color); }
.breakdown-item.etfs { border-left-color: var(--etfs-color); }
.breakdown-item.cash { border-left-color: var(--cash-color); }

.breakdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.investment-name {
    font-size: 1.1rem;
    font-weight: 600;
}

.investment-amount {
    font-size: 1.1rem;
    font-weight: 700;
    opacity: 0.9;
}

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

.change-percent, .change-dollar {
    font-weight: 700;
}

.change-percent.positive, .change-dollar.positive {
    color: #4ade80;
}

.change-percent.negative, .change-dollar.negative {
    color: #f87171;
}

.before-after {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
}

.portfolio-before, .portfolio-after {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
}

.portfolio-before h3, .portfolio-after h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.portfolio-value-big {
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.change-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.arrow-icon {
    font-size: 3rem;
    animation: bounce 2s infinite;
}

.change-amount {
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
}

.change-amount.positive {
    color: #4ade80;
}

.change-amount.negative {
    color: #f87171;
}

/* What Happened Section */
.what-happened {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: left;
}

.what-happened h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.event-title-big {
    font-size: 2rem;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 1rem;
}

.event-description-simple {
    font-size: 1.3rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.investment-impact h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #4ade80;
}

.impact-breakdown {
    display: grid;
    gap: 1rem;
}

.impact-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.impact-asset {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.impact-change {
    font-size: 1.2rem;
    font-weight: 700;
}

.impact-change.positive {
    color: #4ade80;
}

.impact-change.negative {
    color: #f87171;
}

/* AI Mentor Learning Section */
.learning-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mentor-header {
    text-align: center;
    margin-bottom: 2rem;
}

.mentor-avatar-big {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: bounce 3s infinite;
}

.mentor-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

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

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

.concept-card, .advice-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    transition: transform 0.3s ease;
}

.concept-card:hover, .advice-card:hover {
    transform: translateY(-5px);
}

.concept-card {
    border-left: 4px solid #fbbf24;
}

.advice-card {
    border-left: 4px solid #4ade80;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.concept-card h3, .advice-card h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.concept-card h4, .advice-card h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fbbf24;
}

.advice-card h4 {
    color: #4ade80;
}

.concept-card p, .advice-card p {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.9;
}

/* Report Actions */
.report-actions {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.action-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.pulse-btn {
    animation: pulse 2s infinite;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.4);
}

.action-buttons .btn-primary {
    font-size: 1.2rem;
    padding: 1.25rem 2.5rem;
    min-width: 250px;
}

.action-buttons .btn-secondary {
    font-size: 1rem;
    padding: 1.25rem 2rem;
    min-width: 200px;
}

.progress-indicator {
    text-align: center;
}

.progress-text {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1rem;
    font-weight: 500;
}

.progress-bar-report {
    width: 100%;
    max-width: 400px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto;
}

.progress-fill-report {
    height: 100%;
    background: linear-gradient(90deg, #4ade80, #22c55e);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Event Section (Fallback) */
.event-section {
    margin: 2rem;
    animation: slideIn 0.5s ease;
}

.event-card, .mentor-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
}

.event-card {
    border-left: 4px solid var(--accent-red);
}

.event-card h3 {
    color: var(--accent-red);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.market-changes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.change-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--neutral-50);
    border-radius: 8px;
    border: 1px solid var(--neutral-200);
}

.change-value.positive {
    color: var(--accent-green);
    font-weight: 700;
}

.change-value.negative {
    color: var(--accent-red);
    font-weight: 700;
}

/* Mentor Card */
.mentor-card {
    border-left: 4px solid var(--primary-blue);
}

.mentor-avatar {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.mentor-content h4 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.concept-box, .advice-box {
    background: var(--neutral-50);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1rem;
    border: 1px solid var(--neutral-200);
}

.concept-box {
    border-left: 4px solid var(--etfs-color);
}

.advice-box {
    border-left: 4px solid var(--accent-green);
}

.concept-box strong, .advice-box strong {
    color: var(--neutral-800);
    font-weight: 600;
}

/* Month Report Overlay */
.month-report-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    padding: 1rem;
    box-sizing: border-box;
}

.month-report-overlay.show {
    opacity: 1;
}

.report-content {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 20px;
    padding: 2rem;
    max-width: 800px;
    width: 100%;
    color: white;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.2);
    max-height: 90vh;
    overflow-y: auto;
}

.report-header {
    text-align: center;
    margin-bottom: 2rem;
}

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

.performance-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.performance-emoji {
    font-size: 3rem;
    animation: bounce 2s infinite;
}

.performance-text h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.performance-text p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.portfolio-comparison {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.before-after {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.value-box {
    text-align: center;
    flex: 1;
}

.value-box h3 {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.value-box .value {
    font-size: 2rem;
    font-weight: 700;
    color: #fbbf24;
}

.arrow {
    font-size: 2rem;
    animation: pulse 2s infinite;
}

.event-explanation, .investment-breakdown, .learning-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.event-explanation h2, .investment-breakdown h2, .learning-section h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.event-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
}

.event-card h3 {
    color: #fbbf24;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.event-card.real-data {
    border: 2px solid #4ade80;
    background: rgba(74, 222, 128, 0.1);
}

.real-data-badge {
    background: #4ade80;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 1rem;
    display: inline-block;
    animation: pulse 2s infinite;
}

/* Settings Modal */
.settings-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--neutral-200);
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.status-indicator {
    background: var(--neutral-50);
    border-radius: 8px;
    padding: 1rem;
    border-left: 4px solid var(--neutral-300);
}

.status-indicator.active {
    background: rgba(74, 222, 128, 0.1);
    border-left-color: var(--accent-green);
}

.status-text.loading {
    color: var(--primary-blue);
}

.status-text.active {
    color: var(--accent-green);
    font-weight: 600;
}

.status-text.simulated {
    color: var(--neutral-600);
}

/* Data Sources Display */
.data-sources {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.data-source {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--neutral-50);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-blue);
}

.source-icon {
    font-size: 2rem;
    min-width: 3rem;
    text-align: center;
}

.source-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--primary-blue);
    font-size: 1rem;
    font-weight: 600;
}

.source-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--neutral-600);
    line-height: 1.4;
}

.api-key-input {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.api-key-input label {
    font-weight: 600;
    min-width: 80px;
}

.api-key-input input {
    flex: 1;
    min-width: 250px;
    padding: 0.75rem;
    border: 2px solid var(--neutral-200);
    border-radius: 8px;
    font-size: 1rem;
}

.api-key-input input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.note {
    background: var(--neutral-50);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-blue);
    font-size: 0.9rem;
    margin-top: 1rem;
}

.settings-section ul {
    list-style: none;
    padding: 0;
}

.settings-section li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--neutral-100);
}

.settings-section li:last-child {
    border-bottom: none;
}

.breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.breakdown-item {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.9rem;
}

.investment-name {
    font-weight: 600;
}

.investment-amount {
    text-align: center;
    font-weight: 700;
}

.investment-change {
    text-align: right;
    font-weight: 600;
}

.investment-change.positive {
    color: #4ade80;
}

.investment-change.negative {
    color: #f87171;
}

.learning-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
}

.learning-card h3 {
    color: #4ade80;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.advice {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border-left: 4px solid #fbbf24;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.action-buttons .btn-primary,
.action-buttons .btn-secondary {
    min-width: 180px;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.progress-info {
    text-align: center;
    opacity: 0.8;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ade80, #22c55e);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Strategy Change Message */
.strategy-change-message {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.strategy-change-message h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fbbf24;
}

.strategy-change-message p {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Mentor Card */
.mentor-card {
    border-left: 4px solid var(--primary-blue);
}

.mentor-avatar {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.mentor-content h4 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.concept-box, .advice-box {
    background: var(--neutral-50);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1rem;
    border: 1px solid var(--neutral-200);
}

.concept-box {
    border-left: 4px solid var(--etfs-color);
}

.advice-box {
    border-left: 4px solid var(--accent-green);
}

.concept-box strong, .advice-box strong {
    color: var(--neutral-800);
    font-weight: 600;
}

/* Chart Section */
.chart-section {
    background: white;
    margin: 2rem;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.chart-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--neutral-800);
}

.chart-controls {
    display: flex;
    gap: 1rem;
}

#portfolio-chart {
    height: 300px !important;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    max-width: 98vw;
    width: 98vw;
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

.modal-content * {
    box-sizing: border-box;
    max-width: 100%;
}

/* Rounded scrollbars for all modals */
.modal-content::-webkit-scrollbar {
    width: 12px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 16px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 16px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}



.close {
    color: var(--neutral-400);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--neutral-800);
}

.about-content h2 {
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    font-weight: 700;
}

.about-content h3 {
    color: var(--neutral-800);
    margin: 1.5rem 0 0.75rem 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.about-content p {
    color: var(--neutral-600);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.about-content ul {
    color: var(--neutral-600);
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.about-content li {
    margin-bottom: 0.5rem;
}

.final-stats {
    margin: 1.5rem 0;
}

.stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding: 1rem;
    background: var(--neutral-50);
    border-radius: 8px;
    border: 1px solid var(--neutral-200);
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

#player-name {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--neutral-300);
    border-radius: 8px;
    font-size: 1rem;
    margin: 1rem 0;
    transition: border-color 0.3s ease;
}

#player-name:focus {
    outline: none;
    border-color: var(--primary-blue);
}

/* Flowing About Modal Styles */
.about-flow {
    max-width: 98vw;
    width: 98vw;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.about-content-flow {
    line-height: 1.7;
    color: #374151;
}

.about-title {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
}

.about-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.about-title .subtitle {
    font-size: 1.1rem;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

.creator-intro {
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    border-radius: 16px;
    border-left: 4px solid #10b981;
}

.creator-intro h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 0.75rem;
}

.creator-details {
    font-size: 1rem;
    color: #059669;
    font-weight: 600;
    margin-bottom: 1rem;
}

.creator-mission {
    font-size: 1rem;
    color: #374151;
    line-height: 1.7;
    font-style: italic;
    margin: 0;
}

.game-info h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin: 2rem 0 1rem 0;
}

.game-info h3:first-child {
    margin-top: 0;
}

.game-info p {
    font-size: 1rem;
    line-height: 1.7;
    color: #4b5563;
    margin-bottom: 1.5rem;
}

.important-note {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #f59e0b;
    color: #92400e;
    font-size: 1rem;
    line-height: 1.6;
    margin-top: 2rem;
}

/* Testimonials Modal */
.testimonials-modal {
    max-width: 98vw;
    width: 98vw;
    max-height: 90vh;
    padding: 0;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    overflow: visible;
}

.testimonials-header {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    margin: -2rem -2rem 2rem -2rem;
    border-radius: 16px 16px 0 0;
}

.testimonials-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

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

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
    margin-bottom: 2rem;
    max-height: 500px;
    overflow-y: auto;
}

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    border: 1px solid rgba(37, 99, 235, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.testimonial-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.testimonial-stars {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.testimonial-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--neutral-700);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-author {
    font-size: 0.9rem;
    color: var(--primary-blue);
    font-weight: 600;
    text-align: right;
}

.testimonials-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 2rem;
    border-top: 1px solid rgba(37, 99, 235, 0.2);
    margin-top: 1rem;
}

.testimonials-stats .stat {
    text-align: center;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.testimonials-stats .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.testimonials-stats .stat-label {
    font-size: 0.9rem;
    color: var(--neutral-600);
    font-weight: 500;
}

/* Full Screen Tutorial */
.tutorial-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tutorial-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.tutorial-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 1rem;
    padding-top: 2rem;
    padding-bottom: 8rem;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.5s ease;
    color: white;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

.tutorial-slide.active {
    opacity: 1;
    transform: translateX(0);
}

.tutorial-content {
    max-width: 1000px;
    width: 100%;
    text-align: center;
    margin-bottom: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tutorial-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

.tutorial-slide h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.tutorial-subtitle {
    font-size: 1.5rem;
    opacity: 0.9;
    margin-bottom: 3rem;
    font-weight: 300;
}

/* Investment Types Display */
.investment-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.investment-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.investment-card:hover {
    transform: translateY(-10px);
}

.investment-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.investment-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.investment-card p {
    opacity: 0.9;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.simple-explanation {
    font-style: italic;
    opacity: 0.8;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.risk-meter {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
    text-align: center;
}

.meter {
    font-size: 1rem;
}

.meter.high { color: #ff6b6b; }
.meter.medium { color: #ffd93d; }
.meter.low { color: #6bcf7f; }
.meter.none { color: #95a5a6; }

/* Strategy Demo */
.strategy-demo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.demo-preset {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.demo-preset:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.demo-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.demo-allocation {
    display: flex;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem 0;
    background: rgba(255, 255, 255, 0.2);
}

.demo-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.demo-bar.stocks { background: var(--stocks-color); }
.demo-bar.bonds { background: var(--bonds-color); }
.demo-bar.etfs { background: var(--etfs-color); }
.demo-bar.cash { background: var(--cash-color); }

.demo-result {
    font-style: italic;
    opacity: 0.9;
    margin-top: 1rem;
}

/* Game Flow */
.game-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
}

.flow-step {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 400px;
}

.flow-number {
    background: white;
    color: var(--primary-blue);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.flow-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.flow-visual {
    font-size: 2rem;
    margin-left: auto;
}

.flow-arrow {
    font-size: 2rem;
    opacity: 0.7;
}

/* Tutorial Navigation */
.tutorial-navigation {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1.5rem;
    z-index: 10;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    padding: 1.25rem 2.5rem;
    border-radius: 60px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    min-width: 300px;
    justify-content: center;
}

.tutorial-navigation .btn-primary.pulse-animation {
    animation: pulse 2s infinite;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.6);
}

.tutorial-navigation .btn-primary,
.tutorial-navigation .btn-secondary {
    min-width: 120px;
    font-weight: 600;
}

/* Tutorial Animations */
.money-animation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    font-size: 2rem;
}

.money-stack {
    display: flex;
    flex-direction: column;
    gap: -10px;
}

.bill {
    animation: stackPulse 2s ease-in-out infinite;
}

.bill:nth-child(2) { animation-delay: 0.3s; }
.bill:nth-child(3) { animation-delay: 0.6s; }

.arrow {
    animation: bounce 2s infinite;
}

.growth-chart {
    animation: pulse 2s infinite;
}

.tutorial-example {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 2rem;
    text-align: left;
}

.tutorial-tip {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2rem;
}

.tutorial-highlight {
    background: rgba(16, 185, 129, 0.2);
    border: 2px solid rgba(16, 185, 129, 0.4);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    animation: glow 2s ease-in-out infinite alternate;
}

.tutorial-explanation {
    margin-top: 2rem;
}

.tutorial-explanation h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.tutorial-explanation p {
    font-size: 1.3rem;
    line-height: 1.6;
    opacity: 0.9;
}

/* Month Transition Overlay */
.month-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    backdrop-filter: blur(10px);
}

.transition-content {
    text-align: center;
    color: white;
    max-width: 500px;
    padding: 2rem;
}

.transition-animation {
    animation: bounceIn 0.8s ease;
}

.calendar-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    animation: pulse 2s infinite;
}

.transition-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.transition-text p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.loading-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 2rem;
}

.loading-progress {
    height: 100%;
    background: white;
    border-radius: 3px;
    animation: loadingProgress 2s ease-in-out;
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* Custom Allocation Improvements */
.custom-header {
    margin-bottom: 2rem;
}

.custom-instructions {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
    color: #92400e;
    font-weight: 500;
    animation: glow 2s ease-in-out infinite alternate;
}

/* Enhanced Preset Cards */
.preset-card {
    position: relative;
    overflow: hidden;
}

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

.preset-card:hover::before {
    left: 100%;
}

.preset-card.selected {
    animation: selectedPulse 1s ease;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
}

/* Enhanced Slider Styles */
.slider-container {
    position: relative;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border: 2px solid var(--neutral-200);
    transition: all 0.3s ease;
}

.slider-container:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.slider-container.cash-auto {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-color: var(--accent-green);
    position: relative;
}

.slider-container.cash-auto::before {
    content: '🤖 Auto-Balanced';
    position: absolute;
    top: -10px;
    right: 10px;
    background: var(--accent-green);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    animation: glow 2s ease-in-out infinite alternate;
}

.slider-container.cash-auto .modern-slider {
    opacity: 0.7;
    cursor: not-allowed;
}

.modern-slider::-webkit-slider-thumb:active {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.5);
}

/* Floating Action Button Style for Continue */
.strategy-actions .btn-primary {
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

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

.strategy-actions .btn-primary:hover::before {
    left: 100%;
}

/* Portfolio Value Animation */
.portfolio-summary .value {
    position: relative;
    overflow: hidden;
}

.portfolio-summary .value::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.3), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

/* Allocation Controls */
.allocation-controls {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.allocation-controls h3 {
    margin-bottom: 25px;
    color: #333;
}

.sliders {
    display: grid;
    gap: 20px;
    margin-bottom: 25px;
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.slider-group label {
    font-weight: 600;
    color: #555;
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    outline: none;
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider.stocks {
    background: #ecf0f1;
}

.slider.stocks::-webkit-slider-thumb {
    background: #3498db;
}

.slider.bonds {
    background: #ecf0f1;
}

.slider.bonds::-webkit-slider-thumb {
    background: #27ae60;
}

.slider.etfs {
    background: #ecf0f1;
}

.slider.etfs::-webkit-slider-thumb {
    background: #f39c12;
}

.slider.cash {
    background: #ecf0f1;
}

.slider.cash::-webkit-slider-thumb {
    background: #95a5a6;
}

.allocation-total {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.warning {
    color: #e74c3c;
    margin-left: 10px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn.primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn.primary:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btn.secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

.btn.secondary:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(149, 165, 166, 0.4);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Chart Section */
.chart-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.chart-section h3 {
    margin-bottom: 20px;
    color: #333;
}

/* Game Controls */
.game-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    max-width: 98vw;
    width: 98vw;
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    overflow-wrap: anywhere;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #333;
}

.final-stats {
    margin: 20px 0;
}

.stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

#player-name {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    margin: 15px 0;
}

/* Leaderboard Styles */
.leaderboard-entry {
    display: grid;
    grid-template-columns: 50px 2fr 1fr 1fr 1fr;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem;
    margin-bottom: 0.75rem;
    background: var(--neutral-50);
    border-radius: 12px;
    border: 1px solid var(--neutral-200);
    font-size: 1rem;
    transition: all 0.3s ease;
    min-width: 0;
    overflow: hidden;
}

/* Allow grid children to shrink and wrap without causing overflow */
.leaderboard-entry > * {
    min-width: 0;
}

/* Let names wrap to avoid being cut off on narrow screens */
.name {
    font-weight: 600;
    white-space: normal;
    overflow-wrap: anywhere;
}

.leaderboard-entry:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.leaderboard-entry:nth-child(1) {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    font-weight: 600;
    border: none;
}

.leaderboard-entry:nth-child(2) {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    color: white;
    font-weight: 600;
    border: none;
}

.leaderboard-entry:nth-child(3) {
    background: linear-gradient(135deg, #cd7f32, #b8860b);
    color: white;
    font-weight: 600;
    border: none;
}

.rank {
    font-weight: 700;
    text-align: center;
    font-size: 1.1rem;
}

.name {
    font-weight: 600;
}

.value {
    text-align: right;
    font-weight: 700;
    white-space: nowrap;
}

.return {
    text-align: right;
    font-weight: 700;
    white-space: nowrap;
}

.return.positive {
    color: var(--accent-green);
}

.return.negative {
    color: var(--accent-red);
}

.leaderboard-entry:nth-child(-n+3) .return.positive,
.leaderboard-entry:nth-child(-n+3) .return.negative {
    color: white;
    opacity: 0.9;
}

.date {
    text-align: right;
    font-size: 0.85rem;
    opacity: 0.8;
    white-space: nowrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .welcome-header h1 {
        font-size: 3rem;
    }

    .tagline {
        font-size: 1.25rem;
    }

    .game-preview {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .welcome-actions {
        flex-direction: column;
        align-items: center;
    }

    .creator-line {
        flex-direction: column;
        gap: 0.25rem;
    }

    .creator-name {
        font-size: 1.1rem;
    }

    .creator-school {
        font-size: 0.8rem;
    }

    .welcome-footer {
        flex-direction: column;
        gap: 0.5rem;
    }

    .separator {
        display: none;
    }



    .btn-primary.large, .btn-secondary {
        width: 100%;
        max-width: 300px;
    }

    .game-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .allocation-overview {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }

    .strategy-presets {
        grid-template-columns: 1fr;
    }

    .market-changes {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .chart-controls {
        width: 100%;
        justify-content: center;
    }

    .leaderboard-entry {
        grid-template-columns: 30px 1fr 80px 70px;
        gap: 0.5rem;
        font-size: 0.85rem;
    }

    .leaderboard-entry .date {
        display: none;
    }

    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
        width: 98vw;
        max-width: 98vw;
    }
}

@media (max-width: 480px) {
    .welcome-header h1 {
        font-size: 2.5rem;
    }

    .game-container {
        padding: 0;
    }

    .strategy-section,
    .allocation-overview,
    .event-section,
    .chart-section {
        margin: 1rem;
        padding: 1.5rem;
    }

    .market-changes {
        grid-template-columns: 1fr;
    }

    /* Tutorial Mobile Styles */
    .tutorial-slide h1 {
        font-size: 2rem;
    }

    .tutorial-subtitle {
        font-size: 1.2rem;
    }

    .investment-types {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .strategy-demo {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .flow-step {
        min-width: 300px;
        padding: 1.5rem;
    }

    .tutorial-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .tutorial-navigation button {
        width: 100%;
        max-width: 300px;
    }

    .tutorial-navigation {
        position: absolute;
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        transform: none;
        justify-content: center;
        min-width: auto;
        padding: 1rem 1.5rem;
    }

    .tutorial-navigation .btn-primary,
    .tutorial-navigation .btn-secondary {
        min-width: 100px;
        font-size: 0.9rem;
        padding: 0.75rem 1.5rem;
    }

    /* Mobile Report Overlay */
    .report-content {
        padding: 1.5rem;
        margin: 0.5rem;
        max-height: 95vh;
    }

    .report-header h1 {
        font-size: 2rem;
    }

    .performance-summary {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .before-after {
        flex-direction: column;
        gap: 1rem;
    }

    .value-box .value {
        font-size: 1.5rem;
    }

    .breakdown-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: center;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .action-buttons .btn-primary,
    .action-buttons .btn-secondary {
        width: 100%;
        max-width: 300px;
    }

    /* Results Screen Mobile */
    .results-header h1 {
        font-size: 2rem;
    }

    .results-subtitle {
        font-size: 1.2rem;
    }

    .before-after {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .change-arrow {
        order: 2;
        transform: rotate(90deg);
    }

    .portfolio-after {
        order: 3;
    }

    .portfolio-value-big {
        font-size: 2rem;
    }

    .what-happened,
    .learning-section,
    .portfolio-change-visual {
        padding: 2rem;
    }

    .event-title-big {
        font-size: 1.5rem;
    }

    .event-description-simple {
        font-size: 1.1rem;
    }

    /* Testimonials Modal Mobile */
    .testimonials-modal {
        max-width: 98%;
        width: 98%;
        margin: 1rem;
    }

    .testimonials-header {
        padding: 1.5rem 1rem;
    }

    .testimonials-header h2 {
        font-size: 2rem;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem;
    }

    .testimonial-card {
        padding: 1rem;
    }

    .testimonials-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .testimonials-stats .stat {
        padding: 1rem;
    }

    .testimonials-stats .stat-number {
        font-size: 1.5rem;
    }

    /* Flowing About Modal Mobile */
    .about-flow {
        max-width: 98%;
        width: 98%;
        margin: 1rem;
    }

    .about-title h2 {
        font-size: 2rem;
    }

    .creator-intro {
        padding: 1.5rem;
    }

    .creator-intro h3 {
        font-size: 1.3rem;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-50px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05) translateY(0);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes loadingProgress {
    0% {
        width: 0%;
        transform: translateX(-100%);
    }
    50% {
        width: 100%;
        transform: translateX(0%);
    }
    100% {
        width: 100%;
        transform: translateX(100%);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(245, 158, 11, 0.3);
    }
    100% {
        box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
    }
}

@keyframes selectedPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(37, 99, 235, 0.7);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 20px rgba(37, 99, 235, 0.4);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(37, 99, 235, 0.7);
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-100px) rotate(180deg);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes stackPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.event-section {
    animation: slideIn 0.6s ease;
}

.strategy-section,
.allocation-overview,
.chart-section {
    animation: fadeIn 0.5s ease;
}

.portfolio-summary .value {
    animation: pulse 0.6s ease;
}

/* Loading state for buttons */
.btn-primary.loading {
    position: relative;
    color: transparent;
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Smooth transitions */
* {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hide scrollbar but keep functionality */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--neutral-100);
}

::-webkit-scrollbar-thumb {
    background: var(--neutral-300);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-400);
}

/* Focus styles for accessibility */
button:focus,
input:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Utility classes */
.hidden {
    display: none !important;
}

.fade-out {
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.5s ease;
}

.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease;
}
