/* Shared styles for /games pages. Colors match css/style.css */
:root {
  --bg-page: #1c1c1c;
  --bg-content: #141414;
  --pink: #FF2E9C;
  --red: #E3202B;
  --text: #FFFFFF;
  --text-dim: #BDBDBD;
  --font-heading: 'Bebas Neue', 'Oswald', sans-serif;
  --font-body: 'Inter', sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg-content);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

/* ---------- Top bar ---------- */
.games-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 52px;
  padding: 0 clamp(16px, 3vw, 48px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.games-bar__logo,
.games-bar__link {
  font-family: var(--font-heading);
  letter-spacing: 0.06em;
  text-decoration: none;
}
.games-bar__logo { font-size: 26px; }
.games-bar__link { font-size: 18px; color: var(--text-dim); transition: color .2s; }
.games-bar__link:hover, .games-bar__logo:hover { color: var(--pink); }

/* ---------- Hub ---------- */
.games-hub {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 96px) clamp(16px, 3vw, 48px);
}
.games-hub__title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(64px, 12vw, 160px);
  line-height: .9;
  letter-spacing: 0.02em;
}
.games-hub__title span { color: var(--pink); }
.games-hub__lead {
  margin: 16px 0 clamp(32px, 5vw, 56px);
  color: var(--text-dim);
  font-size: 16px;
  max-width: 520px;
}
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg-page);
  text-decoration: none;
  overflow: hidden;
  transition: border-color .25s, transform .35s var(--ease-out);
}
a.game-card:hover { border-color: var(--pink); transform: translateY(-4px); }
.game-card__art {
  flex: 1;
  position: relative;
  margin: -24px -24px 20px;
  min-height: 170px;
  background:
    radial-gradient(circle at 50% 120%, rgba(255, 46, 156, .35), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 1px, transparent 1px 28px),
    #101010;
  overflow: hidden;
}
.game-card__bubble {
  position: absolute;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(30, 30, 30, .95);
  border: 1px solid rgba(255, 255, 255, .15);
  font-size: 12px;
  white-space: nowrap;
}
.game-card__bubble b { color: var(--pink); margin-right: 6px; }
.game-card__beam {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 3px;
  height: 120px;
  background: var(--pink);
  box-shadow: 0 0 10px var(--pink), 0 0 22px var(--pink);
  transform-origin: bottom center;
  transform: rotate(18deg);
  border-radius: 2px;
}
.game-card__gun {
  position: absolute;
  left: 50%;
  bottom: -18px;
  width: 56px;
  height: 56px;
  margin-left: -28px;
  border-radius: 50%;
  border: 2px solid var(--pink);
  background: #151515;
  box-shadow: 0 0 16px rgba(255, 46, 156, .6);
}
.game-card__name {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 40px;
  line-height: 1;
}
.game-card__desc { margin: 8px 0 0; color: var(--text-dim); font-size: 14px; line-height: 1.5; }
.game-card__tag {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  padding: 4px 8px;
  font-family: var(--font-heading);
  font-size: 15px;
  letter-spacing: .06em;
  background: var(--pink);
  color: #000;
}
.game-card--soon { opacity: .45; }
.game-card--soon .game-card__art { background: repeating-linear-gradient(45deg, #151515 0 14px, #181818 14px 28px); }
.game-card--soon .game-card__tag { background: rgba(255,255,255,.15); color: var(--text); }

/* ============================================================
   CHAT SHOOTING
   ============================================================ */
.cs-body { overflow: hidden; height: 100vh; height: 100dvh; touch-action: none; user-select: none; -webkit-user-select: none; }
.cs-canvas { position: fixed; inset: 0; display: block; }
.cs-body.is-playing .cs-canvas { cursor: none; }

.cs-hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  padding: 14px clamp(14px, 2.5vw, 32px);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.cs-hud__left, .cs-hud__right { display: flex; flex-direction: column; gap: 8px; }
.cs-hud__right { align-items: flex-end; text-align: right; }
.cs-back {
  pointer-events: auto;
  font-family: var(--font-heading);
  font-size: 18px;
  letter-spacing: .06em;
  color: var(--text-dim);
  text-decoration: none;
}
.cs-back:hover { color: var(--pink); }
.cs-hp { width: clamp(150px, 22vw, 260px); }
.cs-hp__label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-heading);
  font-size: 18px;
  letter-spacing: .06em;
}
.cs-hp__track { height: 10px; background: rgba(255,255,255,.1); overflow: hidden; }
.cs-hp__fill {
  height: 100%;
  width: 100%;
  background: var(--pink);
  box-shadow: 0 0 10px var(--pink);
  transition: width .25s var(--ease-out), background-color .25s;
}
.cs-hp__fill.is-low { background: var(--red); box-shadow: 0 0 10px var(--red); }
.cs-stat { font-family: var(--font-heading); font-size: 18px; letter-spacing: .06em; color: var(--text-dim); }
.cs-stat b { color: var(--text); font-weight: 400; }
.cs-score {
  font-family: var(--font-heading);
  font-size: clamp(40px, 6vw, 64px);
  line-height: .9;
  font-variant-numeric: tabular-nums;
}
.cs-score.is-bump { animation: cs-bump .25s var(--ease-out); }
@keyframes cs-bump { 0% { transform: scale(1.18); color: var(--pink); } 100% { transform: scale(1); } }
.cs-mult { font-family: var(--font-heading); font-size: 20px; color: var(--pink); letter-spacing: .05em; min-height: 20px; }
.cs-effects { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.cs-effect {
  font-family: var(--font-heading);
  font-size: 16px;
  letter-spacing: .05em;
  padding: 3px 8px;
  background: rgba(255, 46, 156, .15);
  border-left: 3px solid var(--pink);
}
.cs-effect.is-bad { background: rgba(227, 32, 43, .15); border-color: var(--red); }
.cs-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
}
.cs-source::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #666; }
.cs-source.is-live::before { background: var(--red); box-shadow: 0 0 6px var(--red); }
.cs-mute {
  pointer-events: auto;
  border: 1px solid rgba(255,255,255,.2);
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-heading);
  font-size: 15px;
  letter-spacing: .06em;
  padding: 4px 10px;
  cursor: pointer;
}
.cs-mute:hover { color: var(--pink); border-color: var(--pink); }

/* Overlays */
.cs-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: rgba(10, 10, 10, .72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  text-align: center;
}
.cs-overlay[hidden] { display: none; }
.cs-panel { max-width: 560px; width: 100%; }
.cs-title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(64px, 13vw, 140px);
  line-height: .85;
}
.cs-title span { color: var(--pink); text-shadow: 0 0 24px rgba(255, 46, 156, .6); }
.cs-title--over span { color: var(--red); text-shadow: 0 0 24px rgba(227, 32, 43, .6); }
.cs-text { color: var(--text-dim); font-size: 15px; line-height: 1.6; margin: 18px 0 0; }
.cs-keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 18px 0 0; font-size: 13px; color: var(--text-dim); }
.cs-keys kbd {
  font-family: var(--font-body);
  font-size: 12px;
  padding: 2px 6px;
  border: 1px solid rgba(255,255,255,.25);
  border-bottom-width: 2px;
  color: var(--text);
}
.cs-final { font-family: var(--font-heading); font-size: clamp(72px, 14vw, 128px); line-height: 1; margin: 18px 0 4px; font-variant-numeric: tabular-nums; }
.cs-best { font-family: var(--font-heading); font-size: 22px; letter-spacing: .06em; color: var(--pink); min-height: 26px; }
.cs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 22px 0 0; }
.cs-grid div { padding: 10px 6px; border: 1px solid rgba(255,255,255,.1); }
.cs-grid b { display: block; font-family: var(--font-heading); font-weight: 400; font-size: 28px; }
.cs-grid span { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 480px) { .cs-grid { grid-template-columns: repeat(2, 1fr); } }
.cs-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.cs-btn {
  font-family: var(--font-heading);
  font-size: 24px;
  letter-spacing: .06em;
  padding: 10px 28px;
  border: 2px solid var(--pink);
  background: var(--pink);
  color: #000;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, color .2s, box-shadow .2s;
}
.cs-btn:hover { box-shadow: 0 0 22px rgba(255, 46, 156, .6); }
.cs-btn--ghost { background: transparent; color: var(--text); }
.cs-btn--ghost:hover { color: var(--pink); }

/* Big centered bonus announcement */
.cs-announce {
  position: fixed;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  font-family: var(--font-heading);
  font-size: clamp(44px, 8vw, 96px);
  letter-spacing: .03em;
  white-space: nowrap;
  opacity: 0;
}
.cs-announce small {
  display: block;
  margin-top: 6px;
  font-family: var(--font-body);
  font-size: clamp(14px, 1.6vw, 18px);
  font-weight: 600;
  letter-spacing: 0;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .8);
}
.cs-announce.is-good { color: var(--pink); text-shadow: 0 0 28px rgba(255, 46, 156, .7); }
.cs-announce.is-bad { color: var(--red); text-shadow: 0 0 28px rgba(227, 32, 43, .7); }
.cs-announce.is-on { animation: cs-announce 1.6s var(--ease-out) forwards; }
@keyframes cs-announce {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(1.6); }
  12% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -62%) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .cs-score.is-bump { animation: none; }
}
