/*
 * Portfolio website for Antonios Stergiopoulos
 * Copyright © 2026 Antonios Stergiopoulos. All rights reserved.
 * See LICENSE in the project root for details.
 */

/* ════════════════════════════════════════════
   RETRO GAME CONSOLE PORTFOLIO
   ════════════════════════════════════════════ */

:root {
    --bg: #0c0c1d;
    --bg-dark: #08081a;
    --bg-card: #111128;
    --bg-hover: #181840;
    --border: #2a2a5a;
    --border-hi: #4444aa;

    --text: #c8c8e0;
    --text-dim: #7777aa;
    --text-mute: #444466;

    --green: #39ff14;
    --green-dim: #22aa0e;
    --pink: #ff6ec7;
    --gold: #ffd700;
    --cyan: #00e5ff;
    --red: #ff2d55;
    --purple: #b366ff;
    --blue: #4488ff;

    --legendary: #ffd700;
    --epic: #b366ff;
    --rare: #4488ff;
    --uncommon: #39ff14;
    --common: #7777aa;

    --font-pixel: 'Press Start 2P', monospace;
    --font-body: 'VT323', 'Courier New', monospace;

    --nav-h: 56px;
    --ease: cubic-bezier(.4, 0, .2, 1);
}

/* ░░ RESET ░░ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-h);
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

body.locked {
    overflow: hidden;
}

a {
    color: var(--green);
    text-decoration: none;
    transition: color .2s;
}

a:hover {
    color: var(--pink);
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

input {
    font-family: inherit;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 40px);
}

/* ░░ STARFIELD ░░ */
#starfield {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ═══════════════════════════════
   BOOT SCREEN
   ═══════════════════════════════ */
.boot-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .6s var(--ease);
}

.boot-screen.done {
    opacity: 0;
    pointer-events: none;
}

.boot-content {
    max-width: 500px;
    padding: 20px;
}

.boot-line {
    font-family: var(--font-pixel);
    font-size: clamp(10px, 2.2vw, 13px);
    color: var(--green);
    opacity: 0;
    animation: bootIn .3s forwards;
    animation-delay: calc(var(--d) * .4s);
    line-height: 2.4;
}

.boot-ready {
    color: var(--gold);
}

@keyframes bootIn {
    to {
        opacity: 1;
    }
}

.blink {
    animation: blinkCur .6s step-end infinite;
}

@keyframes blinkCur {
    50% {
        opacity: 0;
    }
}

.boot-bar {
    height: 14px;
    border: 2px solid var(--green);
    margin: 8px 0;
    opacity: 0;
    animation: bootIn .3s forwards;
    animation-delay: calc(var(--d) * .4s);
}

.boot-bar-fill {
    height: 100%;
    width: 0;
    background: var(--green);
    animation: barFill 1s steps(15) 1.2s forwards;
}

@keyframes barFill {
    to {
        width: 100%;
    }
}

/* ═══════════════════════════════
   NAVIGATION
   ═══════════════════════════════ */
.game-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--nav-h);
    background: rgba(8, 8, 26, .95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--border);
    transition: border-color .3s;
}

.game-header.scrolled {
    border-bottom-color: var(--green-dim);
}

.game-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 40px);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.game-logo {
    font-family: var(--font-pixel);
    font-size: clamp(12px, 2vw, 14px);
    color: var(--gold) !important;
    letter-spacing: 2px;
}

.logo-play {
    color: var(--green);
    margin-right: 4px;
}

.menu-links {
    display: flex;
    gap: clamp(12px, 2.5vw, 32px);
}

.menu-link {
    font-family: var(--font-pixel);
    font-size: clamp(9px, 1.2vw, 10px);
    color: var(--text-dim) !important;
    padding: 4px 0;
    position: relative;
    transition: color .2s;
    letter-spacing: .5px;
}

.menu-link:hover,
.menu-link.active {
    color: var(--green) !important;
}

.menu-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--green);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 101;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--green);
    transition: .3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ═══════════════════════════════
   SECTIONS
   ═══════════════════════════════ */
.section {
    padding: clamp(60px, 10vw, 120px) 0;
    position: relative;
    z-index: 1;
}

.section-dark {
    background: rgba(8, 8, 20, .6);
}

.section-title {
    font-family: var(--font-pixel);
    font-size: clamp(16px, 3vw, 22px);
    color: #fff;
    text-align: center;
    margin-bottom: clamp(30px, 6vw, 60px);
    line-height: 1.8;
}

.title-deco {
    color: var(--gold);
    font-size: .8em;
}

/* Reveal animation */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
    transition-delay: var(--delay, 0s);
}

.reveal-up.visible {
    opacity: 1;
    transform: none;
}

/* ═══════════════════════════════
   TITLE SCREEN / HERO
   ═══════════════════════════════ */
.title-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    padding-top: calc(var(--nav-h) + 30px);
    padding-bottom: 72px;
}

.title-layout {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: clamp(30px, 5vw, 80px);
    align-items: center;
}

/* ═══════════════════════════════
   CRT MONITOR — Animated retro TV
   ═══════════════════════════════ */
.crt-monitor {
    display: flex;
    justify-content: center;
    perspective: 600px;
}

.crt-bezel {
    background: linear-gradient(160deg, #303040 0%, #1a1a28 40%, #222234 100%);
    border: 3px solid #3a3a5a;
    border-radius: 16px;
    padding: 18px 18px 10px;
    box-shadow:
        0 0 0 2px #0a0a14,
        0 10px 40px rgba(0, 0, 0, .7),
        inset 0 1px 0 rgba(255, 255, 255, .06),
        inset 0 -1px 0 rgba(0, 0, 0, .3);
}

.crt-screen {
    width: clamp(180px, 22vw, 280px);
    height: clamp(180px, 22vw, 280px);
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, .4);
}

/* Before boot completes: black cover hides photo */
.crt-screen:not(.crt-on) .crt-turnon {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: #000;
}

/* Turn-on: white slit expands from center to reveal photo */
.crt-screen.crt-on .crt-turnon {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    background: #fff;
    animation: crtTurnOn .6s ease-out forwards;
}

@keyframes crtTurnOn {
    0% {
        clip-path: inset(49.5% 0 49.5% 0);
        opacity: 1;
    }

    40% {
        clip-path: inset(10% 0 10% 0);
        opacity: .8;
    }

    70% {
        clip-path: inset(0);
        opacity: .4;
    }

    100% {
        clip-path: inset(0);
        opacity: 0;
    }
}

.crt-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(1.02) contrast(1.08) saturate(1.1);
}

/* Scanlines — primary horizontal bands, slow drift */
.crt-scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, .3) 0px,
            rgba(0, 0, 0, .3) 1px,
            transparent 1px,
            transparent 3px);
    background-size: 100% 3px;
    animation: scanlineDrift 14s linear infinite;
}

/* Second scanline layer — subtle interference for shimmer */
.crt-scanlines::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, .08) 0px,
            rgba(0, 0, 0, .08) 1px,
            transparent 1px,
            transparent 4px);
    background-size: 100% 4px;
    animation: scanlineDrift2 10s linear infinite;
}

@keyframes scanlineDrift {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 -30px;
    }
}

@keyframes scanlineDrift2 {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 20px;
    }
}

/* Scan beam — soft band sweeping down */
.crt-scanbeam {
    position: absolute;
    left: 0;
    right: 0;
    height: 90px;
    pointer-events: none;
    z-index: 4;
    background: linear-gradient(180deg,
            transparent 0%,
            rgba(180, 255, 180, .035) 28%,
            rgba(220, 255, 220, .11) 50%,
            rgba(180, 255, 180, .035) 72%,
            transparent 100%);
    animation: scanDown 6s linear infinite;
}

@keyframes scanDown {
    0% {
        top: -80px;
    }

    100% {
        top: 100%;
    }
}

/* Subtle phosphor glow — gentle warm tint, no aggressive RGB shift */
.crt-rgb {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 6;
    background: radial-gradient(ellipse at center, transparent 60%, rgba(120, 255, 140, .08) 100%);
    mix-blend-mode: screen;
}

/* Sub-pixel RGB columns — vertical color stripes */
.crt-subpixels {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background: repeating-linear-gradient(90deg,
            rgba(255, 0, 0, .04) 0px, rgba(255, 0, 0, .04) 1px,
            rgba(0, 255, 0, .04) 1px, rgba(0, 255, 0, .04) 2px,
            rgba(0, 80, 255, .04) 2px, rgba(0, 80, 255, .04) 3px);
    background-size: 3px 100%;
}

/* Vignette — darkened edges */
.crt-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, .45) 100%);
}

/* Flicker layer kept for backwards compat but disabled — no more glitching */
.crt-flicker {
    display: none;
}

/* Bottom strip: power LED + label */
.crt-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 8px;
}

.crt-power-led {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 6px var(--green), 0 0 12px rgba(57, 255, 20, .4);
    animation: ledPulse 3s ease-in-out infinite;
}

@keyframes ledPulse {

    0%,
    100% {
        opacity: .7;
        box-shadow: 0 0 4px var(--green), 0 0 8px rgba(57, 255, 20, .3);
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 8px var(--green), 0 0 16px rgba(57, 255, 20, .5);
    }
}

.crt-label {
    font-family: var(--font-pixel);
    font-size: 9px;
    color: var(--text-mute);
    letter-spacing: 3px;
    flex: 1;
    text-align: center;
}

/* ── Title info ── */
.title-intro {
    font-family: var(--font-pixel);
    font-size: clamp(11px, 1.4vw, 13px);
    color: var(--green);
    margin-bottom: 12px;
}

.title-name {
    font-family: var(--font-pixel);
    font-size: clamp(20px, 4vw, 34px);
    color: #fff;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* Glitch hover */
.glitch {
    position: relative;
    display: inline-block;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
}

.glitch:hover::before {
    animation: g1 .4s steps(2) forwards;
    color: var(--cyan);
    opacity: .8;
}

.glitch:hover::after {
    animation: g2 .4s steps(2) forwards;
    color: var(--pink);
    opacity: .8;
}

@keyframes g1 {
    0% {
        clip-path: inset(40% 0 20% 0);
        transform: translate(-3px);
    }

    50% {
        clip-path: inset(10% 0 60% 0);
        transform: translate(3px);
    }

    100% {
        clip-path: inset(70% 0 5% 0);
        transform: translate(-1px);
        opacity: 0;
    }
}

@keyframes g2 {
    0% {
        clip-path: inset(60% 0 10% 0);
        transform: translate(3px);
    }

    50% {
        clip-path: inset(5% 0 70% 0);
        transform: translate(-3px);
    }

    100% {
        clip-path: inset(20% 0 40% 0);
        transform: translate(1px);
        opacity: 0;
    }
}

.title-role {
    font-family: var(--font-body);
    font-size: clamp(22px, 3vw, 30px);
    color: var(--pink);
    margin-bottom: 20px;
}

.pixel-diamond {
    color: var(--gold);
    font-size: .7em;
}

.title-contact {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 24px;
    font-size: 1.2rem;
    color: var(--text-dim);
}

.title-contact li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-contact i {
    color: var(--green);
    width: 18px;
    text-align: center;
}

.title-contact a {
    color: var(--text-dim);
}

.title-contact a:hover {
    color: var(--green);
}

.title-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 2px solid var(--border);
    color: var(--text-dim) !important;
    font-size: 20px;
    transition: all .2s;
}

.icon-btn:hover {
    border-color: var(--green);
    color: var(--green) !important;
    box-shadow: 0 0 14px rgba(57, 255, 20, .25);
    transform: translateY(-2px);
}

/* Pixel button — NES cartridge look */
.pixel-btn {
    display: inline-block;
    position: relative;
    background: var(--green);
    padding: 0;
    color: #000 !important;
    box-shadow: inset -4px -4px 0 #22aa0e, inset 4px 4px 0 #66ff44;
    transition: transform .1s;
}

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

.pixel-btn:active {
    transform: translateY(1px);
    box-shadow: inset -2px -2px 0 #22aa0e, inset 2px 2px 0 #66ff44;
}

.pixel-btn-inner {
    display: block;
    padding: 12px 24px;
    font-family: var(--font-pixel);
    font-size: clamp(10px, 1.2vw, 11px);
    letter-spacing: .5px;
}

.scroll-hint {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 24px;
    text-align: center;
    margin-top: 0;
    font-family: var(--font-pixel);
    font-size: 10px;
    color: var(--text-mute);
    animation: bobDown 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes bobDown {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(6px);
    }
}

/* ═══════════════════════════════
   CHARACTER SHEET / ABOUT
   ═══════════════════════════════ */
.char-sheet {
    border: 2px solid var(--border);
    background: var(--bg-card);
    padding: clamp(20px, 4vw, 40px);
    box-shadow: 0 0 0 1px var(--bg), 0 4px 24px rgba(0, 0, 0, .4);
}

.char-bio {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--border);
}

.char-bio p {
    font-size: 1.25rem;
    color: var(--text);
    line-height: 1.7;
}

.char-classes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.class-card {
    border: 2px solid var(--border);
    padding: 20px;
    text-align: center;
    background: rgba(0, 0, 0, .2);
    transition: border-color .3s, box-shadow .3s, transform .2s;
}

.class-card:hover {
    border-color: var(--green-dim);
    box-shadow: 0 0 24px rgba(57, 255, 20, .1);
    transform: translateY(-3px);
}

.class-icon {
    font-size: 28px;
    color: var(--gold);
    margin-bottom: 12px;
}

.class-card h3 {
    font-family: var(--font-pixel);
    font-size: clamp(11px, 1.4vw, 12px);
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.6;
}

.class-card p {
    font-size: 1.1rem;
    color: var(--text-dim);
    line-height: 1.5;
}

/* ═══════════════════════════════
   SKILL INVENTORY — RPG Style
   ═══════════════════════════════ */
.inventory-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.inv-panel {
    border: 2px solid var(--border);
    background: var(--bg-card);
    overflow: hidden;
}

.inv-header {
    font-family: var(--font-pixel);
    font-size: clamp(11px, 1.4vw, 12px);
    color: var(--gold);
    padding: 12px 16px;
    background: rgba(255, 215, 0, .06);
    border-bottom: 2px solid var(--border);
    line-height: 1.6;
}

.inv-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px;
}

.inv-item {
    font-family: var(--font-pixel);
    font-size: 9px;
    padding: 7px 12px;
    border: 2px solid;
    line-height: 1.4;
    letter-spacing: .3px;
    transition: transform .15s, box-shadow .15s;
    cursor: default;
}

.inv-item:hover {
    transform: translateY(-2px);
    z-index: 1;
}

.inv-item[data-rarity="legendary"] {
    border-color: var(--legendary);
    color: var(--legendary);
    background: rgba(255, 215, 0, .08);
}

.inv-item[data-rarity="legendary"]:hover {
    box-shadow: 0 0 14px rgba(255, 215, 0, .35);
}

.inv-item[data-rarity="epic"] {
    border-color: var(--epic);
    color: var(--epic);
    background: rgba(179, 102, 255, .08);
}

.inv-item[data-rarity="epic"]:hover {
    box-shadow: 0 0 14px rgba(179, 102, 255, .35);
}

.inv-item[data-rarity="rare"] {
    border-color: var(--rare);
    color: var(--rare);
    background: rgba(68, 136, 255, .08);
}

.inv-item[data-rarity="rare"]:hover {
    box-shadow: 0 0 14px rgba(68, 136, 255, .35);
}

.inv-item[data-rarity="uncommon"] {
    border-color: var(--uncommon);
    color: var(--uncommon);
    background: rgba(57, 255, 20, .06);
}

.inv-item[data-rarity="uncommon"]:hover {
    box-shadow: 0 0 14px rgba(57, 255, 20, .25);
}

.inv-item[data-rarity="common"] {
    border-color: var(--common);
    color: var(--common);
    background: rgba(119, 119, 170, .06);
}

.inv-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    font-family: var(--font-pixel);
    font-size: 8px;
    line-height: 1.6;
}

.inv-legend span[data-rarity="legendary"] {
    color: var(--legendary);
}

.inv-legend span[data-rarity="epic"] {
    color: var(--epic);
}

.inv-legend span[data-rarity="rare"] {
    color: var(--rare);
}

.inv-legend span[data-rarity="uncommon"] {
    color: var(--uncommon);
}

.inv-legend span[data-rarity="common"] {
    color: var(--common);
}

/* ═══════════════════════════════
   QUEST LOG — Experience
   ═══════════════════════════════ */
.quest-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(20px, 4vw, 40px);
}

.quest-heading {
    font-family: var(--font-pixel);
    font-size: clamp(12px, 1.6vw, 14px);
    color: #fff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.6;
}

.quest-heading i {
    color: var(--gold);
}

.quest-card {
    border: 2px solid var(--border);
    border-left: 4px solid var(--text-mute);
    background: var(--bg-card);
    padding: 16px 20px;
    margin-bottom: 16px;
    transition: border-color .3s, transform .2s;
}

.quest-card.active {
    border-left-color: var(--gold);
}

.quest-card.active .quest-status {
    color: var(--gold);
}

.quest-card.completed {
    border-left-color: var(--green);
}

.quest-card:hover {
    border-color: var(--border-hi);
    transform: translateY(-2px);
}

.quest-status {
    font-family: var(--font-pixel);
    font-size: 9px;
    color: var(--green);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.quest-card h4 {
    font-family: var(--font-pixel);
    font-size: clamp(10px, 1.3vw, 11px);
    color: #fff;
    margin-bottom: 6px;
    line-height: 1.6;
}

.quest-org {
    color: var(--cyan) !important;
    font-size: 1.2rem;
    display: inline-block;
    margin-bottom: 2px;
}

.quest-date {
    font-family: var(--font-pixel);
    font-size: 9px;
    color: var(--pink);
    display: block;
    margin-bottom: 8px;
}

.quest-card p {
    font-size: 1.1rem;
    color: var(--text-dim);
}

.quest-objectives {
    font-size: 1.1rem;
    color: var(--text-dim);
}

.quest-objectives li {
    padding-left: 20px;
    position: relative;
    margin-bottom: 4px;
}

.quest-objectives li::before {
    content: '►';
    position: absolute;
    left: 0;
    top: 1px;
    color: var(--green);
    font-size: .7em;
}

/* ═══════════════════════════════
   GAME LIBRARY — Portfolio
   ═══════════════════════════════ */
.library-controls {
    margin-bottom: 24px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 2px solid var(--border);
    background: var(--bg-card);
    padding: 0 16px;
    height: 48px;
    margin-bottom: 14px;
    transition: border-color .3s;
}

.search-box:focus-within {
    border-color: var(--green);
}

.search-box i {
    color: var(--text-mute);
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1.25rem;
    outline: none;
    height: 100%;
}

.search-box input::placeholder {
    color: var(--text-mute);
}

.cat-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.cat-btn {
    font-family: var(--font-pixel);
    font-size: 10px;
    padding: 9px 16px;
    border: 2px solid var(--border);
    color: var(--text-dim);
    background: var(--bg-card);
    transition: all .2s;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
}

.cat-btn:hover {
    border-color: var(--green-dim);
    color: var(--text);
}

.cat-btn.active {
    border-color: var(--green);
    color: var(--green);
    background: rgba(57, 255, 20, .08);
}

.cat-count {
    font-size: 9px;
    opacity: .6;
}

.tech-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.tech-btn {
    font-family: var(--font-pixel);
    font-size: 9px;
    padding: 5px 10px;
    border: 1px solid var(--border);
    color: var(--text-mute);
    background: transparent;
    cursor: pointer;
    transition: all .2s;
    line-height: 1.4;
}

.tech-btn:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

.tech-btn.active {
    border-color: var(--cyan);
    color: #000;
    background: var(--cyan);
}

.active-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid var(--border);
    margin-bottom: 8px;
}

.active-chips[hidden] {
    display: none;
}

.active-chip {
    font-family: var(--font-pixel);
    font-size: 9px;
    line-height: 1.4;
    padding: 4px 8px;
    background: rgba(57, 255, 20, .1);
    border: 1px solid var(--green-dim);
    color: var(--green);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.active-chip .x {
    cursor: pointer;
    opacity: .6;
    font-style: normal;
}

.active-chip .x:hover {
    opacity: 1;
}

.clear-btn {
    font-family: var(--font-pixel);
    font-size: 9px;
    color: var(--red);
    padding: 4px 8px;
    border: 1px solid transparent;
    transition: border-color .2s;
    line-height: 1.4;
}

.clear-btn:hover {
    border-color: var(--red);
}

.results-info {
    font-family: var(--font-pixel);
    font-size: 9px;
    color: var(--text-mute);
    margin-bottom: 16px;
    min-height: 16px;
}

/* ── Game cards ── */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.game-card {
    border: 2px solid var(--border);
    background: var(--bg-card);
    cursor: pointer;
    overflow: hidden;
    transition: border-color .3s, transform .2s, box-shadow .3s;
    position: relative;
}

.game-card:hover {
    border-color: var(--green-dim);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(57, 255, 20, .1), 0 0 0 1px var(--green-dim);
}

.game-card.hidden {
    display: none;
}

.game-card-img {
    aspect-ratio: 16/10;
    overflow: hidden;
    position: relative;
    background: var(--bg-dark);
}

.game-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}

.game-card:hover .game-card-img img {
    transform: scale(1.08);
}

.game-card-hover {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .2) 0%, rgba(12, 12, 29, .95) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 20px;
    opacity: 0;
    transition: opacity .3s;
}

.game-card:hover .game-card-hover {
    opacity: 1;
}

.game-card-play {
    font-family: var(--font-pixel);
    font-size: 10px;
    color: var(--green);
    border: 2px solid var(--green);
    padding: 8px 20px;
    background: rgba(0, 0, 0, .6);
    line-height: 1.4;
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 6px rgba(57, 255, 20, .2);
    }

    50% {
        box-shadow: 0 0 16px rgba(57, 255, 20, .4);
    }
}

.game-card-body {
    padding: 14px 16px;
}

.game-card-name {
    font-family: var(--font-pixel);
    font-size: clamp(10px, 1.2vw, 11px);
    color: #fff;
    margin-bottom: 6px;
    line-height: 1.6;
}

.game-card-sub {
    font-size: 1.1rem;
    color: var(--text-mute);
    margin-bottom: 8px;
}

.game-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.game-card-tag {
    font-family: var(--font-pixel);
    font-size: 8px;
    padding: 3px 7px;
    border: 1px solid var(--border);
    color: var(--text-mute);
    line-height: 1.4;
}

/* ═══════════════════════════════
   GAME MODAL — Full-screen
   ═══════════════════════════════ */
.game-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, .96);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 0;
    opacity: 0;
    transition: opacity .3s;
}

.game-modal[hidden] {
    display: none;
}

.game-modal.open {
    opacity: 1;
}

.game-modal-inner {
    width: 100%;
    max-width: 960px;
    background: var(--bg);
    border-left: 2px solid var(--border);
    border-right: 2px solid var(--border);
    min-height: 100vh;
    animation: modalSlide .4s var(--ease);
}

@keyframes modalSlide {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
}

.gm-close {
    position: sticky;
    top: 0;
    z-index: 10;
    float: right;
    font-family: var(--font-pixel);
    font-size: 10px;
    color: var(--text-dim);
    background: var(--bg);
    padding: 12px 16px;
    border-bottom: 2px solid var(--border);
    border-left: 2px solid var(--border);
    transition: color .2s;
    line-height: 1.4;
}

.gm-close:hover {
    color: var(--red);
}

/* Media viewer */

.gm-media {
    position: relative;
    background: #000;
}

.gm-viewer {
    width: 100%;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
    position: relative;
}

.gm-viewer img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gm-viewer iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.gm-arrow {
    position: absolute;
    top: calc((100vw / 960) * 270);
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 2px solid rgba(255, 255, 255, .2);
    background: rgba(0, 0, 0, .7);
    color: #fff;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .2s, border-color .2s, color .2s, background .2s;
    z-index: 5;
}

.gm-arrow:hover {
    border-color: var(--green);
    color: var(--green);
    background: rgba(0, 0, 0, .9);
}

.gm-arrow[hidden] {
    display: none;
}

.gm-arrow-l {
    left: 12px;
}

.gm-arrow-r {
    right: 12px;
}

@media (min-width: 960px) {
    .gm-arrow {
        top: 270px;
    }
}

/* No-media placeholder */
.gm-no-media {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-mute);
    height: 100%;
}

.gm-no-media i {
    font-size: 48px;
    opacity: .3;
}

.gm-no-media span {
    font-family: var(--font-pixel);
    font-size: 11px;
}

.gm-thumbstrip {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 8px;
    background: var(--bg-dark);
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.gm-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 50px;
    border: 2px solid var(--border);
    overflow: hidden;
    cursor: pointer;
    transition: border-color .2s;
    position: relative;
    background: #000;
}

.gm-thumb:hover {
    border-color: var(--text-dim);
}

.gm-thumb.active {
    border-color: var(--green);
    box-shadow: 0 0 8px rgba(57, 255, 20, .3);
}

.gm-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gm-thumb-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .5);
    color: var(--red);
    font-size: 20px;
}

.gm-counter {
    font-family: var(--font-pixel);
    font-size: 9px;
    color: var(--text-mute);
    text-align: center;
    padding: 10px;
    line-height: 1.6;
    background: var(--bg-dark);
    border-bottom: 2px solid var(--border);
}

/* Info below media */
.gm-info {
    padding: clamp(20px, 4vw, 40px);
}

.gm-title {
    font-family: var(--font-pixel);
    font-size: clamp(14px, 2.2vw, 18px);
    color: #fff;
    margin-bottom: 16px;
    line-height: 1.8;
}

.gm-desc {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--text-dim);
    margin-bottom: 24px;
}

.gm-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.gm-tag {
    font-family: var(--font-pixel);
    font-size: 9px;
    padding: 6px 12px;
    border: 2px solid var(--green-dim);
    color: var(--green);
    background: rgba(57, 255, 20, .06);
    line-height: 1.4;
}

.gm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gm-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-pixel);
    font-size: 10px;
    padding: 11px 20px;
    border: 2px solid var(--pink);
    color: var(--pink) !important;
    transition: all .2s;
    line-height: 1.4;
}

.gm-link:hover {
    background: var(--pink);
    color: #000 !important;
}

/* ═══════════════════════════════
   FOOTER
   ═══════════════════════════════ */
.site-footer {
    padding: 24px 0;
    border-top: 2px solid var(--border);
    text-align: center;
    position: relative;
    z-index: 1;
}

.site-footer p {
    font-family: var(--font-pixel);
    font-size: 9px;
    color: var(--text-mute);
    line-height: 1.8;
}

/* ░░ SCROLLBAR ░░ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--green-dim);
}

/* ═══════════════════════════════
   RESPONSIVE
   ═══════════════════════════════ */
@media (max-width: 991px) {
    .title-layout {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    .title-contact {
        align-items: center;
    }

    .title-links {
        justify-content: center;
    }

    .char-classes {
        grid-template-columns: 1fr;
    }

    .inventory-grid {
        grid-template-columns: 1fr;
    }

    .quest-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Mobile navigation */

    .game-header {
        z-index: 300;
    }

    .menu-toggle {
        display: flex;
        position: relative;
        z-index: 320;
    }

    body.nav-open::before {
        content: '';
        position: fixed;
        inset: 0;
        z-index: 250;
        background: rgba(0, 0, 0, .68);
        backdrop-filter: blur(2px);
    }

    .menu-links {
        position: fixed;
        top: calc(var(--nav-h) + 12px);
        left: 16px;
        right: 16px;
        z-index: 310;

        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 10px;

        padding: 14px;
        border: 2px solid var(--border);
        background: rgba(8, 8, 26, .96);
        box-shadow: 0 12px 40px rgba(0, 0, 0, .6), 0 0 24px rgba(57, 255, 20, .12);

        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-10px);
        transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
    }

    .menu-links.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .menu-links li {
        width: 100%;
    }

    .menu-link {
        display: block;
        width: 100%;
        padding: 14px 16px;
        border: 2px solid var(--border);
        background: rgba(17, 17, 40, .92);
        text-align: center;
        font-size: 12px;
        line-height: 1.5;
    }

    .menu-link:hover,
    .menu-link.active {
        border-color: var(--green-dim);
        background: rgba(57, 255, 20, .08);
    }
}

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

    .title-screen {
        min-height: auto;
        padding-top: calc(var(--nav-h) + 16px);
    }

    .crt-screen {
        width: 200px;
        height: 200px;
    }

    .tech-filters {
        display: none;
    }

    .gm-viewer {
        aspect-ratio: 4/3;
    }

    .char-classes {
        gap: 12px;
    }

    .class-card {
        padding: 14px;
    }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .crt-scanbeam,
    .crt-flicker,
    .crt-rgb {
        display: none;
    }

    .crt-scanlines {
        animation: none;
    }

    .crt-scanlines::before {
        animation: none;
    }

    .crt-screen.crt-on img {
        animation: none;
    }

    .reveal-up {
        opacity: 1;
        transform: none;
    }
}

@media print {

    .game-header,
    .boot-screen,
    #starfield,
    .game-modal,
    .scroll-hint {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }
}