/* =============================================================
   VARSHIL ARCADE — styles.css
   Retro arcade CRT-style gaming website
   ============================================================= */

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

:root {
  --cyan:   #00ffff;
  --magenta:#ff00ff;
  --yellow: #ffff00;
  --green:  #00ff00;
  --pink:   #ff4db8;
  --dark:   #080818;
  --darker: #03030f;
  --panel:  #12122a;
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Press Start 2P', cursive;
  background: var(--darker);
  color: var(--green);
  /* Retro grid background */
  background-image:
    repeating-linear-gradient(0deg,  rgba(0,255,255,.04) 0, transparent 1px, transparent 3px, rgba(0,255,255,.04) 4px),
    repeating-linear-gradient(90deg, rgba(255,0,255,.04) 0, transparent 1px, transparent 3px, rgba(255,0,255,.04) 4px);
  background-size: 32px 32px;
}

/* Hidden class */
.hidden { display: none !important; }

/* Neon colour helpers */
.neon-cyan    { color: var(--cyan);    text-shadow: 0 0 8px var(--cyan); }
.neon-yellow  { color: var(--yellow);  text-shadow: 0 0 8px var(--yellow); }
.neon-green   { color: var(--green);   text-shadow: 0 0 8px var(--green); }
.neon-pink    { color: var(--pink);    text-shadow: 0 0 8px var(--pink); }

/* Scrollbar (thin neon) */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: var(--cyan); border-radius: 4px; }

/* ---------- SHARED ANIMATIONS ---------- */
@keyframes blink {
  0%,49% { opacity: 1; }
  50%,100% { opacity: 0; }
}
@keyframes scanline-drift {
  from { transform: translateY(0); }
  to   { transform: translateY(4px); }
}
@keyframes flicker {
  0%,100% { opacity: 1; }
  92%     { opacity: 1; }
  93%     { opacity: .85; }
  94%     { opacity: 1; }
  96%     { opacity: .9; }
  97%     { opacity: 1; }
}
@keyframes glitch-a {
  0%,100% { clip-path: inset(0 0 100% 0); transform: translate(0); }
  10% { clip-path: inset(10% 0 60% 0); transform: translate(-3px, 1px); }
  30% { clip-path: inset(40% 0 30% 0); transform: translate(3px, -1px); }
  50% { clip-path: inset(70% 0 5%  0); transform: translate(-2px, 2px); }
  70% { clip-path: inset(20% 0 50% 0); transform: translate(2px, -2px); }
  90% { clip-path: inset(55% 0 20% 0); transform: translate(-1px, 1px); }
}
@keyframes glitch-b {
  0%,100% { clip-path: inset(0 0 100% 0); transform: translate(0); }
  15% { clip-path: inset(60% 0 15% 0); transform: translate(3px, -2px); }
  35% { clip-path: inset(20% 0 55% 0); transform: translate(-3px, 1px); }
  55% { clip-path: inset(80% 0 2%  0); transform: translate(2px, 2px); }
  75% { clip-path: inset(35% 0 40% 0); transform: translate(-2px, -1px); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(.8); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes scanBar {
  0%   { top: -40%; }
  100% { top: 110%; }
}
@keyframes borderGlow {
  0%,100% { box-shadow: 0 0 12px var(--cyan), inset 0 0 12px rgba(0,255,255,.1); }
  50%     { box-shadow: 0 0 24px var(--cyan), inset 0 0 24px rgba(0,255,255,.2); }
}
@keyframes floatBob {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-6px); }
}

/* ============================================================
   LOADING SCREEN
   ============================================================ */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  animation: flicker 4s infinite;
}

.loading-inner {
  text-align: center;
  z-index: 2;
  position: relative;
}

.loading-logo {
  font-size: clamp(1.4rem, 5vw, 3rem);
  color: var(--cyan);
  line-height: 1.6;
  text-shadow: 0 0 20px var(--cyan), 0 0 50px var(--cyan), 3px 3px 0 var(--magenta);
  margin-bottom: 30px;
  letter-spacing: 4px;
}

.loading-coin {
  color: var(--yellow);
  font-size: clamp(.55rem, 2vw, .9rem);
  text-shadow: 0 0 12px var(--yellow);
  margin-bottom: 30px;
  animation: blink 1.2s infinite;
}

.loading-bar-wrap {
  width: min(400px, 80vw);
  height: 12px;
  background: #111;
  border: 2px solid var(--cyan);
  border-radius: 6px;
  overflow: hidden;
  margin: 0 auto 25px;
  box-shadow: 0 0 10px var(--cyan);
}

.loading-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  transition: width .05s linear;
  box-shadow: 0 0 8px var(--magenta);
}

.loading-hint {
  color: var(--green);
  font-size: clamp(.4rem, 1.5vw, .6rem);
  opacity: .7;
  letter-spacing: 2px;
}

/* ============================================================
   SCANLINES + CRT VIGNETTE (shared overlay)
   ============================================================ */
.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,.18) 0px,
    rgba(0,0,0,.18) 1px,
    transparent 1px,
    transparent 3px
  );
  animation: scanline-drift 6s linear infinite;
}

.crt-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 21;
  background: radial-gradient(ellipse at center,
    transparent 55%, rgba(0,0,0,.75) 100%);
}

/* ============================================================
   MAIN WRAPPER
   ============================================================ */
#main-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  animation: fadeUp .6s ease both;
}

/* ============================================================
   TOP NAV BAR
   ============================================================ */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  height: 44px;
  background: linear-gradient(90deg, #0d0d2b, #1a0a2e, #0d0d2b);
  border-bottom: 2px solid var(--magenta);
  box-shadow: 0 2px 20px rgba(255,0,255,.4);
  flex-shrink: 0;
  z-index: 100;
}

.top-bar-brand {
  font-size: clamp(.45rem, 1.5vw, .75rem);
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan);
  letter-spacing: 3px;
}

.top-bar-stats {
  display: flex;
  gap: clamp(12px, 3vw, 28px);
  font-size: clamp(.35rem, 1.2vw, .6rem);
  color: #aaa;
}

.top-bar-stats strong { font-style: normal; }

/* ============================================================
   HERO / CRT SCREEN
   ============================================================ */
.hero {
  flex-shrink: 0;
  padding: 16px 24px 0;
  background: #000;
}

.crt-frame {
  position: relative;
  background: #000d0d;
  border: 3px solid var(--cyan);
  border-radius: 8px;
  overflow: hidden;
  padding: 36px 20px 32px;
  text-align: center;
  box-shadow:
    0 0 30px rgba(0,255,255,.35),
    inset 0 0 60px rgba(0,255,255,.08);
  animation: borderGlow 4s ease-in-out infinite;
}

/* Moving horizontal scan bar */
.crt-hline {
  position: absolute;
  left: 0; right: 0;
  height: 40px;
  background: linear-gradient(180deg,
    transparent,
    rgba(0,255,255,.06),
    transparent);
  pointer-events: none;
  z-index: 15;
  animation: scanBar 5s linear infinite;
}

.crt-body {
  position: relative;
  z-index: 10;
}

.hero-eyebrow {
  font-size: clamp(.4rem, 1.3vw, .65rem);
  color: var(--green);
  letter-spacing: 4px;
  margin-bottom: 10px;
  animation: blink 2s infinite;
}

/* ----- Glitch Title ----- */
.hero-title {
  position: relative;
  display: inline-block;
  font-size: clamp(1.2rem, 5vw, 3.2rem);
  color: var(--cyan);
  letter-spacing: clamp(3px, 1vw, 8px);
  text-shadow:
    0 0 15px var(--cyan),
    0 0 35px var(--cyan),
    4px 4px 0 var(--magenta);
  margin-bottom: 14px;
  animation: flicker 5s infinite;
}

.hero-title::before,
.hero-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  width: 100%;
}

.hero-title::before {
  color: var(--magenta);
  animation: glitch-a 4s infinite;
}

.hero-title::after {
  color: var(--green);
  animation: glitch-b 4.5s infinite;
}

.hero-subtitle {
  font-size: clamp(.45rem, 1.8vw, .9rem);
  color: var(--yellow);
  letter-spacing: 4px;
  text-shadow: 0 0 12px var(--yellow);
  margin-bottom: 12px;
}

.hero-insert {
  font-size: clamp(.4rem, 1.5vw, .75rem);
  color: var(--magenta);
  text-shadow: 0 0 10px var(--magenta);
  margin-bottom: 8px;
  animation: blink 1.4s infinite;
}

.hero-credits {
  font-size: clamp(.35rem, 1.2vw, .6rem);
  color: #aaa;
  margin-bottom: 20px;
}

/* Hero START GAME button */
.start-btn-hero {
  display: inline-block;
  padding: clamp(10px,2vh,16px) clamp(20px,4vw,44px);
  background: linear-gradient(135deg, var(--magenta), #8800cc);
  color: #fff;
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(.5rem, 1.8vw, .85rem);
  text-decoration: none;
  border: 3px solid var(--magenta);
  border-radius: 6px;
  letter-spacing: 3px;
  box-shadow: 0 0 24px rgba(255,0,255,.6), 0 4px 14px rgba(0,0,0,.6);
  transition: all .25s ease;
  cursor: pointer;
  animation: popIn .5s ease .4s both;
  margin-bottom: 14px;
}

.start-btn-hero:hover {
  background: linear-gradient(135deg, var(--cyan), #0066aa);
  border-color: var(--cyan);
  box-shadow: 0 0 32px rgba(0,255,255,.8), 0 6px 20px rgba(0,0,0,.7);
  transform: translateY(-3px) scale(1.04);
}

.start-btn-hero:active { transform: scale(.96); }

.hero-hint {
  font-size: clamp(.3rem, 1vw, .5rem);
  color: rgba(0,255,255,.5);
  letter-spacing: 2px;
}

/* ============================================================
   CONTENT WRAPPER (grid + sidebar)
   ============================================================ */
.content-wrapper {
  display: flex;
  flex: 1;
  overflow: hidden;
  gap: 0;
  min-height: 0;
  padding: 16px 24px 16px;
  gap: 20px;
}

/* ============================================================
   GAME SECTION (main area)
   ============================================================ */
.game-section {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--cyan) #000;
}

.game-section::-webkit-scrollbar { width: 5px; }
.game-section::-webkit-scrollbar-thumb { background: var(--cyan); }

.section-title {
  text-align: center;
  font-size: clamp(.5rem, 1.8vw, .85rem);
  color: var(--magenta);
  text-shadow: 0 0 12px var(--magenta);
  letter-spacing: 4px;
  margin-bottom: 18px;
  animation: blink 3s infinite;
}

.s-arrow { color: var(--yellow); text-shadow: 0 0 8px var(--yellow); }

/* ---- Games Grid ---- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding-bottom: 16px;
}

/* ---- Game Card ---- */
.game-card {
  background: rgba(0,20,30,.85);
  border: 2px solid rgba(0,255,255,.4);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all .3s cubic-bezier(.25,.8,.25,1);
  cursor: pointer;
  outline: none;
  position: relative;
  animation: fadeUp .5s ease both;
}

.game-card:nth-child(2) { animation-delay: .1s; }
.game-card:nth-child(3) { animation-delay: .2s; }
.game-card:nth-child(4) { animation-delay: .3s; }

.game-card:hover,
.game-card:focus {
  border-color: var(--magenta);
  transform: translateY(-4px);
  box-shadow:
    0 0 22px rgba(255,0,255,.55),
    0 8px 24px rgba(0,0,0,.6);
}

.game-card.coming-soon {
  filter: saturate(.3);
  pointer-events: none;
}

/* Card screen area (pixel art) */
.card-screen {
  position: relative;
  background: #000;
  height: clamp(80px, 14vh, 130px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 2px solid rgba(0,255,255,.25);
}

.card-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,.25) 0px,
    rgba(0,0,0,.25) 1px,
    transparent 1px,
    transparent 3px);
}

.card-number {
  position: absolute;
  top: 6px; left: 10px;
  font-size: .55rem;
  color: rgba(0,255,255,.5);
  z-index: 6;
}

/* Pixel art icons */
.pixel-icon {
  position: relative;
  z-index: 2;
  animation: floatBob 3s ease-in-out infinite;
}

/* Tic Tac Toe grid */
.tic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  font-size: clamp(.9rem, 2.5vw, 1.4rem);
  line-height: 1;
}

.tx { color: #ff4444; text-shadow: 0 0 8px #ff4444; }
.to { color: var(--cyan); text-shadow: 0 0 8px var(--cyan); }
.tline  { color: rgba(0,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: .5rem; }
.thline {
  height: 2px;
  background: rgba(0,255,255,.3);
  display: block;
  width: 100%;
}

/* Snake icon */
.snake-pixel { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.snake-row   { display: flex; align-items: center; gap: 4px; }
.sh { color: var(--green); text-shadow: 0 0 8px var(--green); font-size: 1.2rem; }
.sb { color: #00cc00;       text-shadow: 0 0 5px #00cc00;     font-size: 1rem; }
.snake-food {
  color: var(--yellow); font-size: 1.2rem;
  text-shadow: 0 0 10px var(--yellow);
  animation: blink 1s infinite;
}

/* Coming soon icon */
.cs-icon-wrap { display: flex; align-items: center; justify-content: center; }
.cs-qmark {
  font-size: 3rem; color: rgba(0,255,255,.4);
  text-shadow: 0 0 20px rgba(0,255,255,.3);
  animation: blink 1.5s infinite;
}

/* Card info section */
.card-info {
  padding: clamp(10px,2vh,16px) clamp(10px,2vw,16px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card-title {
  font-size: clamp(.5rem, 1.6vw, .8rem);
  letter-spacing: 2px;
}

.card-genre {
  font-size: clamp(.3rem, 1vw, .55rem);
  opacity: .75;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.star-row { display: flex; gap: 3px; }
.star { color: #333; font-size: .7rem; }
.star.on { color: var(--yellow); text-shadow: 0 0 6px var(--yellow); }

/* Difficulty badges */
.badge {
  font-size: .45rem;
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 2px;
}
.badge.easy   { background: rgba(0,255,0,.15);   border: 1px solid var(--green);   color: var(--green); }
.badge.medium { background: rgba(255,255,0,.15); border: 1px solid var(--yellow);  color: var(--yellow); }
.badge.locked { background: rgba(100,100,100,.15); border: 1px solid #666; color: #666; }

.card-desc {
  font-size: clamp(.3rem, .9vw, .48rem);
  color: rgba(0,255,255,.65);
  line-height: 1.8;
  flex: 1;
}

/* Play/disabled buttons on cards */
.play-btn {
  display: inline-block;
  margin-top: 6px;
  padding: clamp(8px,1.5vh,12px) clamp(10px,2vw,18px);
  background: linear-gradient(135deg, var(--magenta), #7700bb);
  color: #fff;
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(.4rem, 1.3vw, .65rem);
  text-decoration: none;
  border: 2px solid var(--magenta);
  border-radius: 5px;
  letter-spacing: 2px;
  box-shadow: 0 0 14px rgba(255,0,255,.5);
  transition: all .25s ease;
  cursor: pointer;
  align-self: flex-start;
}

.play-btn:hover {
  background: linear-gradient(135deg, var(--cyan), #0077cc);
  border-color: var(--cyan);
  box-shadow: 0 0 22px rgba(0,255,255,.8);
  transform: scale(1.05);
}

.play-btn.disabled {
  background: #1a1a1a;
  border-color: #333;
  color: #555;
  box-shadow: none;
  cursor: not-allowed;
}

/* ============================================================
   SIDE CONTROL PANEL
   ============================================================ */
.control-panel {
  width: clamp(160px, 20vw, 230px);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

.control-panel::-webkit-scrollbar { display: none; }

.panel-block {
  background: rgba(0,10,20,.9);
  border: 2px solid rgba(0,255,255,.3);
  border-radius: 8px;
  padding: clamp(10px,1.5vh,16px) clamp(10px,1.5vw,14px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  transition: border-color .3s;
}

.panel-block:hover { border-color: rgba(0,255,255,.65); }

.panel-title {
  font-size: clamp(.35rem, 1vw, .55rem);
  color: var(--magenta);
  text-shadow: 0 0 8px var(--magenta);
  letter-spacing: 3px;
  border-bottom: 1px solid rgba(255,0,255,.3);
  width: 100%;
  padding-bottom: 6px;
  text-align: center;
}

/* Player block */
.avatar {
  width: clamp(36px,5vw,50px);
  height: clamp(36px,5vw,50px);
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(.8rem, 1.8vw, 1.2rem);
  color: #000;
  font-weight: 900;
  box-shadow: 0 0 14px rgba(0,255,255,.5);
}

.pname   { font-size: clamp(.4rem, 1.2vw, .65rem); color: var(--yellow); text-shadow: 0 0 8px var(--yellow); }
.plevel  { font-size: clamp(.3rem, .9vw, .48rem); color: var(--cyan); opacity: .8; }
.pcredits{ font-size: clamp(.3rem, .9vw, .48rem); color: #aaa; }

/* D-Pad + Buttons */
.controller-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.dpad { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.dp-row { display: flex; align-items: center; justify-content: center; gap: 3px; }

.dp-btn {
  width: clamp(22px,3vw,30px);
  height: clamp(22px,3vw,30px);
  background: #1a1a3a;
  border: 1px solid rgba(0,255,255,.4);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .55rem;
  color: var(--cyan);
  cursor: pointer;
  transition: all .1s;
  user-select: none;
}

.dp-btn:active,
.dp-btn.pressed {
  background: rgba(0,255,255,.2);
  box-shadow: 0 0 8px var(--cyan);
  transform: scale(.9);
}

.dp-center {
  width: clamp(22px,3vw,30px);
  height: clamp(22px,3vw,30px);
  background: #0d0d1e;
  border: 1px solid #333;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .45rem;
  color: #333;
}

/* Action Buttons */
.action-btns { display: flex; flex-direction: column; gap: 4px; }
.ab-row { display: flex; gap: 4px; }

.ab-btn {
  width: clamp(22px,3vw,30px);
  height: clamp(22px,3vw,30px);
  border-radius: 50%;
  border: none;
  font-family: 'Press Start 2P', cursive;
  font-size: .5rem;
  cursor: pointer;
  font-weight: bold;
  transition: all .1s;
  box-shadow: 0 3px 6px rgba(0,0,0,.5), inset 0 2px 4px rgba(255,255,255,.2);
}

.btn-y { background: radial-gradient(circle at 35% 35%, #ffee55, #cc9900); color: #000; }
.btn-x { background: radial-gradient(circle at 35% 35%, #55aaff, #0044cc); color: #fff; }
.btn-a { background: radial-gradient(circle at 35% 35%, #55ff55, #009900); color: #000; }
.btn-b { background: radial-gradient(circle at 35% 35%, #ff5555, #cc0000); color: #fff; }

.ab-btn:active,
.ab-btn.flash {
  transform: scale(.85) translateY(2px);
  box-shadow: 0 0 12px rgba(255,255,255,.5);
}

.ctrl-hint {
  font-size: clamp(.25rem, .8vw, .4rem);
  color: rgba(0,255,255,.45);
  letter-spacing: 1px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Stats block */
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-size: clamp(.28rem, .85vw, .44rem);
  gap: 6px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding-bottom: 5px;
  color: #888;
}

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

/* Panel Links */
.panel-link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  background: rgba(0,255,255,.05);
  border: 1px solid rgba(0,255,255,.2);
  border-radius: 5px;
  color: var(--cyan);
  text-decoration: none;
  font-size: clamp(.3rem, .9vw, .48rem);
  transition: all .2s;
  letter-spacing: 2px;
}

.panel-link:hover {
  background: rgba(0,255,255,.12);
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(0,255,255,.4);
}

.link-badge {
  width: 22px; height: 22px;
  background: var(--magenta);
  color: #000;
  font-size: .4rem;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  flex-shrink: 0;
  background: linear-gradient(90deg, #0a0a20, #120a22, #0a0a20);
  border-top: 2px solid rgba(0,255,255,.25);
  padding: 8px 24px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-brand { text-align: left; }

.footer-logo {
  font-size: clamp(.35rem, 1.2vw, .65rem);
  color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan);
}

.footer-tag {
  font-size: clamp(.25rem, .8vw, .4rem);
  color: rgba(255,0,255,.55);
  margin-top: 3px;
  letter-spacing: 2px;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.f-link {
  font-size: clamp(.28rem, .9vw, .45rem);
  color: var(--magenta);
  text-decoration: none;
  letter-spacing: 2px;
  text-shadow: 0 0 6px var(--magenta);
  transition: color .2s, text-shadow .2s;
}

.f-link:hover {
  color: var(--cyan);
  text-shadow: 0 0 12px var(--cyan);
}

.footer-copy {
  font-size: clamp(.22rem, .7vw, .38rem);
  color: rgba(0,255,255,.35);
  letter-spacing: 2px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .games-grid {
    grid-template-columns: 1fr 1fr;
  }
  .control-panel {
    width: clamp(130px, 18vw, 180px);
  }
}

@media (max-width: 680px) {
  .content-wrapper {
    flex-direction: column;
    padding: 12px 12px;
    overflow-y: auto;
    gap: 12px;
  }

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

  .game-section { overflow-y: visible; }

  .control-panel {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    overflow-y: visible;
  }

  .panel-block {
    flex: 1;
    min-width: 140px;
  }
}

/* ============================================================
   GAME SELECT MODAL
   ============================================================ */
.gs-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
  animation: fadeIn .25s ease;
}
.gs-overlay.hidden { display: none; }

@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

.gs-box {
  position: relative;
  background: #0a0a1a;
  border: 2px solid var(--cyan);
  box-shadow: 0 0 40px rgba(0,255,255,.35), inset 0 0 60px rgba(0,0,0,.6);
  padding: 32px 28px 28px;
  max-width: 560px;
  width: 100%;
  text-align: center;
  overflow: hidden;
  border-radius: 4px;
}

.gs-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,.18) 3px,
    rgba(0,0,0,.18) 4px
  );
  pointer-events: none;
  z-index: 1;
}

.gs-title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(.5rem, 2.5vw, .75rem);
  color: var(--yellow);
  letter-spacing: 2px;
  margin-bottom: 28px;
  position: relative;
  z-index: 2;
}

.gs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  position: relative;
  z-index: 2;
}

.gs-card {
  background: #0d0d2a;
  border: 2px solid rgba(0,255,255,.25);
  border-radius: 4px;
  padding: 18px 12px 14px;
  cursor: pointer;
  transition: border-color .2s, transform .15s, box-shadow .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.gs-card:hover {
  border-color: var(--yellow);
  box-shadow: 0 0 22px rgba(255,255,0,.5);
  transform: translateY(-3px);
}

.gs-icon {
  font-size: .6rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}

.gs-name {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(.4rem, 2vw, .6rem);
  letter-spacing: 1px;
}

.gs-genre {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(.28rem, 1.4vw, .42rem);
  opacity: .75;
}

.gs-play {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(.35rem, 1.6vw, .5rem);
  color: var(--green);
  margin-top: 6px;
  letter-spacing: 1px;
}

.gs-close {
  display: inline-block;
  margin-top: 24px;
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(.3rem, 1.4vw, .45rem);
  background: transparent;
  border: 1px solid rgba(255,0,255,.45);
  color: var(--pink);
  padding: 8px 20px;
  cursor: pointer;
  letter-spacing: 2px;
  position: relative;
  z-index: 2;
  transition: background .2s, color .2s;
}
.gs-close:hover {
  background: var(--pink);
  color: #000;
}

@media (max-width: 480px) {
  .gs-grid { grid-template-columns: 1fr; }
  .gs-box  { padding: 24px 16px 20px; }
}

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

  .hero-title {
    font-size: clamp(1rem, 8vw, 1.8rem);
  }

  .top-bar-stats {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 4px;
  }
}
