/* ═══════════════════════════════════════
   MobX Games Portal
   Retro-gaming aesthetic, dark bg, neon accents
   ═══════════════════════════════════════ */

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

:root {
    --bg: #0a0c10;
    --bg-card: #12161c;
    --bg-card-hover: #1a2030;
    --border: #1e2432;
    --border-hover: #2e3848;
    --text: #e8eaed;
    --text-dim: #6a7280;
    --accent: #e84239;
    --accent-hover: #ff5248;
    --accent-glow: rgba(232,66,57,0.4);
    --neon-blue: #4af0ff;
    --neon-purple: #b060ff;
    --neon-green: #3ecf6a;
    --gold: #f0c040;
    --radius: 10px;
    --pixel-font: 'Press Start 2P', monospace;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

/* ── Scanline overlay (subtle retro CRT feel) ── */
body::after {
    content: '';
    position: fixed; inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(0,0,0,0.03) 2px,
        rgba(0,0,0,0.03) 4px
    );
    pointer-events: none;
    z-index: 9999;
}

/* ── Hero Logo ── */
.hero-logo { display: flex; justify-content: center; margin-bottom: 28px; }
.hero-logo-img {
    height: 160px; width: auto;
    filter: brightness(1.8);
}

/* ── Hero ── */
.hero {
    position: relative;
    padding: 60px 24px 48px;
    text-align: center;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 600px;
    background: linear-gradient(180deg, rgba(232,66,57,0.18) 0%, rgba(232,66,57,0.04) 50%, transparent 100%);
    pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }
.hero-title {
    font-family: var(--pixel-font);
    font-size: clamp(20px, 4vw, 36px);
    font-weight: 800;
    line-height: 1.5;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 20px var(--accent-glow), 0 2px 0 #000;
}
.hero-accent { color: var(--accent); }
.hero-sub {
    margin-top: 20px;
    font-size: clamp(14px, 2.2vw, 17px);
    color: #9aa0aa;
    line-height: 1.7;
    max-width: 460px;
    margin-left: auto; margin-right: auto;
}
.hero-cta {
    display: inline-block;
    margin-top: 36px;
    padding: 14px 40px;
    background: transparent;
    color: var(--accent);
    font-family: var(--pixel-font);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 2px solid var(--accent);
    border-radius: 4px;
    transition: all 0.2s;
    text-shadow: 0 0 8px var(--accent-glow);
    box-shadow: 0 0 12px var(--accent-glow), inset 0 0 12px rgba(232,66,57,0.1);
}
.hero-cta:hover {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 30px var(--accent-glow), inset 0 0 20px rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* ── Section titles ── */
.section-title {
    font-family: var(--pixel-font);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-dim);
    margin-bottom: 24px;
    text-align: center;
}
.section-title span {
    color: var(--neon-blue);
    text-shadow: 0 0 8px rgba(74,240,255,0.3);
}

/* ── Genre Filter ── */
.games-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 80px;
}
.filter-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 28px;
    overflow-x: auto;
    padding-bottom: 4px;
    justify-content: center;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-btn {
    padding: 8px 18px;
    font-family: var(--pixel-font);
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    white-space: nowrap;
    transition: all 0.15s;
}
.filter-btn:hover {
    color: var(--neon-blue);
    border-color: rgba(74,240,255,0.3);
    text-shadow: 0 0 6px rgba(74,240,255,0.3);
}
.filter-active {
    color: #fff !important;
    background: var(--accent);
    border-color: var(--accent) !important;
    text-shadow: 0 0 6px var(--accent-glow) !important;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* ── Game Cards Grid ── */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}
.games-grid-coming {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}
.games-grid-coming .game-card-placeholder { aspect-ratio: 16/9; font-size: 36px; }
.games-grid-coming .game-card-body { padding: 10px 12px 12px; }
.games-grid-coming .game-card-desc { display: none; }
.games-grid-coming .game-card-row { flex-wrap: wrap; gap: 4px; }
.games-grid-coming .game-card-title { font-size: 9px; }
.games-grid-coming .badge { font-size: 6px; padding: 3px 6px; }
.section-title-coming { margin-top: 48px; }

.game-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.game-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 20px rgba(74,240,255,0.05);
}
.game-card-coming:hover {
    transform: none;
    border-color: var(--border);
    box-shadow: none;
    cursor: default;
}
.game-card-coming .game-card-title,
.game-card-coming .game-card-desc { opacity: 0.5; }

/* Card image area */
.game-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #0e1118;
}
.game-card-img img,
.game-card-img video {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.3s, opacity 0.3s;
}
.game-card:hover .game-card-img img {
    transform: scale(1.05);
}
.game-card-img video {
    position: absolute; top: 0; left: 0;
    opacity: 0;
}
.game-card:hover .game-card-img video { opacity: 1; }

/* Coming soon placeholder */
.game-card-placeholder {
    width: 100%;
    aspect-ratio: 16/10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 48px;
    background: linear-gradient(135deg, var(--bg-card) 0%, #161c24 100%);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
/* Emoji glow effect */
.game-card-placeholder .placeholder-emoji {
    font-size: inherit;
    filter: saturate(1.4);
    text-shadow: 0 0 20px rgba(255,255,255,0.2);
    z-index: 1;
}
/* Radial glow behind emoji */
.game-card-placeholder::after {
    content: '';
    position: absolute;
    width: 80px; height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    pointer-events: none;
}
/* Diagonal stripe pattern for placeholders */
.game-card-placeholder::before {
    content: '';
    position: absolute; inset: 0;
    background: repeating-linear-gradient(
        -45deg,
        transparent 0px,
        transparent 8px,
        rgba(255,255,255,0.02) 8px,
        rgba(255,255,255,0.02) 9px
    );
    pointer-events: none;
}

/* Card body */
.game-card-body { padding: 14px 16px 16px; }
.game-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.game-card-title {
    font-family: var(--pixel-font);
    font-size: 10px;
    letter-spacing: 0.5px;
}
.game-card-genre {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    margin-top: 4px;
}
.game-card-desc {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 10px;
    line-height: 1.6;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--pixel-font);
    font-size: 7px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 10px;
    border-radius: 3px;
    white-space: nowrap;
}
.badge-play {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 8px var(--accent-glow);
    animation: badge-pulse 2s ease-in-out infinite;
}
@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 0 8px var(--accent-glow); }
    50% { box-shadow: 0 0 16px var(--accent-glow); }
}
.badge-dev {
    background: rgba(240,192,64,0.1);
    color: var(--gold);
    border: 1px solid rgba(240,192,64,0.25);
}
.badge-soon {
    background: rgba(106,114,128,0.08);
    color: var(--text-dim);
    border: 1px solid rgba(106,114,128,0.15);
}

/* ── Premium Section ── */
.premium-section {
    padding: 20px 24px 80px;
    display: flex;
    justify-content: center;
}
.premium-card {
    max-width: 500px;
    width: 100%;
    text-align: center;
    padding: 40px 32px;
    background: linear-gradient(135deg, rgba(232,66,57,0.04) 0%, rgba(176,96,255,0.04) 100%);
    border: 1px solid rgba(232,66,57,0.15);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}
.premium-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--neon-purple), var(--neon-blue));
}
.premium-title {
    font-family: var(--pixel-font);
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent);
    text-shadow: 0 0 16px var(--accent-glow);
}
.premium-desc {
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.7;
}
.premium-price {
    margin-top: 28px;
    font-family: var(--pixel-font);
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 12px 28px;
    border: 1px solid var(--border);
    border-radius: 4px;
    display: inline-block;
}

/* ── Footer ── */
.footer {
    border-top: 1px solid var(--border);
    padding: 40px 24px;
}
.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.footer-logo {
    height: 28px;
    opacity: 0.7;
}
.footer-links {
    display: flex; gap: 24px;
    font-size: 12px; color: var(--text-dim);
}
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 11px; color: var(--text-dim); }

/* ── Legal pages ── */
.legal-page {
    max-width: 640px;
    margin: 0 auto;
    padding: 40px 24px 60px;
    line-height: 1.8;
}
.legal-page h1 {
    font-family: var(--pixel-font);
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 28px;
    color: var(--accent);
}
.legal-page h2 {
    font-size: 16px; font-weight: 700;
    margin-top: 32px; margin-bottom: 12px;
    color: var(--text);
}
.legal-page h3 { font-size: 14px; margin-top: 24px; margin-bottom: 8px; color: var(--text); }
.legal-page h4 { font-size: 13px; margin-top: 16px; margin-bottom: 8px; color: var(--text-dim); }
.legal-page p { color: var(--text-dim); margin-bottom: 14px; font-size: 13px; }
.legal-back {
    display: inline-block;
    font-family: var(--pixel-font);
    font-size: 8px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 32px;
}
.legal-back:hover { text-shadow: 0 0 8px var(--accent-glow); }

/* ── Responsive ── */
@media (max-width: 640px) {
    .hero { padding: 40px 16px 36px; }
    .hero-logo-img { height: 100px; }
    .games-section { padding: 0 16px 60px; }
    .games-grid { grid-template-columns: 1fr; gap: 14px; }
    .games-grid-coming { grid-template-columns: repeat(4, 1fr); gap: 8px; }
    .games-grid-coming .game-card-placeholder { font-size: 20px; }
    .games-grid-coming .game-card-title { font-size: 7px; }
    .games-grid-coming .game-card-genre { font-size: 7px; }
    .filter-bar { gap: 4px; margin-bottom: 20px; justify-content: flex-start; }
    .filter-btn { padding: 6px 12px; font-size: 7px; }
    .premium-card { padding: 28px 20px; }
}

@media (min-width: 641px) and (max-width: 960px) {
    .games-grid { grid-template-columns: repeat(2, 1fr); }
}
