@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700;900&display=swap');

:root {
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    --card-bg: rgba(30, 41, 59, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
}

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

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Roboto', sans-serif;
    background: radial-gradient(circle at top right, var(--bg-dark), var(--bg-darker));
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#wizardFlow {
    background: transparent;
    min-height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 800px;
    position: relative;
    z-index: 1;
}

/* Background floating elements for aesthetics */
#bgDecor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.bg-shape {
    position: absolute;
    filter: blur(100px);
    z-index: 0;
    opacity: 0.5;
}
.shape-1 {
    top: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    background: var(--accent-blue);
    border-radius: 50%;
    max-width: 50vw; /* Prevent huge overflow */
}
.shape-2 {
    bottom: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: var(--accent-purple);
    border-radius: 50%;
    max-width: 70vw; /* Prevent huge overflow */
}
.bg-shape {
    pointer-events: none; /* Ensure icons aren't blocked */
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeUp 0.8s ease-out;
}

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

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 3rem;
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.header p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 2px;
}

/* Sliders */
.form-group {
    margin-bottom: 30px;
}

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

.slider-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e2e8f0;
}

.slider-value {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.15);
    padding: 4px 12px;
    border-radius: 8px;
    min-width: 80px;
    text-align: center;
}

input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 28px;
    width: 28px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    margin-top: -10px;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
    border: 4px solid var(--accent-purple);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.btn {
    width: 100%;
    padding: 18px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 10px 30px -5px rgba(139, 92, 246, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px -5px rgba(139, 92, 246, 0.7);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    box-shadow: none;
    text-decoration: none;
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Loading Overlay */
#loader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-darker);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.countdown {
    font-size: 8rem;
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulse 0.3s infinite alternate;
}

@keyframes pulse {
    from { transform: scale(0.9); opacity: 0.8; }
    to { transform: scale(1.1); opacity: 1; }
}

.loader-text {
    margin-top: 20px;
    font-size: 1.5rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
}

/* Report View */
.report-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, background 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.06);
}

.stat-box.golden {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.15));
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.1);
}

.stat-value {
    font-size: 3.5rem;
    font-weight: 900;
    margin: 10px 0;
    font-variant-numeric: tabular-nums;
}

.golden .stat-value {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 4.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chart-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
    height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.actions .btn {
    margin-top: 0;
    flex: 1;
}

.share-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 10px 30px -5px rgba(16, 185, 129, 0.5);
}
.share-btn:hover {
    box-shadow: 0 15px 35px -5px rgba(16, 185, 129, 0.7);
}

/* --- Multi-Step Wizard Styles --- */

#wizardFlow {
    width: 100%;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.step {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.step.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.shock-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 50px; /* adjusted to accommodate sub-text in layout */
    background: linear-gradient(180deg, #ffffff, #9ca3af);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.shock-question {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--text-primary);
}

/* Age Selector */
.age-selector {
    position: relative;
    height: 150px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 30px;
    overflow: hidden;
    background: rgba(0,0,0,0.2);
    border-radius: 20px;
    border: 1px solid var(--border-color);
}
.age-selector::before, .age-selector::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 50px;
    pointer-events: none;
    z-index: 2;
}
.age-selector::before {
    top: 0;
    background: linear-gradient(to bottom, var(--card-bg), transparent);
}
.age-selector::after {
    bottom: 0;
    background: linear-gradient(to top, var(--card-bg), transparent);
}
.age-scroller {
    height: 100%;
    overflow-y: scroll;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 50px 0;
    scroll-behavior: smooth;
}
.age-scroller::-webkit-scrollbar {
    display: none;
}
.age-item {
    font-size: 2rem;
    color: var(--text-secondary);
    padding: 10px 0;
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0.5;
}
.age-item.selected {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--accent-blue);
    opacity: 1;
    transform: scale(1.1);
}

/* Slider Overrides for Wizard */
.slider-group {
    width: 100%;
    max-width: 400px;
    margin: 0 auto 40px;
}
.slider-group .big-value {
    font-size: 4rem;
    font-weight: 900;
    color: var(--accent-purple);
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}
.slider-group .big-value small {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-left: 5px;
}
.slider-group input[type=range] {
    width: 100%;
}
.slider-group input[type=range]::-webkit-slider-thumb {
    width: 36px;
    height: 36px;
    margin-top: -14px;
}

.btn-giant {
    font-size: 1.6rem;
    padding: 20px 40px;
    border-radius: 50px;
    max-width: 350px;
    margin: 0 auto;
}

/* --- Viral Report 6-Screen Scrolling Styles --- */

.viral-report-container {
    width: 100%;
    height: 100vh;
    overflow-y: scroll;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    background: radial-gradient(circle at top right, var(--bg-dark), var(--bg-darker));
}

.viral-report-container::-webkit-scrollbar {
    display: none;
}

.report-screen {
    width: 100%;
    min-height: 100vh;
    scroll-snap-align: start;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: relative;
    padding: 60px 20px;
}

.screen-content {
    max-width: 600px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 2;
}

.w-100 { width: 100%; }
.text-left { text-align: left; }
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-20 { margin-top: 5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-10 { margin-bottom: 2.5rem; }

/* typography */
.mega-text {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.2;
    background: linear-gradient(180deg, #ffffff, #9ca3af);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.sub-text {
    font-size: 1.4rem;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 2px;
}

.highlight {
    color: var(--accent-blue);
    -webkit-text-fill-color: var(--accent-blue);
    font-size: 5rem;
}

.text-golden {
    background: linear-gradient(135deg, #fde047, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glow {
    text-shadow: 0 0 40px rgba(245, 158, 11, 0.4);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

/* Live clock */
.live-clock {
    font-size: 1.5rem;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 30px;
    border-radius: 16px;
    display: inline-block;
    backdrop-filter: blur(10px);
}
.time-block {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--accent-purple);
    font-size: 2rem;
    display: inline-block;
    min-width: 45px;
}
.clock-giant {
    padding: 30px 40px;
    border-radius: 24px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.clock-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
}
.clock-unit {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 400;
}
.time-days {
    font-size: 7rem;   /* fallback / desktop via specificity below */
    letter-spacing: -2px;
    line-height: 1;
}
.clock-giant .time-block {
    font-size: 2rem;
    margin: 0 2px;
}
/* Must come AFTER .time-block to win the cascade */
.clock-giant .time-days {
    font-size: 7rem;
    letter-spacing: -2px;
    line-height: 1;
}

.scroll-prompt {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-secondary);
    font-size: 1rem;
    letter-spacing: 2px;
}
.scroll-bounce {
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-7px); }
}

/* Time progress bars */
.progress-container {
    width: 100%;
}
.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    color: #e2e8f0;
    margin-bottom: 8px;
    font-weight: 700;
}
.progress-bar {
    width: 100%;
    height: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Life Grid */
.grid-legend {
    font-size: 1rem;
    color: var(--text-secondary);
}
.grid-legend .box {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 5px;
    border: 1px solid rgba(255,255,255,0.2);
}
.grid-legend .box.filled {
    background: var(--text-secondary);
    border-color: var(--text-secondary);
}
.grid-legend .box.sleep { background: #6366f1; border-color: #6366f1; }
.grid-legend .box.work { background: #eab308; border-color: #eab308; }
.grid-legend .box.ent { background: #ec4899; border-color: #ec4899; }
.grid-legend .box.eat { background: #f97316; border-color: #f97316; }
.grid-legend .box.misc { background: #8b5cf6; border-color: #8b5cf6; }
.grid-legend .box.free { background: #10b981; border-color: #10b981; box-shadow: 0 0 5px #10b981; }
.life-grid {
    display: grid;
    grid-template-columns: repeat(52, 1fr);
    gap: 3px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}
.grid-box {
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    border-radius: 1px;
}
.grid-box.filled {
    background: var(--text-secondary);
    border-color: var(--text-secondary);
}
.grid-box.sleep { background: #6366f1; border-color: #6366f1; }
.grid-box.work { background: #eab308; border-color: #eab308; }
.grid-box.ent { background: #ec4899; border-color: #ec4899; }
.grid-box.eat { background: #f97316; border-color: #f97316; }
.grid-box.misc { background: #8b5cf6; border-color: #8b5cf6; }
.grid-box.free { background: #10b981; border-color: #10b981; box-shadow: 0 0 5px #10b981; }
.grid-box {
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: crosshair;
}

/* Region-based highlighting triggered by parent class */
#lifeGrid.hover-filled .grid-box.filled,
#lifeGrid.hover-sleep .grid-box.sleep,
#lifeGrid.hover-work .grid-box.work,
#lifeGrid.hover-ent .grid-box.ent,
#lifeGrid.hover-eat .grid-box.eat,
#lifeGrid.hover-misc .grid-box.misc,
#lifeGrid.hover-free .grid-box.free {
    transform: scale(1.3);
    z-index: 10;
    filter: brightness(1.6) saturate(1.2);
    box-shadow: 0 0 12px currentColor;
    border-color: #fff;
}

.grid-tooltip {
    position: fixed;
    pointer-events: none;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 1rem;
    color: #fff;
    z-index: 9999; /* Ensure it is above everything */
    display: none;
    box-shadow: 0 15px 35px rgba(0,0,0,0.7), 0 0 20px rgba(59, 130, 246, 0.2);
    white-space: nowrap;
    transition: opacity 0.15s ease;
}

.grid-tooltip.active {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.grid-tooltip .tooltip-title {
    font-weight: 900;
    font-size: 1.1rem;
    color: var(--accent-blue);
    letter-spacing: 1px;
}

.grid-tooltip .tooltip-detail {
    font-size: 0.9rem;
    color: #cbd5e1;
    font-weight: 400;
}

/* Action buttons vertical */
.action-buttons-vertical {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.btn-hero {
    max-width: 520px !important;
    padding: 35px 50px !important;
    border-radius: 30px !important;
    height: auto !important;
    gap: 25px !important;
}

.btn-hero .btn-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}

.btn-hero .line-1 {
    font-size: 1.3rem;
    opacity: 0.9;
    font-weight: 400;
    letter-spacing: 1px;
}

.btn-hero .line-2 {
    font-size: 2.2rem;
    font-weight: 900;
    white-space: nowrap;
}

.btn-hero i {
    font-size: 3rem;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.3));
}

@media (max-width: 600px) {
    .report-grid { grid-template-columns: 1fr; }
    .stat-box.golden { grid-column: span 1; }
    .actions { flex-direction: column; }
    .header h1 { font-size: 2.2rem; }
    .stat-value { font-size: 2.5rem; }
    .golden .stat-value { font-size: 3.5rem; }
    .shock-title { font-size: 2.5rem; margin-bottom: 20px; word-break: break-word; }
    .shock-question { font-size: 1.8rem; word-break: break-word; }
    
    .mega-text { font-size: 2.4rem; word-break: break-word; }
    .highlight { font-size: 3rem; }
    .clock-giant { padding: 20px 15px; }
    .clock-giant .time-block { font-size: 1.5rem; }
    .clock-giant .time-days { font-size: 4.5rem; letter-spacing: -1px; }
    .clock-unit { font-size: 0.9rem; }
    .life-grid { gap: 1px; padding: 10px; }
    #soulPart2 { font-size: 3rem !important; }

    .btn-hero {
        padding: 25px 20px !important;
        max-width: 90% !important;
        gap: 15px !important;
    }
    .btn-hero .line-1 { font-size: 1.1rem; }
    .btn-hero .line-2 { font-size: 1.5rem; }
    .btn-hero i { font-size: 2rem; }
}

/* --- Life Reduction Game "Nuclear" Styles --- */
.game-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #020617;
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    padding: 30px 20px; /* Increased top/bottom padding */
    align-items: center;
    justify-content: center;
    overflow-y: auto; /* Enable scrolling */
    -webkit-overflow-scrolling: touch;
}

.game-overlay.active {
    display: flex;
    opacity: 1;
}

.game-container {
    max-width: 800px;
    width: 100%;
    text-align: center;
    margin: auto; /* This centers content in flex while allowing overflow scroll to reach top */
}

.game-stage {
    display: none;
    animation: fadeIn 0.8s ease;
}

.game-stage.active {
    display: block;
}

.game-title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.game-title small {
    font-size: 1.2rem;
    color: #ef4444;
    text-transform: uppercase;
    display: block;
    margin-top: 5px;
}

.game-desc {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.dream-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.dream-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    /* Spring-like transition for scale and shadow */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.4s ease, 
                background-color 0.4s ease, 
                border-color 0.4s ease, 
                opacity 0.4s ease, 
                filter 0.4s ease;
    opacity: 0.3;
    filter: grayscale(1);
    transform: scale(0.95);
}

.dream-card:hover {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

.dream-card i {
    font-size: 2rem;
    transition: transform 0.3s ease;
}

.dream-card span {
    font-size: 1rem;
    font-weight: 600;
}

.dream-card.selected {
    opacity: 1;
    filter: grayscale(0);
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--accent-blue);
    color: var(--text-primary);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.25), inset 0 0 0 1px rgba(59, 130, 246, 0.5);
    transform: scale(1);
}

.dream-card.selected:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.4), inset 0 0 0 1px rgba(59, 130, 246, 0.6);
}

.dream-card.selected:hover i {
    transform: scale(1.1) translateY(-2px);
}

.game-stage#gameStage1 .dream-card {
    cursor: default;
    opacity: 1;
    filter: grayscale(0);
    transform: scale(1);
}

.game-stage#gameStage1 .dream-card:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(255,255,255,0.1);
}

.game-status {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #e2e8f0;
}

.highlight-num {
    color: #ef4444;
    font-weight: 900;
    font-size: 1.8rem;
    margin: 0 5px;
}

.text-warning { color: #eab308; }
.text-danger { color: #f97316; }
.text-critical { color: #ef4444; }

.btn.disabled {
    opacity: 0.3;
    pointer-events: none;
    transform: scale(0.98);
}

.revelation-content {
    animation: zoomIn 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.final-dream {
    font-size: 6rem;
    font-weight: 950;
    background: linear-gradient(135deg, #fff, #ef4444);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 60px rgba(239, 68, 68, 0.5);
    margin: 30px 0;
}

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

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 600px) {
    .game-overlay {
        align-items: flex-start; /* Ensure top isn't cut off on long content */
    }
    .game-title { font-size: 1.8rem; margin-bottom: 15px; }
    .game-desc { font-size: 1.1rem; margin-bottom: 25px; }
    .dream-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px; 
    }
    .dream-card {
        padding: 12px 10px;
        border-radius: 12px;
        gap: 8px;
    }
    .dream-card i { font-size: 1.5rem; }
    .dream-card span { font-size: 0.85rem; }
    .final-dream { font-size: 3rem; }
    .game-status { font-size: 1rem; margin-bottom: 15px; }
    .highlight-num { font-size: 1.4rem; }
}

/* Global Top Nav */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    width: 100%;
    z-index: 100;
}

.top-nav a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 6px 12px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

.top-nav a:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.2);
}
 
 / *   G l o b a l   T o p   N a v   * / 
 . t o p - n a v   { 
         d i s p l a y :   f l e x ; 
         j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
         a l i g n - i t e m s :   c e n t e r ; 
         m a r g i n - b o t t o m :   2 5 p x ; 
         w i d t h :   1 0 0 % ; 
         z - i n d e x :   1 0 0 ; 
 } 
 . t o p - n a v   a   { 
         c o l o r :   # 6 4 7 4 8 b ; 
         t e x t - d e c o r a t i o n :   n o n e ; 
         f o n t - s i z e :   0 . 8 5 r e m ; 
         p a d d i n g :   6 p x   1 2 p x ; 
         b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 0 8 ) ; 
         b o r d e r - r a d i u s :   8 p x ; 
         t r a n s i t i o n :   a l l   0 . 2 s ; 
         w h i t e - s p a c e :   n o w r a p ; 
 } 
 . t o p - n a v   a : h o v e r   { 
         c o l o r :   # f f f ; 
         b o r d e r - c o l o r :   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 2 ) ; 
 } 
  
 