/* ============================================================
   YOUARETHEC.COM — Site Stylesheet v1.13
   Canonical arcade aesthetic with readable variant for legal pages.
   v1.9: + category-nav, daily badges (featured + cards), yellow-bright var
   v1.13: + game-page sidebar nav layout (full-bleed game, fixed left
         sidebar on desktop, hamburger drawer on mobile <900px).
         Removes all wrapper chrome on game pages — the game IS the page.
   ============================================================ */

:root {
  --c-green: #00ff66;
  --c-green-dim: #00aa44;
  --c-yellow: #ffff00;
  --c-yellow-bright: #ffff44;
  --c-bg: #000000;
  --c-text-light: #d0d0d0;
  --c-text-mid: #888888;
  --c-glow-sm: 0 0 6px currentColor, 0 0 12px currentColor;
  --c-glow-md: 0 0 12px currentColor, 0 0 24px currentColor;
  --c-glow-lg: 0 0 20px currentColor, 0 0 40px currentColor;
}

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

html, body {
  background: var(--c-bg);
  color: var(--c-green);
  font-family: 'Courier New', Courier, monospace;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== CRT SCANLINES OVERLAY ===== */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 255, 102, 0.04) 3px,
    rgba(0, 0, 0, 0) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
  pointer-events: none;
  z-index: 9998;
}

/* ===== LAYOUT ===== */
.site-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  position: relative;
  z-index: 1;
}

/* ===== HEADER ===== */
.site-header {
  text-align: center;
  padding: 40px 0 30px;
  border-bottom: 1px solid var(--c-green-dim);
  margin-bottom: 50px;
}

.site-logo {
  display: inline-block;
  font-size: clamp(48px, 8vw, 96px);
  font-weight: bold;
  color: var(--c-green);
  text-shadow: var(--c-glow-md);
  letter-spacing: 0.05em;
  line-height: 1;
  text-decoration: none;
  animation: glow-pulse 3s ease-in-out infinite;
}

.site-logo .letter-c {
  font-size: 1.4em;
  display: inline-block;
  transform: translateY(0.05em);
}

.site-tagline {
  margin-top: 16px;
  font-size: clamp(14px, 2vw, 20px);
  letter-spacing: 0.4em;
  color: var(--c-green);
  text-shadow: var(--c-glow-sm);
  opacity: 0.85;
}

@keyframes glow-pulse {
  0%, 100% { text-shadow: 0 0 10px currentColor, 0 0 20px currentColor; }
  50%      { text-shadow: 0 0 16px currentColor, 0 0 32px currentColor, 0 0 48px currentColor; }
}

/* ===== NAV ===== */
.site-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 24px;
  font-size: 14px;
  letter-spacing: 0.2em;
}

.site-nav a {
  color: var(--c-green);
  text-shadow: var(--c-glow-sm);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  border-color: var(--c-green);
  background: rgba(0, 255, 102, 0.08);
}

/* ===== FEATURED GAME (HOMEPAGE) ===== */
.featured {
  text-align: center;
  margin: 60px 0 80px;
}

.featured-label {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.5em;
  color: var(--c-yellow);
  text-shadow: 0 0 8px var(--c-yellow), 0 0 16px var(--c-yellow);
  margin-bottom: 24px;
  padding: 4px 16px;
  border: 1px solid var(--c-yellow);
}

.featured-title {
  font-size: clamp(48px, 7vw, 88px);
  font-weight: bold;
  text-shadow: var(--c-glow-md);
  letter-spacing: 0.04em;
  line-height: 1;
  margin-bottom: 20px;
}

.featured-desc {
  font-size: clamp(14px, 1.6vw, 18px);
  letter-spacing: 0.15em;
  margin-bottom: 36px;
  text-shadow: var(--c-glow-sm);
  opacity: 0.9;
}

/* ===== BUTTON (ARCADE STYLE) ===== */
.c-btn {
  display: inline-block;
  font-family: 'Courier New', Courier, monospace;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 0.3em;
  color: var(--c-green);
  background: transparent;
  border: 2px solid var(--c-green);
  padding: 14px 36px;
  text-decoration: none;
  text-shadow: var(--c-glow-sm);
  cursor: pointer;
  transition: all 0.2s;
  animation: btn-pulse 2s ease-in-out infinite;
}

.c-btn:hover {
  background: var(--c-green);
  color: var(--c-bg);
  text-shadow: none;
  box-shadow: var(--c-glow-md);
  animation: none;
}

.c-btn--lg {
  font-size: 22px;
  padding: 18px 48px;
}

@keyframes btn-pulse {
  0%, 100% { box-shadow: 0 0 6px var(--c-green), inset 0 0 6px rgba(0, 255, 102, 0.2); }
  50%      { box-shadow: 0 0 16px var(--c-green), inset 0 0 12px rgba(0, 255, 102, 0.3); }
}

/* ===== GAME GRID ===== */
.section-heading {
  text-align: center;
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: 0.4em;
  text-shadow: var(--c-glow-sm);
  margin-bottom: 40px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--c-green-dim);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

.game-card {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  border: 2px solid var(--c-green-dim);
  background: rgba(0, 255, 102, 0.02);
  text-decoration: none;
  color: var(--c-green);
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 102, 0.08), transparent);
  transition: left 0.5s;
}

.game-card:hover {
  border-color: var(--c-green);
  background: rgba(0, 255, 102, 0.06);
  transform: translateY(-3px);
  box-shadow: 0 0 24px rgba(0, 255, 102, 0.3);
}

.game-card:hover::before {
  left: 100%;
}

.game-card-title {
  font-size: 24px;
  font-weight: bold;
  text-shadow: var(--c-glow-sm);
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.game-card-desc {
  font-size: 13px;
  letter-spacing: 0.1em;
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 20px;
  opacity: 0.9;
}

.game-card-play {
  font-size: 13px;
  letter-spacing: 0.4em;
  color: var(--c-yellow);
  text-shadow: 0 0 6px var(--c-yellow);
  text-align: right;
  margin-top: auto;
}

/* ===== GAME PAGE (with iframe) ===== */
.game-page-header {
  text-align: center;
  margin-bottom: 30px;
}

.game-page-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: bold;
  text-shadow: var(--c-glow-md);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.game-page-version {
  font-size: 14px;
  letter-spacing: 0.3em;
  opacity: 0.6;
  margin-bottom: 16px;
}

.game-page-desc {
  font-size: 15px;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
  text-shadow: var(--c-glow-sm);
}

.game-page-controls {
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--c-green-dim);
  margin-bottom: 24px;
}

.game-frame-wrap {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto 40px;
  border: 2px solid var(--c-green);
  box-shadow: 0 0 24px rgba(0, 255, 102, 0.3);
  background: var(--c-bg);
}

.game-frame {
  display: block;
  width: 100%;
  height: 720px;
  border: none;
  background: var(--c-bg);
}

@media (max-width: 768px) {
  .game-frame { height: 560px; }
}

.game-page-back {
  text-align: center;
  margin-top: 24px;
}

/* ===== ARCADE TEXT PAGES (About, Contact, 404) ===== */
.arcade-page {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.arcade-page-title {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: bold;
  text-shadow: var(--c-glow-md);
  letter-spacing: 0.15em;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--c-green-dim);
}

.arcade-page p {
  font-size: 16px;
  letter-spacing: 0.1em;
  line-height: 1.9;
  margin-bottom: 22px;
  text-shadow: var(--c-glow-sm);
}

.arcade-page p.emphasis {
  color: var(--c-yellow);
  text-shadow: 0 0 8px var(--c-yellow);
  letter-spacing: 0.25em;
  font-size: 18px;
  margin: 36px 0;
}

.arcade-page h2 {
  font-size: clamp(20px, 3.5vw, 26px);
  font-weight: bold;
  letter-spacing: 0.2em;
  color: var(--c-green);
  text-shadow: var(--c-glow-md);
  margin: 48px 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--c-green-dim);
}

.arcade-page h2:first-of-type {
  margin-top: 40px;
}

.arcade-email {
  font-size: 18px;
  letter-spacing: 0.15em;
  color: var(--c-yellow);
  text-shadow: 0 0 8px var(--c-yellow), 0 0 16px var(--c-yellow);
  margin: 12px 0;
  user-select: all;
}

/* ===== READABLE VARIANT (Privacy, Terms) ===== */
.readable {
  background: var(--c-bg);
}

.readable .readable-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  color: var(--c-text-light);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

.readable h1 {
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(28px, 4vw, 40px);
  color: var(--c-green);
  text-shadow: var(--c-glow-sm);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--c-green-dim);
}

.readable h2 {
  font-family: 'Courier New', Courier, monospace;
  font-size: 22px;
  color: var(--c-green);
  text-shadow: 0 0 4px var(--c-green);
  letter-spacing: 0.05em;
  margin-top: 36px;
  margin-bottom: 14px;
}

.readable h3 {
  font-family: 'Courier New', Courier, monospace;
  font-size: 17px;
  color: var(--c-green);
  letter-spacing: 0.04em;
  margin-top: 24px;
  margin-bottom: 10px;
}

.readable p, .readable li {
  margin-bottom: 14px;
  color: var(--c-text-light);
}

.readable ul, .readable ol {
  padding-left: 28px;
  margin-bottom: 14px;
}

.readable li {
  margin-bottom: 8px;
}

.readable strong {
  color: #ffffff;
}

.readable a {
  color: var(--c-green);
  text-decoration: underline;
}

.readable a:hover {
  text-shadow: 0 0 4px var(--c-green);
}

.readable .meta {
  color: var(--c-text-mid);
  font-size: 14px;
  margin-bottom: 24px;
}

/* ===== FOOTER ===== */
.site-footer {
  margin-top: 80px;
  padding-top: 30px;
  border-top: 1px solid var(--c-green-dim);
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--c-green-dim);
}

.site-footer a {
  color: var(--c-green-dim);
  text-decoration: none;
  margin: 0 12px;
  transition: color 0.2s;
}

.site-footer a:hover {
  color: var(--c-green);
  text-shadow: var(--c-glow-sm);
}

.site-footer .footer-copy {
  margin-top: 14px;
  opacity: 0.6;
}

/* ===== UTILITY ===== */
.center { text-align: center; }
.spacer-sm { height: 20px; }
.spacer-md { height: 40px; }
.spacer-lg { height: 60px; }

/* ===== CATEGORY NAV (v1.9) ===== */
/* Top horizontal nav row above the featured section. Filter-only — no URL change. */
.category-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 30px 0 30px;
  flex-wrap: wrap;
}

.category-btn {
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--c-green-dim);
  background: transparent;
  border: 1px solid var(--c-green-dim);
  padding: 10px 22px;
  cursor: pointer;
  transition: all 0.2s;
  text-shadow: 0 0 4px currentColor;
}

.category-btn:hover {
  color: var(--c-green);
  border-color: var(--c-green);
  text-shadow: var(--c-glow-sm);
}

.category-btn.active {
  color: var(--c-green);
  border-color: var(--c-green);
  text-shadow: var(--c-glow-sm);
  background: rgba(0, 255, 102, 0.08);
}

/* ===== DAILY BADGES (v1.9) ===== */
/* Yellow "DAILY" badge that appears on the featured slot and on daily game cards. */
.featured-daily-badge {
  display: inline-block;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  letter-spacing: 0.4em;
  color: var(--c-yellow-bright);
  text-shadow: 0 0 8px var(--c-yellow-bright), 0 0 16px var(--c-yellow-bright);
  border: 1px solid var(--c-yellow-bright);
  padding: 4px 14px;
  margin-bottom: 18px;
  margin-top: -8px;
}

.game-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--c-yellow-bright);
  text-shadow: 0 0 6px var(--c-yellow-bright);
  border: 1px solid var(--c-yellow-bright);
  padding: 2px 8px;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2;
}

/* Daily cards get a subtle yellow accent on hover */
.game-card[data-category="daily"]:hover {
  border-color: var(--c-yellow-bright);
  box-shadow: 0 0 24px rgba(255, 255, 68, 0.3);
}

.game-card[data-category="daily"]:hover .game-card-title {
  color: var(--c-yellow-bright);
  text-shadow: 0 0 8px var(--c-yellow-bright);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .site-wrap { padding: 24px 16px 60px; }
  .site-header { padding: 24px 0 20px; margin-bottom: 30px; }
  .site-nav { gap: 12px; font-size: 12px; }
  .site-nav a { padding: 4px 8px; }
  .featured { margin: 30px 0 50px; }
  .game-grid { gap: 16px; }
  .game-card { padding: 20px 18px; }
  .category-btn { font-size: 11px; padding: 8px 14px; letter-spacing: 0.2em; }
  .game-card-badge { font-size: 9px; top: 8px; right: 8px; }
}

/* ============================================================
   GAME PAGE SIDEBAR LAYOUT (v1.13)
   Used only on /games/*.html pages. Replaces the wrapper chrome.
   Body adds class "game-page" to opt into this layout.
   ============================================================ */

body.game-page {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow: hidden;  /* no outer scrollbar; game iframe handles its own */
}

/* Outer flex container: sidebar on left, game on right */
.game-shell {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar — desktop default */
.game-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: #000;
  border-right: 1px solid var(--c-green-dim);
  padding: 24px 0 24px 0;
  overflow-y: auto;
  z-index: 100;
}

.game-sidebar-wordmark {
  display: block;
  text-align: center;
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
  font-size: 16px;
  color: var(--c-green);
  text-shadow: var(--c-glow-sm);
  text-decoration: none;
  letter-spacing: 0.05em;
  padding: 0 16px 18px 16px;
  border-bottom: 1px solid var(--c-green-dim);
  margin-bottom: 16px;
}

.game-sidebar-wordmark .letter-c {
  color: var(--c-green);
}

.game-sidebar-group {
  padding: 0;
  margin: 0 0 18px 0;
}

.game-sidebar-group-label {
  font-family: 'Courier New', Courier, monospace;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.25em;
  color: var(--c-text-mid);
  padding: 0 16px;
  margin-bottom: 6px;
}

.game-sidebar-link {
  display: block;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.1em;
  color: var(--c-text-light);
  text-decoration: none;
  padding: 8px 16px;
  border-left: 3px solid transparent;
  transition: color 80ms, border-color 80ms, background 80ms;
}

.game-sidebar-link:hover {
  color: var(--c-green);
  background: rgba(0, 255, 102, 0.06);
}

.game-sidebar-link.current {
  color: var(--c-green);
  text-shadow: var(--c-glow-sm);
  border-left-color: var(--c-green);
  background: rgba(0, 255, 102, 0.08);
}

.game-sidebar-home {
  /* The HOME link gets a small bit of breathing room above it */
  padding-top: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--c-green-dim);
  padding-bottom: 14px;
}

/* Main area — game iframe fills it completely */
.game-main {
  flex: 1;
  position: relative;
  background: #000;
  overflow: hidden;
}

.game-main iframe.game-full {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  margin: 0;
  padding: 0;
}

/* ============================================================
   v1.14.9: Fullscreen button — top-right corner of game-main.
   Uses native Fullscreen API where available (desktop, most Android);
   falls back to CSS pseudo-fullscreen on iOS Safari (which doesn't
   support requestFullscreen on iframe elements).
   ============================================================ */
.game-fullscreen-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 150;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--c-green);
  color: var(--c-green);
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.18em;
  cursor: pointer;
  text-shadow: var(--c-glow-sm);
  box-shadow: 0 0 6px rgba(0, 255, 102, 0.3);
  opacity: 0.55;
  transition: opacity 0.15s, background 0.15s;
}
.game-fullscreen-btn:hover {
  opacity: 1;
  background: rgba(0, 255, 102, 0.12);
}
.game-fullscreen-btn .gfb-icon {
  font-size: 14px;
  line-height: 1;
}
.game-fullscreen-btn .gfb-label {
  display: inline-block;
}
/* When the game IS in CSS pseudo-fullscreen (iOS fallback), the button stays
   visible and reads "EXIT" so the player can collapse out. */
.game-main.css-fullscreen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  background: #000;
}

/* On very narrow screens, hide the label and keep just the icon to save space. */
@media (max-width: 480px) {
  .game-fullscreen-btn .gfb-label { display: none; }
  .game-fullscreen-btn { padding: 0 9px; gap: 0; }
}

/* Hamburger button — hidden on desktop */
.game-hamburger {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  width: 40px;
  height: 40px;
  background: #000;
  border: 1px solid var(--c-green);
  color: var(--c-green);
  font-family: 'Courier New', Courier, monospace;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  text-shadow: var(--c-glow-sm);
  box-shadow: 0 0 8px rgba(0, 255, 102, 0.4);
}

.game-hamburger:hover {
  background: rgba(0, 255, 102, 0.1);
}

/* Backdrop overlay for mobile drawer */
.game-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 99;
}

/* Mobile / small-tablet — hamburger drawer mode */
@media (max-width: 899px) {
  .game-hamburger {
    display: block;
  }

  .game-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 240px;
    transform: translateX(-100%);
    transition: transform 200ms ease-out;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.8);
  }

  body.game-page.sidebar-open .game-sidebar {
    transform: translateX(0);
  }

  body.game-page.sidebar-open .game-sidebar-backdrop {
    display: block;
  }

  .game-main {
    width: 100vw;
  }
}

/* ============================================================
   v1.14.0 — Daily-game cards in the sidebar.
   When a daily game has plays available, its sidebar entry is a "card" with:
   - rotating rainbow conic-gradient border (6s lap, perimeter colors flow)
   - comet with 5-particle trail orbiting the perimeter (3.5s orbit, 8s color cycle)
   - "X/Y PLAYS AVAILABLE" tag in yellow
   - Game name in yellow with breathing-glow pulse
   When 0 plays remain, all decoration is removed; card becomes a grey, static
   "COME BACK TOMORROW" tile.
   ============================================================ */

/* Houdini custom property — registered so it can be animated as an angle.
   Without @property, CSS would treat conic-gradient `from var(--rainbow-angle)`
   as a string and refuse to interpolate. */
@property --rainbow-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

/* Card wrapper — sits in place of a regular .game-sidebar-link for daily games */
.game-sidebar-daily-card {
  position: relative;
  margin: 6px 10px;
  padding: 2px;  /* space for the rainbow ring */
  border-radius: 3px;
  isolation: isolate;
}

/* The rainbow ring — conic-gradient with all 25 Noms palette colors.
   `from var(--rainbow-angle)` is animated to slide colors around the rect
   without rotating the rect itself. */
.game-sidebar-daily-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 3px;
  padding: 1px;  /* visible border thickness */
  background:
    conic-gradient(
      from var(--rainbow-angle),
      #ff4444 0%, #ff8844 4%, #ffcc44 8%, #ffff44 12%, #aaff44 16%, #44ff44 20%,
      #44ffaa 24%, #44ffff 28%, #44aaff 32%, #4488ff 36%, #4444ff 40%, #8844ff 44%,
      #cc44ff 48%, #ff44ff 52%, #ff44aa 56%, #ff4488 60%, #ff6666 64%, #ffaa66 68%,
      #ffdd66 72%, #aaff66 76%, #66ffaa 80%, #66ddff 84%, #aa66ff 88%, #ff66dd 92%,
      #ff8888 96%, #ff4444 100%
    );
  /* Mask trick: show the gradient ONLY in the 1px border area.
     Two stacked black layers: outer covers full card, inner (content-box)
     subtracts the interior. XOR/exclude leaves only the ring visible. */
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
          mask-composite: exclude;
  animation: gsdcMarqueeColors 6s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes gsdcMarqueeColors {
  to { --rainbow-angle: 360deg; }
}

/* Card inner — black bg with card content above the rainbow ring */
.game-sidebar-daily-card-inner {
  position: relative;
  background: #000;
  border-radius: 2px;
  padding: 6px 8px 8px;
  z-index: 1;
}

/* The "PLAYS AVAILABLE" tag above the game name */
.game-sidebar-daily-card .gsdc-tag {
  display: block;
  font-family: 'Courier New', Courier, monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--c-yellow-bright);
  text-shadow: 0 0 4px rgba(255, 255, 68, 0.6);
  margin-bottom: 4px;
  padding-left: 8px;
}

/* The game-name link inside the card — yellow with breathing pulse */
.game-sidebar-daily-card .game-sidebar-link {
  color: var(--c-yellow-bright);
  padding: 4px 0 4px 8px;
  border-left: none;
  animation: gsdcTextPulse 2.2s ease-in-out infinite;
}
.game-sidebar-daily-card .game-sidebar-link:hover {
  color: #ffffff;
  background: transparent;  /* don't conflict with the rainbow */
}

@keyframes gsdcTextPulse {
  0%, 100% {
    text-shadow: 0 0 3px rgba(255, 255, 68, 0.45), 0 0 7px rgba(255, 255, 68, 0.25);
  }
  50% {
    text-shadow: 0 0 9px rgba(255, 255, 68, 1), 0 0 20px rgba(255, 255, 68, 0.65), 0 0 30px rgba(255, 255, 68, 0.3);
  }
}

/* If a daily card is for the CURRENT page, keep the rainbow but also tint the
   game name green-phosphor to signal "you're here." Removes the yellow pulse. */
.game-sidebar-daily-card .game-sidebar-link.current {
  color: var(--c-green);
  text-shadow: var(--c-glow-sm);
  animation: none;
  background: rgba(0, 255, 102, 0.08);
}

/* ====== COMET — head + 5 tail particles orbiting the card perimeter ======
   Travels on 3.5s loop using cometTravel keyframes (path).
   Color-cycles on 8s loop using cometRainbow keyframes (color).
   Tail particles use positive animation-delays to LAG behind the head.
   Card geometry is ~200×50 → keyframe percentages 40/10/40/10 give uniform
   visual speed across long/short edges. */
.gsdc-comet {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation:
    gsdcCometTravel 3.5s linear infinite,
    gsdcCometRainbow 8s linear infinite;
  z-index: 10;
}
.gsdc-comet-head { width: 7px; height: 7px; }
.gsdc-comet-t1   { width: 6px; height: 6px; animation-delay: 0.035s, 0.035s; }
.gsdc-comet-t2   { width: 5px; height: 5px; animation-delay: 0.07s,  0.07s; }
.gsdc-comet-t3   { width: 4px; height: 4px; animation-delay: 0.105s, 0.105s; }
.gsdc-comet-t4   { width: 3px; height: 3px; animation-delay: 0.14s,  0.14s; }
.gsdc-comet-t5   { width: 2px; height: 2px; animation-delay: 0.175s, 0.175s; }

@keyframes gsdcCometTravel {
  0%   { top: -3px;             left: -3px; }
  40%  { top: -3px;             left: calc(100% - 3px); }
  50%  { top: calc(100% - 3px); left: calc(100% - 3px); }
  90%  { top: calc(100% - 3px); left: -3px; }
  100% { top: -3px;             left: -3px; }
}

@keyframes gsdcCometRainbow {
  0%   { background:#ff4444; box-shadow:0 0 6px #ff4444, 0 0 14px #ff4444, 0 0 22px rgba(255,68,68,0.6); }
  4%   { background:#ff8844; box-shadow:0 0 6px #ff8844, 0 0 14px #ff8844, 0 0 22px rgba(255,136,68,0.6); }
  8%   { background:#ffcc44; box-shadow:0 0 6px #ffcc44, 0 0 14px #ffcc44, 0 0 22px rgba(255,204,68,0.6); }
  12%  { background:#ffff44; box-shadow:0 0 6px #ffff44, 0 0 14px #ffff44, 0 0 22px rgba(255,255,68,0.6); }
  16%  { background:#aaff44; box-shadow:0 0 6px #aaff44, 0 0 14px #aaff44, 0 0 22px rgba(170,255,68,0.6); }
  20%  { background:#44ff44; box-shadow:0 0 6px #44ff44, 0 0 14px #44ff44, 0 0 22px rgba(68,255,68,0.6); }
  24%  { background:#44ffaa; box-shadow:0 0 6px #44ffaa, 0 0 14px #44ffaa, 0 0 22px rgba(68,255,170,0.6); }
  28%  { background:#44ffff; box-shadow:0 0 6px #44ffff, 0 0 14px #44ffff, 0 0 22px rgba(68,255,255,0.6); }
  32%  { background:#44aaff; box-shadow:0 0 6px #44aaff, 0 0 14px #44aaff, 0 0 22px rgba(68,170,255,0.6); }
  36%  { background:#4488ff; box-shadow:0 0 6px #4488ff, 0 0 14px #4488ff, 0 0 22px rgba(68,136,255,0.6); }
  40%  { background:#4444ff; box-shadow:0 0 6px #4444ff, 0 0 14px #4444ff, 0 0 22px rgba(68,68,255,0.6); }
  44%  { background:#8844ff; box-shadow:0 0 6px #8844ff, 0 0 14px #8844ff, 0 0 22px rgba(136,68,255,0.6); }
  48%  { background:#cc44ff; box-shadow:0 0 6px #cc44ff, 0 0 14px #cc44ff, 0 0 22px rgba(204,68,255,0.6); }
  52%  { background:#ff44ff; box-shadow:0 0 6px #ff44ff, 0 0 14px #ff44ff, 0 0 22px rgba(255,68,255,0.6); }
  56%  { background:#ff44aa; box-shadow:0 0 6px #ff44aa, 0 0 14px #ff44aa, 0 0 22px rgba(255,68,170,0.6); }
  60%  { background:#ff4488; box-shadow:0 0 6px #ff4488, 0 0 14px #ff4488, 0 0 22px rgba(255,68,136,0.6); }
  64%  { background:#ff6666; box-shadow:0 0 6px #ff6666, 0 0 14px #ff6666, 0 0 22px rgba(255,102,102,0.6); }
  68%  { background:#ffaa66; box-shadow:0 0 6px #ffaa66, 0 0 14px #ffaa66, 0 0 22px rgba(255,170,102,0.6); }
  72%  { background:#ffdd66; box-shadow:0 0 6px #ffdd66, 0 0 14px #ffdd66, 0 0 22px rgba(255,221,102,0.6); }
  76%  { background:#aaff66; box-shadow:0 0 6px #aaff66, 0 0 14px #aaff66, 0 0 22px rgba(170,255,102,0.6); }
  80%  { background:#66ffaa; box-shadow:0 0 6px #66ffaa, 0 0 14px #66ffaa, 0 0 22px rgba(102,255,170,0.6); }
  84%  { background:#66ddff; box-shadow:0 0 6px #66ddff, 0 0 14px #66ddff, 0 0 22px rgba(102,221,255,0.6); }
  88%  { background:#aa66ff; box-shadow:0 0 6px #aa66ff, 0 0 14px #aa66ff, 0 0 22px rgba(170,102,255,0.6); }
  92%  { background:#ff66dd; box-shadow:0 0 6px #ff66dd, 0 0 14px #ff66dd, 0 0 22px rgba(255,102,221,0.6); }
  96%  { background:#ff8888; box-shadow:0 0 6px #ff8888, 0 0 14px #ff8888, 0 0 22px rgba(255,136,136,0.6); }
  100% { background:#ff4444; box-shadow:0 0 6px #ff4444, 0 0 14px #ff4444, 0 0 22px rgba(255,68,68,0.6); }
}

/* ====== EXHAUSTED STATE — applied when plays = 0 today ======
   Strips all animations. Card becomes a static grey tile. */
.game-sidebar-daily-card.exhausted::before { display: none; }
.game-sidebar-daily-card.exhausted .gsdc-comet { display: none; }
.game-sidebar-daily-card.exhausted {
  border: 1px solid #333;
  padding: 6px 8px 8px;
}
.game-sidebar-daily-card.exhausted .game-sidebar-daily-card-inner {
  background: transparent;
  padding: 0;
}
.game-sidebar-daily-card.exhausted .gsdc-tag {
  color: #777;
  text-shadow: none;
}
.game-sidebar-daily-card.exhausted .game-sidebar-link {
  color: #999;
  animation: none;
  text-shadow: none;
}

/* Reduced-motion accessibility — kill the rainbow + comet, keep static yellow
   border and game-name text. Browsers respecting prefers-reduced-motion get a
   calmer experience without losing the daily-game emphasis. */
@media (prefers-reduced-motion: reduce) {
  .game-sidebar-daily-card::before {
    animation: none;
    background: var(--c-yellow-bright);
  }
  .game-sidebar-daily-card .gsdc-comet { display: none; }
  .game-sidebar-daily-card .game-sidebar-link { animation: none; }
}

/* ============================================================
   v1.14.0 — Homepage sidebar layout.
   Existing .site-wrap stays for the homepage's max-width content. The sidebar
   is positioned ALONGSIDE it as a sibling, starting below .site-header.
   On mobile, sidebar becomes a drawer (same hamburger pattern as game pages).
   ============================================================ */

/* Body opts into the homepage-sidebar layout with .home-page class */
body.home-page .home-shell {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

body.home-page .game-sidebar {
  position: sticky;
  top: 0;
  align-self: stretch;
  min-height: 100vh;
  /* override desktop-game-page sidebar height behavior */
  height: auto;
}

body.home-page .home-main {
  flex: 1;
  min-width: 0;
  /* let .site-wrap inside this main column govern padding */
}

/* Below 900px breakpoint, sidebar collapses to a drawer just like game pages */
@media (max-width: 899px) {
  body.home-page .game-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 240px;
    transform: translateX(-100%);
    transition: transform 200ms ease-out;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.8);
    z-index: 1000;
  }

  body.home-page.sidebar-open .game-sidebar {
    transform: translateX(0);
  }

  body.home-page.sidebar-open .game-sidebar-backdrop {
    display: block;
  }

  body.home-page .home-main {
    width: 100%;
  }

  /* Mobile hamburger button — same pattern as game pages */
  body.home-page .game-hamburger {
    display: flex;
  }
}

/* ============================================================
   v1.15.0: PWA install banner (iOS only).
   Bottom-of-viewport bar prompting "Add to Home Screen."
   Slides up after 1st full second, dismissable for 30 days.
   ============================================================ */
.pwa-install-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #000;
  border: 1px solid var(--c-green);
  border-radius: 6px;
  color: var(--c-green);
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-shadow: var(--c-glow-sm);
  box-shadow: 0 0 16px rgba(0, 255, 102, 0.4),
              0 -4px 24px rgba(0, 0, 0, 0.6);
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
  /* Respect iOS home indicator area */
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}
.pwa-install-banner.pwa-ib-shown {
  transform: translateY(0);
  opacity: 1;
}
.pwa-install-banner.pwa-ib-leaving {
  transform: translateY(120%);
  opacity: 0;
}
.pwa-install-banner .pwa-ib-text { flex: 1; min-width: 0; }
.pwa-install-banner .pwa-ib-text strong {
  color: var(--c-yellow-bright);
  letter-spacing: 0.2em;
  text-shadow: 0 0 6px var(--c-yellow-bright);
  font-size: 12px;
  display: inline-block;
  margin-bottom: 4px;
}
.pwa-install-banner .pwa-ib-share,
.pwa-install-banner .pwa-ib-add {
  color: var(--c-yellow-bright);
  text-shadow: 0 0 4px var(--c-yellow-bright);
  font-weight: bold;
}
.pwa-install-banner .pwa-ib-close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  background: transparent;
  border: 1px solid var(--c-green);
  border-radius: 3px;
  color: var(--c-green);
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  text-shadow: var(--c-glow-sm);
  padding: 0;
  line-height: 1;
}
.pwa-install-banner .pwa-ib-close:hover,
.pwa-install-banner .pwa-ib-close:active {
  background: rgba(0, 255, 102, 0.12);
}
