/* =========================================================================
   1. GLOBAL SYSTEM SETTINGS (The Canvas)
   ========================================================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #121212; /* Deep ink-charcoal */
    color: #E5E5E5;            /* Crisp off-white */
    font-family: 'Courier New', Courier, monospace; /* Ensures grid alignment */
    height: 100vh;
    width: 100vw;
    overflow: hidden;          /* Prevents ugly scrolling bugs on mobile */
    display: flex;
    justify-content: center;
    align-items: center;
    touch-action: manipulation; /* Disables the annoying 300ms double-tap zoom delay */
    position: fixed;
}

/* =========================================================================
   2. SCREEN STATE CONTROLLER (Hides unneeded rooms instantly)
   ========================================================================= */
.screen {
    width: 100%;
    max-width: 600px;         /* Max width for perfect mobile/PC scaling */
    height: 100%;
    max-height: 800px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* The magic utility rule that prevents screen overlap */
.hidden {
    display: none !important;
}

/* =========================================================================
   3. THE MAIN MENU & LOGO VISUALS
   ========================================================================= */
.menu-container {
    text-align: center;
    width: 100%;
}

.ascii-logo {
    font-family: monospace;
    white-space: pre;
    line-height: 1.2;
    margin-bottom: 40px;
    color: #E5E5E5;
    font-size: 14px;
}

/* =========================================================================
   4. PREMIUM HOVER TEXT-BUTTONS (Zero background layout)
   ========================================================================= */
.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.text-button {
    background: none;
    border: none;
    color: #A0A0A0;            /* Muted grey when idle */
    font-family: inherit;
    font-size: 18px;
    letter-spacing: 2px;
    cursor: pointer;
    padding: 10px 20px;
    transition: all 0.3s ease; /* Smooth micro-animation transition */
    position: relative;
}

/* The Text Hover Shift Effect we brainstormed */
.text-button:hover {
    color: #D4AF37;            /* Smooth transition to vintage amber accent */
    transform: translateX(5px); /* Subtle shift to the right */
}

/* Prefixes a minimal arrow when hovering */
.text-button:hover::before {
    content: "→ ";
    position: absolute;
    left: 0;
    color: #D4AF37;
}

/* =========================================================================
   5. SETTINGS SCREEN INTERFACE
   ========================================================================= */
h2 {
    letter-spacing: 4px;
    margin-bottom: 30px;
    color: #E5E5E5;
}

.settings-box {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
}

.setting-item {
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =========================================================================
   6. PREMIUM BRUTALIST TYPOGRAPHY HEADER
   ========================================================================= */
.game-branding {
    margin-bottom: 60px; /* Gives the logo breathing room away from the buttons */
    text-align: center;
    width: 100%;
}

.brand-main {
    font-family: inherit;
    font-size: 32px;         /* Bold, dominant title statement */
    font-weight: 800;
    letter-spacing: 6px;     /* Premium spaced letter tracking */
    color: #E5E5E5;          /* Crisp off-white */
    line-height: 1.1;
    margin-bottom: 12px;
}

.brand-divider {
    height: 2px;             /* Solid, crisp structural block line */
    background-color: #333333; /* Low-contrast dark ash gray */
    width: 80px;             /* Kept intentionally short and balanced */
    margin: 0 auto 16px auto; /* Centers the line and adds spacing below */
}

.brand-sub {
    font-family: inherit;
    font-size: 11px;         /* Small metadata caption sizing */
    letter-spacing: 3px;     /* High-end tracking feel */
    color: #707070;          /* Deep muted accent gray */
    text-transform: uppercase;
}

/* =========================================================================
   7. DETAILED BOOT SCREEN & PROGRESS GRAPHICS
   ========================================================================= */
.boot-container {
    text-align: left;
    width: 100%;
    max-width: 450px;
}

.boot-logo {
    font-family: inherit;
    font-size: 40px;
    font-weight: 900;
    letter-spacing: 8px;
    color: #E5E5E5;
    margin-bottom: 4px;
}

.boot-version {
    font-size: 10px;
    letter-spacing: 2px;
    color: #555555;
    margin-bottom: 30px;
}

.progress-wrapper {
    width: 100%;
    height: 3px;               /* Thin, modern hairline accent bar */
    background-color: #222222;  /* Deep recessed groove background */
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;                 /* Controlled smoothly via our JavaScript script */
    background-color: #D4AF37; /* The vintage elegant amber tracking accent color */
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.boot-status-box {
    height: 20px;
    overflow: hidden;
}

#boot-status-text {
    font-size: 11px;
    letter-spacing: 1px;
    color: #888888;
    text-transform: uppercase;
}

/* =========================================================================
   8. DEDICATED CHANGELOG OVERLAY INTERFACE
   ========================================================================= */
.changelog-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
    width: 100%;
    max-width: 450px;
}

.changelog-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    border-top: 1px solid #222222;
    border-bottom: 1px solid #222222;
    padding: 30px 0;
}

.changelog-list li {
    font-size: 13px;
    line-height: 1.6;
    color: #888888;
}

.version-tag {
    color: #D4AF37;            /* Glows in our crisp vintage amber when opened */
    font-weight: bold;
    font-family: monospace;
    margin-right: 10px;
}

/* =========================================================================
   9. TOP NAVIGATION BAR & REVERSED BACK BUTTON LOGIC
   ========================================================================= */
.top-navigation-bar {
    width: 100%;
    display: flex;
    justify-content: flex-start; /* Aligns button neatly to top left */
    margin-bottom: 20px;
    padding: 0 10px;
}

.back-button {
    background: none;
    border: none;
    color: #A0A0A0;              /* Standard idle menu gray */
    font-family: inherit;
    font-size: 14px;
    letter-spacing: 2px;
    cursor: pointer;
    padding: 10px 20px;
    /* Uses the exact 0.3s ease timing profile of your forward menu keys */
    transition: all 0.3s ease; 
}

/* Reverses the physics vector cleanly */
.back-button:hover {
    color: #D4AF37;              /* Vintage amber accent */
    transform: translateX(-5px); /* Smoothly pulls leftward (backward) */
}

/* =========================================================================
   10. TYPEWRITER EFFECT & GLOWING HIGHLIGHT TEXT
   ========================================================================= */
.brand-sub-container {
    font-family: inherit;
    font-size: 11px;
    letter-spacing: 2px;
    color: #707070;           /* Deep muted accent gray for normal text */
    text-transform: uppercase;
    min-height: 18px;         /* Reserves solid vertical space to prevent layout shaking */
    display: inline-block;
    opacity: 1;               
}

/* The Preset Highlight styling used throughout your game engine */
.highlight-text {
    color: #707070;           /* Inherits the premium muted gray base */
    font-weight: normal;
    border-right: 2px solid #D4AF37; /* Clean blinking mechanical text cursor */
    padding-right: 4px;
    animation: blink-cursor 0.8s step-end infinite;
}

/* Smooth Title Card Entry Physics */
@keyframes fade-in-subtitle {
    from {
        opacity: 0;
        transform: translateY(4px); /* Subtle physical drift upward */
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Text Cursor Animation */
@keyframes blink-cursor {
    from, to { border-color: transparent }
    50% { border-color: #D4AF37; }
}