/* =============================================================================
   FreeGameDrop — Public Stylesheet
   Dark gaming theme · Mobile-first · CSS custom properties
   ============================================================================= */

/* ── Fonts ────────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ── Variables ────────────────────────────────────────────────────────────── */
:root {
  --bg-root:        #0a0a12;
  --bg-surface:     #111120;
  --bg-card:        #16162a;
  --bg-card-hover:  #1c1c34;
  --bg-overlay:     rgba(10,10,18,0.85);

  --accent:         #8b5cf6;
  --accent-dark:    #6d28d9;
  --accent-light:   #a78bfa;
  --green:          #10b981;
  --green-dark:     #059669;
  --amber:          #f59e0b;
  --amber-dark:     #d97706;
  --red:            #ef4444;
  --red-dark:       #dc2626;
  --gray:           #374151;
  --gray-light:     #4b5563;

  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;
  --border:         #1e1e35;
  --border-hover:   #2d2d50;

  --shadow-sm:      0 2px 8px rgba(0,0,0,.4);
  --shadow-md:      0 4px 20px rgba(0,0,0,.5);
  --shadow-glow:    0 0 30px rgba(139,92,246,.15);
  --shadow-gold:    0 4px 24px rgba(245,158,11,.2);

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  --font:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --header-h:   64px;
  --ads-h:      90px;
}

/* ── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-root);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--ads-h) + 1rem);
}
img { display: block; max-width: 100%; }
a { color: var(--accent-light); text-decoration: none; }
a:hover { color: var(--accent); }

/* ── Header ───────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(10,10,18,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}
.header-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}
.header-badge {
  margin-left: auto;
  background: var(--green-dark);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
  white-space: nowrap;
}

/* ── Header menu (hamburger) ─────────────────────────────────────────────── */
.menu-wrap { position: relative; flex-shrink: 0; }
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
}
.menu-toggle:hover,
.menu-toggle[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--accent-light);
}
.menu-icon { pointer-events: none; }
.site-menu {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 0;
  min-width: 180px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  z-index: 200;
}
.site-menu[hidden] { display: none; }
.site-menu-link {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
}
.site-menu-link:hover { background: rgba(139,92,246,.12); color: var(--accent-light); }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(180deg, rgba(139,92,246,.08) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 1.25rem 2rem;
  text-align: center;
}
.hero-inner {
  max-width: 640px;
  margin: 0 auto;
}
.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 0.6rem;
  background: linear-gradient(135deg, var(--text-primary) 40%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 1.25rem;
}
.hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0.4rem 1rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.hero-stats .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ── Filters ──────────────────────────────────────────────────────────────── */
.filters-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.filter-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-right: 0.25rem;
}
.filter-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.35rem 0.85rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.filter-sep {
  color: var(--border-hover);
  font-size: 1.1rem;
  margin: 0 .15rem;
  user-select: none;
}

/* ── Grid ─────────────────────────────────────────────────────────────────── */
.games-grid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.no-games {
  text-align: center;
  padding: 5rem 1rem;
  color: var(--text-muted);
}
.no-games .icon { font-size: 3rem; margin-bottom: 1rem; }
.no-games h3 { font-size: 1.2rem; color: var(--text-secondary); }

/* ── Game Card ────────────────────────────────────────────────────────────── */
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  position: relative;
}
.game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  border-color: var(--border-hover);
}
.game-card.expired {
  opacity: 0.6;
}
.game-card.sponsored {
  border-color: var(--amber-dark);
  box-shadow: var(--shadow-gold);
}
.game-card.sponsored:hover {
  box-shadow: var(--shadow-gold), 0 8px 32px rgba(245,158,11,.25);
}

/* Sponsored ribbon */
.sponsored-ribbon {
  position: absolute;
  top: 14px;
  left: -2px;
  z-index: 10;
  background: var(--amber);
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 14px 4px 10px;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%);
  box-shadow: 2px 2px 6px rgba(0,0,0,.4);
}

/* Card image */
.card-img-wrap {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--bg-surface);
  overflow: hidden;
}
.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.game-card:hover .card-img-wrap img {
  transform: scale(1.04);
}
.img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.img-placeholder .ph-icon { font-size: 2.5rem; }

/* Missed Drop overlay */
.missed-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,10,18,.75);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  backdrop-filter: blur(3px);
  text-transform: uppercase;
}

/* Platform badges */
.platform-tags {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.platform-tag {
  background: rgba(0,0,0,.65);
  color: var(--text-secondary);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

/* Card body */
.card-body {
  padding: 1rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.6rem;
}
.card-type-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 4px;
  align-self: flex-start;
  background: rgba(139,92,246,.15);
  color: var(--accent-light);
  border: 1px solid rgba(139,92,246,.25);
}
.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Instructions collapsible */
.card-instructions {
  font-size: 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.card-instructions summary {
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  list-style: none;
  color: var(--accent-light);
  font-weight: 600;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.card-instructions summary::before {
  content: '▶';
  font-size: 0.55rem;
  transition: transform .2s;
}
.card-instructions[open] summary::before { transform: rotate(90deg); }
.card-instructions .instr-body {
  padding: 0.5rem 0.75rem 0.65rem;
  color: var(--text-secondary);
  line-height: 1.5;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,.15);
}

/* Pricing row */
.card-pricing {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: auto;
}
.original-price {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: line-through;
}
.free-badge {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--green-dark);
  color: #fff;
  padding: 2px 10px;
  border-radius: 99px;
}

/* Countdown */
.countdown-wrap {
  background: rgba(0,0,0,.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
}
.countdown-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.countdown-timer {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}
.time-block {
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.time-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  min-width: 1.4ch;
  text-align: center;
}
.time-unit {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}
.time-sep {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.countdown-wrap.urgent .time-val { color: var(--red); }
.countdown-wrap.urgent { border-color: rgba(239,68,68,.35); }
.missed-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Claim button */
.claim-btn {
  display: block;
  text-align: center;
  padding: 0.7rem 1rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: opacity .2s, transform .15s;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  font-family: var(--font);
}
.claim-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  color: #fff;
}
.claim-btn.disabled,
.claim-btn[aria-disabled="true"] {
  background: var(--gray);
  cursor: not-allowed;
  opacity: 0.6;
  pointer-events: none;
  transform: none;
}
.claim-btn.sponsored-btn {
  background: linear-gradient(135deg, var(--amber) 0%, var(--amber-dark) 100%);
  color: #000;
}
.claim-btn.sponsored-btn:hover { opacity: 0.9; color: #000; }

/* Might-be-expired variant — amber, still clickable */
.claim-btn.might-expire-btn {
  background: linear-gradient(135deg, var(--amber) 0%, var(--amber-dark) 100%);
  color: #000;
  font-size: .82rem;
}
.claim-btn.might-expire-btn:hover { opacity: 0.85; color: #000; }

/* Might-expire card — slight amber tint instead of full opacity-0.6 fade */
.game-card.might-expire {
  border-color: rgba(245,158,11,.3);
  opacity: 0.82;
}

/* ── Floating Ads Banner ──────────────────────────────────────────────────── */
.ads-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(10,10,18,.97);
  border-top: 1px solid var(--border);
  min-height: var(--ads-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  backdrop-filter: blur(8px);
}
.ads-close {
  position: absolute;
  top: 6px;
  right: 10px;
  z-index: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color .2s;
}
.ads-close:hover { color: var(--text-primary); }
.ads-inner { text-align: center; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.8;
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent-light); }
.footer-inner { max-width: 1400px; margin: 0 auto; }
.footer-policy-links {
  margin-top: .75rem;
  font-size: .78rem;
}

/* ── Skeleton loading ─────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-card-hover) 50%, var(--bg-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 4px;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .games-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 1rem;
  }
  .hero { padding: 1.75rem 1rem 1.5rem; }
  .hero h1 { font-size: 1.5rem; }
  .filters-wrap { padding: 1rem 1rem 0; }
}

@media (min-width: 601px) and (max-width: 900px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Featured (shared deal) card ──────────────────────────────────────────── */
.game-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(139,92,246,.22), var(--shadow-md);
}
.featured-banner {
  background: linear-gradient(90deg, var(--accent-dark) 0%, var(--accent) 100%);
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 6px 14px;
  text-align: center;
}

/* ── Card actions row (vote + share) ─────────────────────────────────────── */
.card-actions {
  display: flex;
  align-items: stretch;
  gap: .5rem;
  margin-top: .35rem;
}
/* In card-actions context, share btn fills remaining width and loses its own margin */
.card-actions .share-btn {
  flex: 1;
  margin-top: 0;
  min-width: 0;
}

/* ── Vote widget ─────────────────────────────────────────────────────────── */
.vote-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 2.6rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color .2s;
}
.vote-widget:hover { border-color: var(--border-hover); }

.vote-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 1;
  padding: .28rem 0;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: .65rem;
  cursor: pointer;
  line-height: 1;
  font-family: var(--font);
  transition: color .15s, background .15s;
}
.vote-btn:hover:not(:disabled)        { background: rgba(255,255,255,.05); }
.vote-btn.vote-up:hover:not(:disabled),
.vote-btn.vote-up.voted               { color: var(--green); }
.vote-btn.vote-down:hover:not(:disabled),
.vote-btn.vote-down.voted             { color: var(--red); }
.vote-btn:disabled                    { cursor: not-allowed; opacity: .45; }
.vote-btn.voted                       { font-weight: 700; }

.vote-score {
  font-size: .68rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1;
  padding: .18rem 0;
  width: 100%;
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  letter-spacing: -.01em;
  transition: color .2s;
}
.vote-score.pos { color: var(--green); }
.vote-score.neg { color: var(--red); }

/* Vote snackbar (temporary feedback popup) */
.vote-snackbar {
  position: fixed;
  bottom: calc(var(--ads-h, 0px) + 1.2rem);
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-md);
  padding: .65rem 1.2rem;
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  z-index: 600;
  pointer-events: none;
  animation: snackIn .22s ease-out;
}
.vote-snackbar.leaving {
  animation: snackOut .22s ease-in forwards;
}
@keyframes snackIn  { from { opacity:0; transform:translateX(-50%) translateY(8px) } to { opacity:1; transform:translateX(-50%) translateY(0) } }
@keyframes snackOut { from { opacity:1; transform:translateX(-50%) translateY(0) }   to { opacity:0; transform:translateX(-50%) translateY(8px) } }

/* ── Share button ─────────────────────────────────────────────────────────── */
.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  width: 100%;
  padding: .52rem 1rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all .2s;
  margin-top: .35rem;
}
.share-btn:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: rgba(139,92,246,.07);
}

/* ── Share modal ──────────────────────────────────────────────────────────── */
.share-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.share-modal[hidden] { display: none; }

.share-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.share-modal-panel {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 1.5rem 1.5rem 2.5rem;
  width: 100%;
  max-width: 480px;
  animation: shareSlideUp .25s cubic-bezier(.22,.68,0,1.1);
}
@keyframes shareSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@media (min-width: 640px) {
  .share-modal { align-items: center; }
  .share-modal-panel {
    border-radius: var(--radius-xl);
    max-width: 420px;
    margin: 1rem;
    animation: shareFadeIn .2s ease-out;
  }
}
@keyframes shareFadeIn {
  from { opacity: 0; transform: scale(.94); }
  to   { opacity: 1; transform: scale(1); }
}
.share-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .85rem;
}
.share-modal-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}
.share-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  border-radius: 6px;
  transition: color .15s, background .15s;
}
.share-modal-close:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,.07);
}
.share-game-name {
  font-size: .85rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin: 0 0 1rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-url-row {
  display: flex;
  gap: .5rem;
  margin-bottom: .85rem;
}
.share-url-input {
  flex: 1;
  min-width: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: .76rem;
  padding: .5rem .75rem;
  font-family: monospace;
  cursor: text;
}
.share-copy-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: .5rem 1rem;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s;
  font-family: var(--font);
}
.share-copy-btn:hover  { background: var(--accent-dark); }
.share-copy-btn.copied { background: var(--green-dark); }
.share-divider {
  position: relative;
  text-align: center;
  margin: .85rem 0;
  font-size: .72rem;
  color: var(--text-muted);
  letter-spacing: .05em;
  text-transform: uppercase;
}
.share-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1px;
  background: var(--border);
}
.share-divider span {
  position: relative;
  background: var(--bg-card);
  padding: 0 .75rem;
}
.share-apps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .65rem;
}
.share-app-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: .7rem .4rem .5rem;
  cursor: pointer;
  text-decoration: none;
  font-size: .64rem;
  color: var(--text-secondary);
  font-weight: 600;
  transition: all .18s;
  font-family: var(--font);
  letter-spacing: .02em;
}
.share-app-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}
.share-app-icon { font-size: 1.45rem; line-height: 1; }

/* ── Toast notification ───────────────────────────────────────────────────── */
.toast-notification {
  position: fixed;
  top: calc(var(--header-h) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  background: var(--bg-card);
  border: 1px solid var(--amber-dark);
  border-radius: var(--radius-md);
  padding: .72rem 1rem .72rem .9rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .87rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  max-width: min(500px, calc(100vw - 2rem));
  animation: toastIn .3s ease-out;
}
.toast-notification[hidden] { display: none; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to   { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}
.toast-icon    { font-size: 1.1rem; flex-shrink: 0; }
.toast-message { flex: 1; line-height: 1.4; }
.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .9rem;
  padding: 2px 5px;
  flex-shrink: 0;
  border-radius: 4px;
  transition: color .15s, background .15s;
  margin-left: .25rem;
  font-family: var(--font);
}
.toast-close:hover { color: var(--text-primary); background: rgba(255,255,255,.07); }

/* ── Vote Nudge Modal ─────────────────────────────────────────────────────── */
.vote-nudge-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.vote-nudge-modal[hidden] { display: none; }

.vote-nudge-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.vote-nudge-panel {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 1.75rem 1.5rem 2.5rem;
  width: 100%;
  max-width: 480px;
  text-align: center;
  animation: shareSlideUp .28s cubic-bezier(.22,.68,0,1.1);
}
.vote-nudge-skip {
  position: absolute;
  top: .9rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: var(--font);
  letter-spacing: .03em;
  text-transform: uppercase;
  transition: color .15s, background .15s;
}
.vote-nudge-skip:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,.07);
}
.vote-nudge-icon {
  font-size: 2.2rem;
  margin-bottom: .55rem;
  line-height: 1;
}
.vote-nudge-panel h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 .4rem;
}
.vote-nudge-game {
  font-size: .92rem;
  font-weight: 600;
  color: var(--accent-light);
  margin: 0 0 .3rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 2rem;
}
.vote-nudge-sub {
  font-size: .78rem;
  color: var(--text-muted);
  margin: 0 0 1.4rem;
}
.vote-nudge-actions {
  display: flex;
  gap: .75rem;
}
.vote-nudge-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  padding: .9rem .5rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  line-height: 1;
}
.vote-nudge-btn span:first-child { font-size: 1.45rem; }
.vote-nudge-up:hover   { border-color: var(--green);  color: var(--green);  background: rgba(16,185,129,.08); }
.vote-nudge-down:hover { border-color: var(--red);    color: var(--red);    background: rgba(239,68,68,.08);  }
.vote-nudge-up.voted   { border-color: var(--green);  color: var(--green);  background: rgba(16,185,129,.14); }
.vote-nudge-down.voted { border-color: var(--red);    color: var(--red);    background: rgba(239,68,68,.14);  }
.vote-nudge-btn:disabled { opacity: .55; cursor: default; pointer-events: none; }

@media (min-width: 640px) {
  .vote-nudge-modal { align-items: center; }
  .vote-nudge-panel {
    border-radius: var(--radius-xl);
    border-top-width: 1px;
    border-top-color: var(--border-hover);
    border-left: 3px solid var(--accent);
    max-width: 380px;
    margin: 1rem;
    animation: shareFadeIn .2s ease-out;
  }
}

/* ── Cookie Banner ────────────────────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 220;
  background: linear-gradient(135deg, rgba(14,14,26,.98) 0%, rgba(22,22,42,.98) 100%);
  border-top: 2px solid var(--accent);
  padding: .85rem 1.25rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 -4px 30px rgba(139,92,246,.18);
  animation: cookieSlideUp .4s cubic-bezier(.22,.68,0,1.05);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner.cookie-banner-hiding {
  animation: cookieSlideDown .36s ease-in forwards;
}
@keyframes cookieSlideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
@keyframes cookieSlideDown {
  from { transform: translateY(0); }
  to   { transform: translateY(105%); }
}
.cookie-banner-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.cookie-banner-icon {
  font-size: 1.9rem;
  flex-shrink: 0;
  animation: cookieBounce 2.2s ease-in-out infinite;
}
@keyframes cookieBounce {
  0%, 100% { transform: rotate(-6deg) translateY(0); }
  50%      { transform: rotate(6deg)  translateY(-5px); }
}
.cookie-banner-text {
  flex: 1;
  min-width: 200px;
}
.cookie-banner-text strong {
  display: block;
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--accent-light);
  margin-bottom: .22rem;
}
.cookie-banner-text p {
  font-size: .78rem;
  color: var(--text-secondary);
  line-height: 1.45;
}
.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.cookie-btn {
  padding: .45rem .95rem;
  border-radius: var(--radius-sm);
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  border: none;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  transition: all .18s;
  line-height: 1;
}
.cookie-btn-accept {
  background: var(--accent);
  color: #fff;
}
.cookie-btn-accept:hover { background: var(--accent-dark); color: #fff; }
.cookie-btn-reject {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-hover);
}
.cookie-btn-reject:hover { color: var(--text-primary); border-color: var(--text-muted); }
.cookie-btn-more {
  background: none;
  color: var(--text-muted);
  font-size: .74rem;
  font-weight: 600;
  padding: .45rem .65rem;
}
.cookie-btn-more:hover { color: var(--accent-light); }
@media (max-width: 600px) {
  .cookie-banner-inner { gap: .6rem; }
  .cookie-banner-icon  { font-size: 1.5rem; }
  .cookie-banner-actions { width: 100%; justify-content: flex-end; }
}

/* ── PWA Header CTA Button ────────────────────────────────────────────────── */
.header-pwa-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  color: #fff;
  border: none;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .28rem .75rem .28rem .6rem;
  border-radius: 99px;
  white-space: nowrap;
  cursor: pointer;
  font-family: var(--font);
  box-shadow: 0 0 14px rgba(139,92,246,.4);
  transition: box-shadow .2s, transform .15s;
}
.header-pwa-btn:hover  { transform: scale(1.05); box-shadow: 0 0 22px rgba(139,92,246,.6); }
.header-pwa-btn[hidden]{ display: none; }
.header-pwa-icon       { flex-shrink: 0; }

/* ── iOS / Android Install Sheet ─────────────────────────────────────────── */
.pwa-ios-sheet {
  position: fixed;
  inset: 0;
  z-index: 510;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.pwa-ios-sheet[hidden] { display: none; }

.pwa-ios-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.pwa-ios-panel {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 1.75rem 1.5rem 1.5rem;
  width: 100%;
  max-width: 480px;
  text-align: center;
  animation: shareSlideUp .28s cubic-bezier(.22,.68,0,1.1);
}
.pwa-ios-close {
  position: absolute;
  top: .9rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: .88rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: var(--font);
  transition: color .15s, background .15s;
}
.pwa-ios-close:hover { color: var(--text-primary); background: rgba(255,255,255,.07); }
.pwa-ios-icon { font-size: 2.2rem; margin-bottom: .55rem; line-height: 1; }
.pwa-ios-panel h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 .35rem;
}
.pwa-ios-sub {
  font-size: .8rem;
  color: var(--text-muted);
  margin: 0 0 1.2rem;
}
.pwa-ios-steps {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  text-align: left;
  margin-bottom: 1.35rem;
}
.pwa-ios-step {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .65rem .8rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: .84rem;
  color: var(--text-secondary);
  line-height: 1.45;
}
.pwa-ios-step-num {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  margin-top: .08rem;
}
.pwa-ios-share-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  border-radius: 5px;
  padding: 1px 6px;
  font-size: .75rem;
  font-weight: 700;
  vertical-align: middle;
  margin: 0 1px;
}
/* Bouncing arrow pointing toward Safari's bottom toolbar */
.pwa-ios-arrow {
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 13px solid var(--accent);
  margin: 0 auto;
  animation: pwaArrowBounce .9s ease-in-out infinite;
}
@keyframes pwaArrowBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}
@media (min-width: 640px) {
  .pwa-ios-sheet { align-items: center; }
  .pwa-ios-panel {
    border-radius: var(--radius-xl);
    border-top-width: 1px;
    border-left: 3px solid var(--accent);
    max-width: 420px;
    margin: 1rem;
    animation: shareFadeIn .2s ease-out;
  }
  .pwa-ios-arrow { display: none; }
}
