/* ==========================================================================
   8-BIT RETRO DESIGN SYSTEM - EMPATHETIC CAFE (MOBILE-FIRST)
   ========================================================================== */

/* --- Font Definitions (Local Files) --- */
@font-face {
    font-family: 'Press Start 2P';
    src: url('fonts/PressStart2P-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('fonts/JetBrainsMono-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('fonts/JetBrainsMono-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* --- Core Variables --- */
:root {
    --bg-color: #0b0b0c;
    --bg-darker: #020202;
    --bg-card: #121214;
    
    --orange-primary: #ff6600;
    --orange-bright: #ff8833;
    --orange-dim: #993d00;
    --orange-glow: rgba(255, 102, 0, 0.25);
    --orange-glow-heavy: rgba(255, 102, 0, 0.5);
    
    --text-color: #f0f0f0;
    --text-dim: #a0a0a5;
    --warn-color: #ff3c3c;
    --warn-glow: rgba(255, 60, 60, 0.3);
    --success-color: #44cc44;
    --success-glow: rgba(68, 204, 68, 0.3);
    
    --pixel-border-width: 2px;
    
    --font-heading: 'Press Start 2P', monospace;
    --font-body: 'JetBrains Mono', monospace;
}

/* --- Base Reset & Typography --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    background-color: var(--bg-darker);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
    font-size: 16px;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(255, 102, 0, 0.03) 0%, transparent 70%),
        radial-gradient(ellipse at 80% 80%, rgba(255, 102, 0, 0.02) 0%, transparent 50%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 102, 0, 0.015) 2px,
            rgba(255, 102, 0, 0.015) 3px
        );
    pointer-events: none;
    z-index: 1;
}

/* Base Pixel Backdrop (Mobile) */
.pixel-backdrop {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.55;
    background:
        linear-gradient(rgba(255, 102, 0, 0.18) 0 0) 5% 16% / 8px 8px no-repeat,
        linear-gradient(rgba(255, 136, 51, 0.14) 0 0) 92% 24% / 16px 8px no-repeat,
        linear-gradient(rgba(255, 102, 0, 0.12) 0 0) 8% 62% / 16px 16px no-repeat,
        linear-gradient(rgba(255, 136, 51, 0.12) 0 0) 88% 84% / 8px 8px no-repeat;
}

@media (min-width: 481px) {
    .pixel-backdrop {
        opacity: 0.72;
        background:
            linear-gradient(rgba(255, 102, 0, 0.24) 0 0) 7% 14% / 8px 8px no-repeat,
            linear-gradient(rgba(255, 136, 51, 0.18) 0 0) 11% 19% / 16px 8px no-repeat,
            linear-gradient(rgba(255, 102, 0, 0.12) 0 0) 91% 12% / 8px 16px no-repeat,
            linear-gradient(rgba(255, 136, 51, 0.18) 0 0) 86% 22% / 24px 8px no-repeat,
            linear-gradient(rgba(255, 102, 0, 0.16) 0 0) 4% 43% / 16px 16px no-repeat,
            linear-gradient(rgba(255, 136, 51, 0.12) 0 0) 94% 48% / 8px 8px no-repeat,
            linear-gradient(rgba(255, 102, 0, 0.14) 0 0) 15% 72% / 24px 8px no-repeat,
            linear-gradient(rgba(255, 136, 51, 0.16) 0 0) 82% 78% / 16px 16px no-repeat,
            linear-gradient(rgba(240, 240, 240, 0.08) 0 0) 9% 86% / 8px 8px no-repeat,
            linear-gradient(rgba(240, 240, 240, 0.06) 0 0) 89% 88% / 8px 8px no-repeat;
    }

    .pixel-backdrop::before,
    .pixel-backdrop::after {
        content: '';
        position: absolute;
        width: 56px;
        height: 56px;
        background:
            linear-gradient(rgba(255, 102, 0, 0.18) 0 0) 0 0 / 8px 8px no-repeat,
            linear-gradient(rgba(255, 102, 0, 0.12) 0 0) 16px 8px / 8px 8px no-repeat,
            linear-gradient(rgba(255, 136, 51, 0.16) 0 0) 32px 16px / 16px 8px no-repeat,
            linear-gradient(rgba(240, 240, 240, 0.06) 0 0) 24px 32px / 8px 8px no-repeat;
    }

    .pixel-backdrop::before {
        left: 2vw;
        top: 58vh;
    }

    .pixel-backdrop::after {
        right: 3vw;
        top: 34vh;
        transform: scaleX(-1);
    }
}

/* --- CRT Screen Simulation --- */
body.crt-active {
    /* Removed heavy body opacity animation to fix scroll lag */
}

/* GPU acceleration for overlays to prevent repaint on scroll */
.pixel-backdrop,
.crt-overlay,
.crt-scanlines {
    transform: translateZ(0);
}

body.crt-active .crt-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0,0,0,0) 60%, rgba(0,0,0,0.85) 100%);
    pointer-events: none;
    z-index: 9999;
    animation: crt-flicker 0.15s infinite;
}

body.crt-active .crt-scanlines {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%, 
        rgba(0, 0, 0, 0.25) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 9998;
}

/* Scanning line animation */
body.crt-active::after {
    content: " ";
    display: block;
    position: fixed;
    inset: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(255, 102, 0, 0.08) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.04), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.04));
    z-index: 9997;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 12px;
}
::-webkit-scrollbar-track {
    background: var(--bg-darker);
    border-left: 2px solid var(--orange-dim);
}
::-webkit-scrollbar-thumb {
    background: var(--orange-primary);
    border: 2px solid var(--bg-darker);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--orange-bright);
}

/* --- Hero Image --- */
.hero-image-section {
    grid-column: 1 / -1;
}

.hero-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 15px;
    border: 2px solid rgba(255, 102, 0, 0.3);
    box-shadow: 0 0 12px rgba(255, 102, 0, 0.1);
    border-radius: 6px;
}

/* --- Layout Container --- */
.app-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 12px; /* Mobile base */
    position: relative;
    z-index: 2;
}

@media (min-width: 768px) {
    .app-container {
        padding: 15px 20px;
    }
}

/* --- Retro Header --- */
.retro-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
    border: 2px solid rgba(255, 102, 0, 0.3);
    background-color: var(--bg-color);
    padding: 18px 14px; /* Mobile base */
    margin-bottom: 15px;
    position: relative;
    box-shadow: 0 0 8px rgba(255, 102, 0, 0.1);
    border-radius: 6px;
}

@media (min-width: 768px) {
    .retro-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        padding: 20px;
    }
}

.header-logo-section {
    flex-grow: 1;
}

.glitch-title {
    font-family: var(--font-heading);
    font-size: 1.1rem; /* Mobile base */
    line-height: 1.4;
    color: var(--orange-primary);
    text-shadow: 0 0 8px var(--orange-glow-heavy);
    margin-bottom: 8px;
    letter-spacing: 1px;
    position: relative;
    padding-left: 0;
    overflow-wrap: anywhere;
}

@media (min-width: 768px) {
    .glitch-title {
        font-size: 1.8rem;
        padding-left: 25px;
        letter-spacing: 2px;
        overflow-wrap: normal;
    }
}

.subtitle {
    font-family: var(--font-body);
    font-size: 0.72rem; /* Mobile base */
    color: var(--text-dim);
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: pre-wrap;
    padding-left: 0;
}

@media (min-width: 768px) {
    .subtitle {
        font-size: 0.9rem;
        padding-left: 25px;
        letter-spacing: 3px;
    }
}

.subtitle-accent {
    color: #ff7a33;
    text-shadow: 0 0 7px rgba(255, 60, 32, 0.45), 0 0 12px rgba(255, 102, 0, 0.28);
}

.pixel-cross {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--orange-primary);
    position: absolute;
    pointer-events: none;
}

.card-content .pixel-cross {
    position: static;
    display: block;
    text-align: center;
    margin: 4px 0;
}

.card-content .pixel-cross:first-child {
    margin-top: 0;
}

.card-content .pixel-cross:last-child {
    margin-top: 8px;
    margin-bottom: 0;
}

.pixel-cross.top-left {
    top: 8px;
    left: 8px;
}
.pixel-cross.top-right {
    top: 8px;
    right: 8px;
}

/* --- Controls Panel --- */
.controls-panel {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center; /* Mobile base */
    padding-right: 0;
}

@media (min-width: 768px) {
    .controls-panel {
        justify-content: flex-end;
        padding-right: 25px;
    }
}

.control-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.control-label {
    font-family: var(--font-heading);
    font-size: 0.55rem;
    color: var(--text-dim);
}

.retro-btn {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    background-color: var(--bg-darker);
    color: var(--text-dim);
    border: 2px solid var(--text-dim);
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.1s ease;
    max-width: 100%;
}

.retro-btn:hover {
    color: var(--orange-primary);
    border-color: var(--orange-primary);
    box-shadow: 0 0 8px var(--orange-glow);
}

.retro-btn.active {
    background-color: var(--orange-primary);
    color: var(--bg-darker);
    border-color: var(--orange-primary);
    box-shadow: 0 0 10px var(--orange-glow-heavy);
    text-shadow: none;
}

/* --- Dashboard Grid --- */
.retro-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile base */
    gap: 18px;
}

@media (min-width: 768px) {
    .retro-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* --- Retro Cards --- */
.retro-card {
    background-color: var(--bg-card);
    border: 9px solid rgba(255, 102, 0, 0.25);
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    border-radius: 6px;
    max-width: 100%;
}

.retro-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 8px;
    border: 2px solid rgba(255, 102, 0, 0.08);
    pointer-events: none;
}

.retro-card:hover {
    border-color: rgba(255, 102, 0, 0.45);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 12px rgba(255, 102, 0, 0.08);
    background-color: rgba(255, 102, 0, 0.02);
}

.retro-card:hover .card-header {
    background-color: rgba(255, 102, 0, 0.06);
    border-bottom-color: rgba(255, 102, 0, 0.4);
}

.retro-card.double-column,
.retro-card.full-width {
    grid-column: span 1; /* Mobile base */
}

@media (min-width: 768px) {
    .retro-card.double-column,
    .retro-card.full-width {
        grid-column: span 2;
    }
}

.card-header {
    background-color: var(--bg-darker);
    border-bottom: 2px dotted rgba(255, 102, 0, 0.25);
    padding: 12px 14px; /* Mobile base */
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (min-width: 768px) {
    .card-header {
        padding: 12px 20px;
    }
}

.card-header h2 {
    font-family: var(--font-heading);
    font-size: 0.72rem; /* Mobile base */
    line-height: 1.5;
    color: var(--orange-primary);
    letter-spacing: 1px;
}

@media (min-width: 768px) {
    .card-header h2 {
        font-size: 0.9rem;
    }
}

.card-content {
    padding: 18px; /* Mobile base */
    flex-grow: 1;
}

@media (min-width: 768px) {
    .card-content {
        padding: 24px;
    }
}

/* --- Empathy Quote --- */
.empathy-quote {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-color);
    text-align: center;
    padding: 10px 15px;
    margin: 5px auto 20px;
    opacity: 0.9;
    max-width: 800px;
    line-height: 1.5;
}

@media (min-width: 768px) {
    .empathy-quote {
        font-size: 1.25rem;
        padding: 15px 30px;
        margin: 5px auto 20px;
    }
}

/* --- Hero Section --- */
.hero-section {
    grid-column: span 1; /* Match mobile base */
    border-color: rgba(255, 136, 51, 0.55);
    box-shadow: 0 0 12px rgba(255, 102, 0, 0.15);
}

@media (min-width: 768px) {
    .hero-section {
        grid-column: span 2;
    }
}

.hero-section .card-header {
    border-bottom-color: var(--orange-bright);
}

.status-indicator {
    width: 10px;
    height: 10px;
    display: inline-block;
}

.status-indicator.online {
    background-color: #00ff00;
    box-shadow: 0 0 8px #00ff00;
}

.status-indicator.offline {
    background-color: var(--warn-color);
    box-shadow: 0 0 8px var(--warn-glow);
}

#status-text {
    font-weight: 700;
}

.status-word.status-online {
    color: #00ff66;
    text-shadow: 0 0 8px rgba(0, 255, 102, 0.65), 0 0 16px rgba(0, 255, 102, 0.25);
}

.status-word.status-offline {
    color: #ff3c3c;
    text-shadow: 0 0 8px rgba(255, 60, 60, 0.65), 0 0 16px rgba(255, 60, 60, 0.25);
}

.status-detail {
    color: var(--orange-primary);
    text-shadow: 0 0 6px var(--orange-glow);
}

.promo-text {
    font-family: var(--font-heading);
    font-size: 1.1rem; /* Mobile base */
    line-height: 1.35;
    margin: 15px 0;
    letter-spacing: 1px;
    
    /* Gentle bottom-to-top wave */
    background: linear-gradient(
        0deg,
        var(--orange-bright) 0%,
        var(--orange-bright) 45%,
        #fff 50%,
        var(--orange-bright) 55%,
        var(--orange-bright) 100%
    );
    background-size: 100% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px var(--orange-glow));
    animation: wave-up 4s linear infinite;
}

@media (min-width: 768px) {
    .promo-text {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }
}

@keyframes wave-up {
    0% {
        background-position: 0% 200%;
    }
    100% {
        background-position: 0% 0%;
    }
}

.highlight-text {
    font-size: 1rem; /* Mobile base */
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 24px;
    border-left: 4px solid var(--orange-primary);
    padding-left: 15px;
}

@media (min-width: 768px) {
    .highlight-text {
        font-size: 1.15rem;
    }
}

.action-zone {
    display: flex;
    flex-direction: column; /* Mobile base */
    align-items: stretch;
    gap: 12px;
}

@media (min-width: 768px) {
    .action-zone {
        flex-direction: row;
        justify-content: center;
        gap: 20px;
    }
}

.hero-info-row {
    display: grid;
    grid-template-columns: 1fr; /* Mobile base */
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px dotted rgba(255, 102, 0, 0.25);
}

@media (min-width: 768px) {
    .hero-info-row {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

.hero-info-item {
    font-size: 0.9rem;
    padding: 10px 15px;
    background-color: var(--bg-darker);
    border: 2px solid rgba(255, 102, 0, 0.2);
    text-align: center;
}

.info-date {
    color: var(--orange-bright);
    font-weight: bold;
    letter-spacing: 1px;
}

.info-cost {
    color: var(--text-color);
    letter-spacing: 1px;
}

.donate-link {
    color: var(--orange-bright);
    text-decoration: none;
    border-bottom: 2px dotted #55ff55;
    transition: all 0.15s ease;
}

.donate-link:hover {
    color: var(--text-color);
    border-bottom-color: #aaffaa;
    text-shadow: 0 0 8px var(--orange-glow);
}

/* --- Pixel Buttons --- */
.pixel-btn {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    width: 100%; /* Mobile base */
    min-height: 48px;
    padding: 13px 14px;
    text-align: center;
    line-height: 1.4;
    border: 2px solid;
    cursor: pointer;
    position: relative;
    background-color: var(--bg-darker);
    transition: transform 0.05s ease, box-shadow 0.1s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

@media (min-width: 768px) {
    .pixel-btn {
        width: auto;
        padding: 15px 25px;
    }
}

.pixel-btn:active {
    transform: translateY(2px);
}

.pixel-btn.disabled,
.pixel-btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    border-color: var(--text-dim) !important;
    color: var(--text-dim) !important;
    box-shadow: none !important;
    background-color: var(--bg-darker) !important;
}

.pixel-btn.primary {
    border-color: var(--orange-bright);
    color: var(--orange-bright);
    box-shadow: 0 2px 0 var(--orange-dim), 0 0 6px rgba(255, 102, 0, 0.15);
}

.pixel-btn.primary:hover {
    background-color: var(--orange-primary);
    color: var(--bg-darker);
    box-shadow: 0 2px 0 var(--orange-dim), 0 0 10px var(--orange-glow-heavy);
}

.pixel-btn.secondary {
    border-color: var(--text-dim);
    color: var(--text-dim);
    box-shadow: 0 2px 0 #555555;
}

.pixel-btn.secondary:hover {
    border-color: var(--text-color);
    color: var(--text-color);
    box-shadow: 0 2px 0 #888888, 0 0 6px rgba(255,255,255,0.1);
}

/* --- About Grid Section --- */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr; /* Mobile base */
    gap: 20px;
}

@media (min-width: 768px) {
    .grid-2col {
        grid-template-columns: 1fr 1fr;
    }
}

.about-block {
    background-color: var(--bg-darker);
    border: 2px dotted rgba(255, 102, 0, 0.2);
    padding: 20px;
    border-radius: 0;
}

.about-block h3 {
    font-family: var(--font-heading);
    font-size: 0.72rem; /* Mobile base */
    line-height: 1.5;
    color: var(--orange-primary);
    margin-bottom: 15px;
    border-bottom: 2px dashed var(--orange-dim);
    padding-bottom: 8px;
}

@media (min-width: 768px) {
    .about-block h3 {
        font-size: 0.8rem;
    }
}

.about-block p {
    font-size: 0.9rem; /* Mobile base */
    margin-bottom: 12px;
    color: var(--text-color);
}

@media (min-width: 768px) {
    .about-block p {
        font-size: 0.95rem;
    }
}

.about-block p:last-child {
    margin-bottom: 0;
}

.about-block.warn-border {
    border-color: var(--warn-color);
    box-shadow: inset 0 0 8px var(--warn-glow);
}

.about-block h3.warn-text {
    color: var(--warn-color);
    border-bottom-color: var(--warn-color);
}

.warn-highlight {
    color: #ff8888 !important;
    font-weight: bold;
    font-size: 1.05rem !important;
}

.about-block-benefit {
    grid-column: 1 / -1;
    color: var(--orange-bright);
    font-size: 1rem;
    line-height: 1.5;
    text-align: left;
    font-style: italic;
    padding-top: 15px;
    border-top: 1px dashed rgba(255, 102, 0, 0.3);
}

@media (min-width: 768px) {
    .about-block-benefit {
        font-size: 1.15rem;
        padding-top: 20px;
    }
}

/* --- Rules Section with sug.png --- */
.rules-layout {
    display: grid;
    grid-template-columns: 1fr; /* Mobile base */
    gap: 30px;
    align-items: start;
}

@media (min-width: 901px) {
    .rules-layout {
        grid-template-columns: 400px 1fr;
    }
}

/* Retro Arcade Frame for Image */
.image-frame-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
    margin: 0 auto 20px auto; /* Mobile base */
}

@media (min-width: 768px) and (max-width: 900px) {
    .image-frame-container {
        max-width: 450px;
    }
}

@media (min-width: 901px) {
    .image-frame-container {
        margin: 0;
    }
}

.arcade-cabinet-frame {
    width: 100%;
    background-color: #17171a;
    border: 2px solid rgba(255, 102, 0, 0.35);
    padding: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
    position: relative;
}

.screen-bezel {
    background-color: #151518;
    border: 4px solid #000;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.screen-bezel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0) 80%);
    pointer-events: none;
}

.rules-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    filter: contrast(1.05) brightness(1.02);
    border: 2px solid #000;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.frame-footer {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 8px 10px;
    background-color: var(--bg-darker);
    border: 2px solid var(--orange-dim);
    border-top: none;
    font-size: 0.65rem;
}

.frame-caption {
    font-family: var(--font-heading);
    color: var(--orange-primary);
    letter-spacing: 1px;
}

/* Rules Text Panel */
.rules-text-panel h3 {
    font-family: var(--font-heading);
    font-size: 0.72rem; /* Mobile base */
    line-height: 1.5;
    color: var(--orange-bright);
    margin-bottom: 20px;
    text-shadow: 0 0 6px var(--orange-glow);
}

@media (min-width: 768px) {
    .rules-text-panel h3 {
        font-size: 0.95rem;
    }
}

.pixel-list {
    list-style: none;
    margin-bottom: 25px;
}

.pixel-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    font-size: 1rem; /* Mobile base */
}

@media (min-width: 768px) {
    .pixel-list li {
        font-size: 1.25rem;
    }
}

.pixel-list li::before {
    content: "■";
    position: absolute;
    left: 0;
    color: var(--orange-primary);
    font-size: 0.8rem;
    top: 2px;
}

.action-highlight {
    background-color: var(--bg-darker);
    border-left: 4px solid var(--orange-bright);
    padding: 15px;
    margin-bottom: 20px;
}

.action-highlight h4 {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    color: var(--orange-primary);
    margin-bottom: 8px;
}

.rules-notice {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 15px;
    line-height: 1.5;
}

.warning-note {
    border: 1px dashed var(--orange-primary);
    padding: 10px;
    color: var(--text-color);
    background-color: rgba(255, 102, 0, 0.05);
}

/* --- Dialog Examples Section --- */
.dialog-examples {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 10px;
}

@media (min-width: 768px) {
    .dialog-examples {
        gap: 30px;
    }
}

.example-block {
    padding: 16px;
    border: 2px solid;
    background-color: var(--bg-darker);
}

.example-block.bad {
    border-color: var(--warn-color);
    box-shadow: inset 0 0 6px var(--warn-glow);
}

.example-block.good {
    border-color: var(--success-color);
    box-shadow: inset 0 0 6px var(--success-glow);
}

.example-label {
    font-family: var(--font-heading);
    font-size: 0.6rem;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px dotted;
}

.example-block.bad .example-label {
    color: var(--warn-color);
    border-color: var(--warn-color);
}

.example-block.good .example-label {
    color: var(--success-color);
    border-color: var(--success-color);
}

.dialog-line {
    padding: 6px 10px;
    margin-bottom: 6px;
    font-size: 0.9rem;
    line-height: 1.5;
    border-left: 3px solid;
}

.example-block.bad .dialog-line {
    border-color: rgba(255, 60, 60, 0.3);
    color: #ff9999;
}

.situation-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.situation-block {
    border: 1px solid rgba(68, 204, 68, 0.2);
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.2);
}

.situation-summary {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px dotted rgba(68, 204, 68, 0.15);
}

.response-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

@media (max-width: 480px) {
    .response-grid {
        grid-template-columns: 1fr;
    }
}

.response-grid-header {
    margin-bottom: 4px;
}

.response-col-label {
    font-family: var(--font-heading);
    font-size: 0.45rem;
    color: rgba(68, 204, 68, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 2px;
    border-bottom: 1px solid rgba(68, 204, 68, 0.1);
}

.response-col {
    color: #99ff99;
    font-size: 0.8rem;
    line-height: 1.4;
    padding: 2px 4px 2px 10px;
    border-left: 2px solid rgba(68, 204, 68, 0.2);
}

.response-col strong {
    color: #ccffcc;
    text-shadow: 0 0 6px rgba(68, 204, 68, 0.4);
}

.dialog-summary {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.8rem;
}

.dialog-hint {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
}
}

.dialog-line:last-child {
    margin-bottom: 0;
}

/* --- Quest Timeline (How it goes) --- */
.desc-text {
    color: var(--text-dim);
    margin-bottom: 20px;
}

.timeline-horizontal {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 12px 0; /* Mobile base */
    position: relative;
}

@media (min-width: 768px) {
    .timeline-horizontal {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
        padding: 20px 5px;
    }
}

.step-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0; /* Mobile base */
    flex-shrink: 0;
    cursor: default;
    padding: 4px;
    transform: none; /* Mobile base */
    transition: transform 0.2s ease;
}

@media (min-width: 768px) {
    .step-node {
        min-width: 75px;
        transform: rotate(-2deg);
    }
    .step-node:nth-child(even) {
        transform: rotate(2deg) translateY(8px);
    }
    .step-node:hover {
        transform: rotate(0deg) scale(1.08);
    }
}

.step-badge {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    background-color: var(--orange-dim);
    color: var(--bg-darker);
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--orange-primary);
    box-shadow: 0 0 6px var(--orange-glow);
    transition: all 0.2s ease;
}

.step-node:hover .step-badge {
    background-color: var(--orange-primary);
    box-shadow: 0 0 12px var(--orange-glow-heavy);
}

.step-node[data-step="1"] .step-badge,
.step-node[data-step="6"] .step-badge {
    background-color: rgba(255, 102, 0, 0.12);
    color: var(--orange-dim);
    border-color: rgba(255, 102, 0, 0.3);
}

.step-node[data-step="1"]:hover .step-badge,
.step-node[data-step="6"]:hover .step-badge {
    background-color: var(--orange-dim);
    color: var(--bg-darker);
    border-color: var(--orange-primary);
}

.step-name {
    font-family: var(--font-heading);
    font-size: 0.6rem;
    color: var(--text-dim);
    text-align: center;
    margin-top: 6px;
    line-height: 1.2;
    max-width: 100%; /* Mobile base */
    transition: color 0.2s ease;
}

@media (min-width: 768px) {
    .step-name {
        max-width: 80px;
    }
}

.step-node:hover .step-name {
    color: var(--orange-bright);
}

.step-connector {
    display: none; /* Mobile base */
    width: 20px;
    flex-shrink: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--orange-dim), var(--orange-primary));
    align-self: center;
    margin-bottom: 26px;
}

@media (min-width: 768px) {
    .step-connector {
        display: block;
    }
}

/* Global tooltip */
.timeline-tooltip {
    position: fixed;
    z-index: 10001;
    pointer-events: none;
    max-width: 260px;
    transition: opacity 0.12s ease;
}

.timeline-tooltip.hidden {
    opacity: 0;
}

.timeline-tooltip .tooltip-content {
    background-color: var(--bg-darker);
    border: 2px solid var(--orange-primary);
    padding: 10px 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.8);
    font-size: 0.75rem;
    color: var(--text-color);
    line-height: 1.4;
}

.timeline-tooltip .tooltip-step-num {
    font-family: var(--font-heading);
    font-size: 0.55rem;
    color: var(--orange-primary);
    display: block;
    margin-bottom: 4px;
}

/* --- Stats Screen --- */
.stats-screen {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: #000;
    border: 2px dotted rgba(255, 102, 0, 0.25);
    padding: 20px;
    font-family: var(--font-body);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dotted #333;
    padding-bottom: 8px;
    font-size: 0.9rem;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-name {
    color: var(--text-dim);
}

.stat-value {
    font-weight: bold;
    text-align: right;
}

.text-orange {
    color: var(--orange-bright);
}

.stats-decor {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    font-family: var(--font-heading);
    font-size: 0.6rem;
    color: var(--orange-primary);
}

/* --- RPG Inventory Section --- */
.inventory-layout {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.inventory-intro {
    color: var(--text-dim);
}

.inventory-container {
    display: grid;
    grid-template-columns: 1fr; /* Mobile base */
    gap: 25px;
}

@media (min-width: 901px) {
    .inventory-container {
        grid-template-columns: 1fr 1.2fr;
    }
}

.inventory-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile base */
    grid-auto-rows: minmax(82px, auto); /* Mobile base */
    gap: 12px;
}

@media (min-width: 768px) {
    .inventory-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 90px;
    }
}

.inventory-slot {
    background-color: var(--bg-darker);
    border: 2px solid rgba(255, 102, 0, 0.15);
    color: var(--text-dim);
    padding: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: all 0.1s ease;
    text-align: left;
}

.inventory-slot:hover {
    border-color: var(--orange-primary);
    color: var(--text-color);
    box-shadow: inset 0 0 6px var(--orange-glow);
}

.inventory-slot.active {
    border-color: rgba(255, 102, 0, 0.65);
    background-color: rgba(255, 102, 0, 0.08);
    color: var(--orange-bright);
    box-shadow: 0 0 6px rgba(255, 102, 0, 0.15), inset 0 0 6px rgba(255, 102, 0, 0.2);
}

.inventory-slot.slot-full {
    grid-column: span 1; /* Mobile base */
}

@media (min-width: 768px) {
    .inventory-slot.slot-full {
        grid-column: span 2;
    }
}

.slot-num {
    font-family: var(--font-heading);
    font-size: 0.55rem;
    position: absolute;
    top: 5px;
    left: 5px;
    color: var(--orange-dim);
}

.inventory-slot.active .slot-num {
    color: var(--orange-bright);
}

.slot-icon {
    font-size: 1.4rem;
    align-self: center;
    margin-top: 5px;
}

.slot-title {
    font-family: var(--font-heading);
    font-size: 0.52rem; /* Mobile base */
    text-align: center;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .slot-title {
        font-size: 0.58rem;
    }
}

/* Item Description Panel */
.item-description-panel {
    background-color: var(--bg-darker);
    border: 2px solid rgba(255, 136, 51, 0.5);
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 10px rgba(255, 102, 0, 0.08);
}

.item-description-panel .panel-header {
    border-bottom: 2px dotted rgba(255, 136, 51, 0.3);
    padding: 12px 18px;
    display: flex;
    flex-direction: column; /* Mobile base */
    align-items: flex-start; /* Mobile base */
    gap: 8px; /* Mobile base */
    background-color: rgba(255, 102, 0, 0.05);
}

@media (min-width: 768px) {
    .item-description-panel .panel-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.item-description-panel h3 {
    font-family: var(--font-heading);
    font-size: 0.72rem; /* Mobile base */
    line-height: 1.5;
    color: var(--orange-bright);
}

@media (min-width: 768px) {
    .item-description-panel h3 {
        font-size: 0.8rem;
    }
}

.item-type {
    font-family: var(--font-heading);
    font-size: 0.55rem;
    background-color: var(--orange-dim);
    color: var(--bg-darker);
    padding: 3px 6px;
}

.item-description-panel .panel-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
}

.item-text {
    display: none;
}

.item-text-active {
    display: block;
}

.item-title {
    display: none;
}

.item-title-active {
    display: block;
}

.item-titles-hidden {
    display: none;
}

.item-description-panel p {
    font-size: 0.9rem; /* Mobile base */
    line-height: 1.6;
    color: var(--text-color);
}

@media (min-width: 768px) {
    .item-description-panel p {
        font-size: 0.95rem;
    }
}

/* --- Retro Footer --- */
.retro-footer {
    border: 2px solid rgba(255, 102, 0, 0.25);
    background-color: var(--bg-color);
    padding: 20px;
    margin-top: 30px;
    font-size: 0.8rem;
    color: var(--text-dim);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border-radius: 6px;
}

.retro-footer .pixel-cross {
    position: static;
    margin: 5px 0;
}

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

/* --- Alerts Panel --- */
.retro-alert-box {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #000;
    border: 3px solid var(--orange-bright);
    color: var(--orange-bright);
    padding: 15px 25px;
    z-index: 10000;
    box-shadow: 0 0 15px var(--orange-glow-heavy);
    font-family: var(--font-heading);
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(0);
    opacity: 1;
}

.retro-alert-box.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.alert-border-t, .alert-border-b {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--orange-bright);
    margin: 4px 0;
}

/* --- Blinking Animations --- */
.blinking {
    animation: blink-anim 1.2s steps(2, start) infinite;
}

.blinking-fast {
    animation: blink-anim-fast 0.6s steps(2, start) infinite;
}

@keyframes blink-anim {
    to { visibility: hidden; }
}

@keyframes blink-anim-fast {
    to { opacity: 0.1; }
}

@keyframes crt-flicker {
    0% { opacity: 0.95; }
    50% { opacity: 1.0; }
    100% { opacity: 0.95; }
}