/* ==========================================================================
   0. CUSTOM FONT DEFINITIONS
   ========================================================================== */
@font-face {
    font-family: 'CircusOfInnocentsItalic';
    src: url('/fonts/CircusOfInnocentsItalic.woff2') format('woff2');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

/* ==========================================================================
   1. HARDWARE SYSTEM VARIABLES & GLOBAL RESETS
   ========================================================================== */
:root {
    --gb-shell-gray: #8b8b8b;         
    --gb-shell-dark: #7a7a7a;         
    --gb-bezel-dark: #232323;         
    --gb-matrix-bg: #9bbc0f;          
    --gb-matrix-ink: #0f380f;         
    --gb-matrix-shadow: #306230;      
    --gb-matrix-highlight: #8bac0f;   
    --gb-btn-magenta: #a81058;        
    --gb-dpad-black: #1a1a1a;         
    --gb-border-highlight: #b5b5b5;   
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    background-color: #0b0c10;
    overflow-x: hidden;
}

html {
    height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ==========================================================================
   2. RETRO BOOT SCREEN TAKEOVER COMPONENT
   ========================================================================== */
.gb-boot-container {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0b0c10;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000; 
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.gb-boot-matrix {
    width: 100%;
    max-width: 600px;
    aspect-ratio: 10 / 9;
    background: radial-gradient(circle at center, #a2c614 0%, var(--gb-matrix-bg) 100%);
    color: var(--gb-matrix-ink);
    position: relative;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
    font-weight: 700;
    overflow: hidden;
    border-radius: 12px;
}

.gb-boot-logo {
    position: absolute;
    top: -250px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: top 1.8s cubic-bezier(0.1, 0.7, 0.1, 1);
}

.gb-boot-logo.is-dropped {
    top: 10%;
}

.gb-boot-logo img {
    max-width: 240px;
    height: auto;
    image-rendering: pixelated;
    filter: drop-shadow(2px 2px 0px var(--gb-matrix-shadow));
}

.gb-boot-sponsors {
    position: absolute;
    top: 65%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.gb-boot-sponsors.is-visible {
    opacity: 1;
}

.gb-sponsor-slot {
    width: 90px;
    height: 50px;
    border: 2px dashed var(--gb-matrix-ink);
    background-color: rgba(15, 56, 15, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--gb-matrix-ink);
    text-align: center;
    border-radius: 4px;
}

.gb-sponsor-slot img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.gb-boot-status {
    width: 100%;
    text-align: center;
    margin-top: auto;
    font-size: 0.85rem;
    letter-spacing: 2px;
    opacity: 0;
    transition: opacity 0.1s ease;
}

.gb-boot-status.is-visible {
    opacity: 1;
}

#validationLink {
    display: inline-block;
    margin-top: 8px;
    border: 2px solid var(--gb-matrix-ink);
    padding: 2px 10px;
    font-size: 0.75rem;
    border-radius: 4px;
}

.gb-boot-timer {
    position: absolute;
    bottom: 12px;
    right: 16px;
    font-size: 0.7rem;
    letter-spacing: 1px;
    opacity: 0;
    transition: opacity 0.2s ease;
    text-transform: uppercase;
}

.gb-boot-timer.is-visible {
    opacity: 0.75;
}

/* ==========================================================================
   3. CHASSIS ASSEMBLY & BEZEL NAVIGATION
   ========================================================================== */
.gb-hardware-wrapper {
    display: grid;
    grid-template-rows: auto 1fr auto; 
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--gb-shell-gray);
    border-left: 24px solid var(--gb-shell-gray);
    border-right: 24px solid var(--gb-shell-gray);
    box-shadow: 
        inset 12px 12px 0px var(--gb-border-highlight), 
        inset -12px -12px 12px rgba(0, 0, 0, 0.3);
    position: relative;
}

.gb-top-bezel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 40px;
    background-color: var(--gb-bezel-dark);
    border-bottom: 5px solid #111;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 95;
}

.gb-battery-cluster {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gb-led {
    width: 12px;
    height: 12px;
    background-color: #ff0000;
    border-radius: 50%;
    box-shadow: 0 0 10px #ff0000;
}

.gb-led-label {
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.gb-bezel-cta {
    display: inline-block;
    text-align: center;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--gb-matrix-bg);
    background-color: var(--gb-matrix-ink);
    border: 2px solid var(--gb-matrix-ink);
    border-radius: 4px;
    box-shadow: 0 3px 0px var(--gb-matrix-shadow);
    margin-left: 15px;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.gb-bezel-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0px var(--gb-matrix-shadow);
}

.gb-bezel-cta:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0px var(--gb-matrix-shadow);
}

.gb-bezel-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.gb-nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.gb-nav-links li {
    position: relative; 
}

.gb-nav-links a {
    color: #b5b5b5;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.15s ease;
    cursor: pointer;
    display: block;
}

.gb-nav-links a:hover {
    color: #ffffff;
}

.gb-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: -10px;
    background-color: var(--gb-bezel-dark);
    border: 1px solid #444;
    border-radius: 6px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    list-style: none;
    padding: 6px 0;
    margin: 10px 0 0 0;
    min-width: 180px;
    z-index: 100;
}

.gb-nav-links li::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 12px; 
    display: none;
}

.gb-nav-links li:hover::after {
    display: block;
}

.gb-dropdown-menu::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 20px;
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent #444 transparent;
}

.gb-dropdown-menu li {
    width: 100%;
}

.gb-dropdown-menu a {
    padding: 10px 16px;
    font-size: 0.8rem;
    text-transform: uppercase;
    white-space: nowrap;
    color: #b5b5b5;
}

.gb-dropdown-menu a:hover {
    color: var(--gb-matrix-bg);
    background-color: rgba(255, 255, 255, 0.05);
}

.gb-nav-links li:hover .gb-dropdown-menu {
    display: block;
}

.gb-social-cluster {
    display: flex;
    gap: 14px;
    align-items: center;
    border-left: 2px solid #444;
    padding-left: 18px;
}

.gb-social-icon {
    color: #b5b5b5;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: transform 0.15s ease, color 0.15s ease;
}

.gb-social-icon:hover {
    color: #ffffff;
    transform: translateY(-2px);
}

.gb-menu-toggle {
    display: none;
    background: transparent;
    border: 2px solid #555;
    border-radius: 6px;
    color: #b5b5b5;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: inherit;
}

.gb-menu-toggle:active {
    border-color: #fff;
    color: #fff;
}

/* ==========================================================================
   4. RETRO MOBILE DRAWER SYSTEM
   ========================================================================== */
.gb-mobile-drawer {
    display: none; 
    position: fixed;
    top: 65px; 
    right: -310px;
    width: 280px;
    height: auto;
    max-height: calc(100dvh - 85px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: radial-gradient(circle at center, #a2c614 0%, var(--gb-matrix-bg) 100%);
    border: 4px solid var(--gb-bezel-dark);
    border-radius: 16px;
    box-shadow: -8px 12px 25px rgba(0, 0, 0, 0.6);
    flex-direction: column;
    padding: 20px 16px;
    gap: 15px;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 90;
    margin-right: 12px;
}

.gb-mobile-drawer.is-active {
    right: 0;
}

.gb-drawer-header {
    margin: 0;
    font-size: 1.05rem;
    text-align: center;
    color: var(--gb-matrix-bg);
    background-color: var(--gb-matrix-ink);
    padding: 8px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
    flex-shrink: 0;
    border-radius: 8px;
}

.gb-mobile-drawer .gb-nav-links {
    flex-direction: column;
    gap: 6px;
}

.gb-mobile-drawer .gb-nav-links li {
    border-bottom: 2px dashed rgba(15, 56, 15, 0.3);
    border-radius: 6px;
}

.gb-mobile-drawer .gb-nav-links a {
    font-size: 0.95rem;
    font-weight: 700;
    display: block;
    padding: 10px 12px;
    color: var(--gb-matrix-ink);
    text-shadow: 1px 1px 0px var(--gb-matrix-highlight);
    position: relative;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.gb-mobile-drawer .gb-nav-links a:hover {
    color: var(--gb-matrix-bg);
    background-color: var(--gb-matrix-ink);
    text-shadow: none;
    padding-left: 28px;
}

.gb-mobile-drawer .gb-nav-links a:hover::before {
    content: '▶';
    position: absolute;
    left: 10px;
    color: var(--gb-matrix-bg);
    font-size: 0.85rem;
}

.gb-mobile-drawer .gb-dropdown-menu {
    display: block; 
    position: static;
    background: rgba(15, 56, 15, 0.05);
    border: 1px solid rgba(15, 56, 15, 0.2);
    border-radius: 8px;
    box-shadow: none;
    margin: 6px 0;
    padding: 4px 0;
    min-width: auto;
}

.gb-mobile-drawer .gb-dropdown-menu::before {
    display: none;
}

.gb-mobile-drawer .gb-dropdown-menu li {
    border-bottom: none;
}

.gb-mobile-drawer .gb-dropdown-menu a {
    font-size: 0.85rem;
    padding: 8px 10px 8px 24px; 
    opacity: 0.9;
}

.gb-mobile-drawer .gb-social-cluster {
    border-left: none;
    border-top: 2px dashed rgba(15, 56, 15, 0.4);
    padding-left: 0;
    padding-top: 15px;
    margin-top: auto; 
    justify-content: space-between;
    gap: 10px;
    flex-shrink: 0;
}

.gb-mobile-drawer .gb-social-icon {
    flex: 1;
    text-align: center;
    font-size: 0.85rem;
    color: var(--gb-matrix-ink);
    border: 2px solid var(--gb-matrix-ink);
    background: transparent;
    padding: 8px 0;
    text-shadow: 1px 1px 0px var(--gb-matrix-highlight);
    border-radius: 6px;
}

.gb-mobile-drawer .gb-social-icon:hover {
    background-color: var(--gb-matrix-ink);
    color: var(--gb-matrix-bg);
    text-shadow: none;
    transform: none;
}

/* ==========================================================================
   5. MATRIX VIEWPORT & INNER GRAPHICS CONTAINERS
   ========================================================================== */
.gb-matrix-screen {
    padding: 35px 50px;
    background: radial-gradient(circle at center, #a2c614 0%, var(--gb-matrix-bg) 100%);
    color: var(--gb-matrix-ink);
    border: 12px solid var(--gb-bezel-dark);
    border-radius: 16px;
    box-shadow: inset 0 10px 25px rgba(0, 0, 0, 0.6), 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow-y: visible; 
    position: relative;
}

.gb-matrix-screen::before {
    content: " ";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.05) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 2;
    border-radius: 4px;
}

.gb-content-bounds {
    max-width: 1350px;
    margin: 0 auto;
    font-weight: 600;
    position: relative;
    z-index: 3;
}

.gb-screen-header {
    display: flex;
    align-items: center;
    gap: 24px;
    text-align: left;
    padding-bottom: 20px;
    margin-bottom: 30px;
    border-bottom: 4px dashed var(--gb-matrix-ink);
}

.gb-header-logo {
    width: 100%;
    max-width: 300px;
    height: auto;
    display: block;
    margin: 0;
    flex-shrink: 0;
    image-rendering: pixelated;
    filter: drop-shadow(2px 2px 0px var(--gb-matrix-shadow));
}

.gb-header-text-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.gb-screen-tagline {
    display: inline-block;
    margin: 0;
    padding: 4px 16px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 1px;
    background-color: var(--gb-matrix-ink);
    color: var(--gb-matrix-bg);
    border-radius: 4px;
}

.gb-info-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 30px;
}

.gb-content-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: rgba(15, 56, 15, 0.06);
    border: 1px solid rgba(15, 56, 15, 0.3);
    border-top: 4px solid var(--gb-matrix-ink);
    border-radius: 8px;
    backdrop-filter: blur(4px);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.gb-content-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(15, 56, 15, 0.15);
}

.gb-content-card h2 {
    display: inline-block;
    align-self: flex-start;
    margin: 0 0 14px 0;
    padding: 4px 10px;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    background-color: var(--gb-matrix-ink);
    color: var(--gb-matrix-bg);
    letter-spacing: 0.5px;
    border-radius: 4px;
}

.gb-content-card p {
    margin: 0 0 16px 0;
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: 500;
}

.text-center {
    text-align: center;
}

.gb-matrix-btn {
    display: block;
    text-align: center;
    padding: 12px 18px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--gb-matrix-bg);
    background-color: var(--gb-matrix-ink);
    border: 2px solid var(--gb-matrix-ink);
    border-radius: 6px;
    box-shadow: 0 4px 0px var(--gb-matrix-shadow);
    margin-top: auto; 
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.gb-matrix-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0px var(--gb-matrix-shadow);
}

.gb-matrix-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0px var(--gb-matrix-shadow);
}

.gb-system-status {
    text-align: center;
    margin-top: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    opacity: 0.85;
}

/* ==========================================================================
   6. POPUP DIALOG WINDOW MODULES (EASTER EGG)
   ========================================================================== */
.gb-popup-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 56, 15, 0.45); 
    z-index: 99;
}

.gb-popup-overlay {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); 
    width: 85%;
    max-width: 500px;
    background: radial-gradient(circle at center, #a2c614 0%, var(--gb-matrix-bg) 100%);
    border: 6px double var(--gb-matrix-ink);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    z-index: 100;
    text-align: center;
}

.gb-popup-overlay h3 {
    margin: 0 0 15px 0;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--gb-matrix-bg);
    background-color: var(--gb-matrix-ink);
    padding: 6px;
    text-transform: uppercase;
    border-radius: 4px;
}

.gb-popup-overlay p {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 20px;
    font-weight: 600;
}

/* ==========================================================================
   7. LOWER HARDWARE CHASSIS CONTROLS
   ========================================================================== */
.gb-control-chassis {
    display: grid;
    grid-template-columns: 1fr auto 1fr; 
    align-items: center;
    padding: 20px 60px;
    background-color: var(--gb-shell-gray);
    border-top: 6px solid var(--gb-shell-dark);
    box-shadow: inset 0 4px 6px rgba(255, 255, 255, 0.2);
    position: relative;
}

.gb-branding-strings {
    justify-self: start;
    color: #1a2f1c;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.gb-branding-subtext {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: #2c442f;
}

.gb-speaker-grille {
    display: flex;
    gap: 8px;
    transform: rotate(-28deg); 
    opacity: 0.35;
}

.gb-speaker-slot {
    width: 8px;
    height: 55px;
    background-color: var(--gb-shell-dark);
    border-radius: 4px;
    box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.6), 1px 1px 0px rgba(255, 255, 255, 0.2);
}

.gb-hardware-modules {
    display: flex;
    align-items: center;
    gap: 60px;
    justify-self: end;
}

.gb-dpad {
    position: relative;
    width: 90px;
    height: 90px;
}

.gb-dpad-wing {
    position: absolute;
    background-color: var(--gb-dpad-black);
    border-radius: 4px;
    box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.25), 0 4px 6px rgba(0, 0, 0, 0.4);
}

.gb-dpad-horiz {
    width: 90px;
    height: 28px;
    top: 31px;
    left: 0;
}

.gb-dpad-vert {
    width: 28px;
    height: 90px;
    top: 0;
    left: 31px;
}

.gb-v-btn {
    position: absolute;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
}

.gb-v-btn:active {
    background-color: rgba(255, 255, 255, 0.1);
}

.gb-dpad-up, .gb-dpad-down { width: 28px; height: 31px; left: 31px; }
.gb-dpad-left, .gb-dpad-right { width: 31px; height: 28px; top: 31px; }

.gb-dpad-up    { top: 0; border-radius: 4px 4px 0 0; }
.gb-dpad-down  { bottom: 0; border-radius: 0 0 4px 4px; }
.gb-dpad-left  { left: 0; border-radius: 4px 0 0 4px; }
.gb-dpad-right { right: 0; border-radius: 0 4px 4px 0; }

.gb-button-housing {
    display: flex;
    gap: 18px;
    padding: 8px 18px;
    background-color: var(--gb-shell-dark);
    border-radius: 45px;
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.5);
    transform: rotate(-10deg);
    position: relative;
}

.gb-action-btn {
    width: 44px;
    height: 44px;
    background: radial-gradient(circle at 35% 35%, #d11d73 0%, var(--gb-btn-magenta) 70%, #700a3a 100%);
    border-radius: 50%;
    border: none;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.5), inset 0 2px 3px rgba(255, 255, 255, 0.4);
    cursor: pointer;
    position: relative;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.gb-action-btn:active {
    transform: translateY(3px) scale(0.97);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   8. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
    .gb-hardware-wrapper {
        grid-template-rows: auto 1fr auto;
        border-left: none;
        border-right: none;
        max-width: 100%;
    }

    .gb-top-bezel {
        padding: 12px 20px;
    }

    .gb-battery-cluster {
        flex-wrap: wrap;
        gap: 8px;
    }

    .gb-bezel-cta {
        margin-left: 0;
        padding: 4px 10px;
        font-size: 0.7rem;
    }

    .gb-bezel-nav {
        display: none; 
    }

    .gb-menu-toggle {
        display: block; 
    }

    .gb-mobile-drawer {
        display: flex;
    }

    .gb-matrix-screen {
        padding: 20px 24px;
        border-left: none;
        border-right: none;
        border-radius: 0;
    }

    .gb-screen-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .gb-header-logo {
        margin: 0 auto;
    }

    .gb-header-text-group {
        align-items: center;
    }

    .gb-info-row {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .gb-control-chassis {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
        padding: 20px 20px 25px;
        text-align: center;
    }

    .gb-branding-strings {
        justify-self: center;
        font-size: 0.95rem;
        letter-spacing: 1.5px;
        margin-bottom: 5px;
    }

    .gb-branding-subtext {
        font-size: 0.7rem;
        letter-spacing: 0.5px;
    }

    .gb-hardware-modules {
        justify-self: center;
        transform: scale(0.9); 
        gap: 40px;
        margin-top: 5px;
    }

    .gb-speaker-grille {
        display: none; 
    }

    .gb-header-logo {
        max-width: 80%;
    }
}