/* Games by TS Black - hub landing page */

:root {
  --bg: #0b0b16;
  --bg-2: #11111f;
  --panel: #16162a;
  --line: #262640;
  --text: #e8e8f5;
  --muted: #9a9ab8;
  --accent: #5858FD;
  --accent-soft: rgba(88, 88, 253, 0.14);
  --amber: #ffb703;
  --radius: 14px;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

/* A class that sets `display` beats the browser's own `[hidden]` rule, so an
   element hidden from JavaScript with `el.hidden = true` stays on screen and
   the code looks correct while doing nothing. That is exactly how the Fire
   button stayed visible without a blaster: `.tbtn` sets `display: grid`. This
   reset settles it for every element, now and later. */
[hidden] { display: none !important; }


html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.wrap { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.wrap.narrow { width: min(760px, calc(100% - 40px)); }

/* Header */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 11, 22, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.5px;
}
.brand-text { font-size: 16px; }
.brand-text em { font-style: normal; color: var(--muted); font-weight: 500; }
.head-nav { display: flex; gap: 22px; font-size: 14px; }
.head-nav a { color: var(--muted); text-decoration: none; transition: color .15s ease; }
.head-nav a:hover { color: var(--text); }

/* Hero */
.hero {
  padding: 84px 0 64px;
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(88, 88, 253, 0.22), transparent 60%),
    radial-gradient(700px 380px at 92% 8%, rgba(255, 183, 3, 0.10), transparent 60%);
}
.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 5px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: #b9b9ff;
  font-size: 12.5px;
  letter-spacing: 0.3px;
}
.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 60px);
  line-height: 1.08;
  letter-spacing: -1px;
}
.lede { max-width: 620px; margin: 0 0 30px; color: var(--muted); font-size: 17.5px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 26px rgba(88, 88, 253, 0.35); }
.btn-primary:hover { background: #4646e0; }
.btn-ghost { border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin: 46px 0 0;
  padding: 0;
  list-style: none;
}
.hero-facts li { display: flex; flex-direction: column; }
.hero-facts strong { font-size: 26px; letter-spacing: -0.5px; }
.hero-facts span { color: var(--muted); font-size: 13.5px; }

/* Sections */
.section { padding: 66px 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-title {
  margin: 0 0 32px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--muted);
}

/* Game cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-color: var(--accent);
}
.btn:focus-visible, .head-nav a:focus-visible, .faq summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.card-art { line-height: 0; border-bottom: 1px solid var(--line); }
.card-art svg { width: 100%; height: auto; display: block; }
.card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.tag {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #b9b9ff;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.card h3 { margin: 12px 0 8px; font-size: 22px; letter-spacing: -0.3px; }
.card p { margin: 0 0 16px; color: var(--muted); font-size: 14.5px; }
.card-meta { margin: 0 0 18px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.card-meta li {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12px;
  color: var(--muted);
}
.card-best {
  margin: 0 0 14px;
  padding: 8px 12px;
  border-radius: 9px;
  background: var(--accent-soft);
  border: 1px solid rgba(88, 88, 253, 0.28);
  color: #c3c3ff;
  font-size: 12.5px;
  font-weight: 600;
}
.card-best[hidden] { display: none; }

.noscript-note {
  margin: 0;
  padding: 14px 24px;
  background: #2a1a1a;
  border-bottom: 1px solid #4a2a2a;
  color: #ffd0d0;
  font-size: 14px;
  text-align: center;
}

.play-link { margin-top: auto; color: var(--accent); font-weight: 600; font-size: 14.5px; }
.play-link::after { content: " >"; }

/* How to play */
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.how-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.how-item h3 { margin: 0 0 16px; font-size: 18px; }
.how-item dl { margin: 0 0 14px; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; }
.how-item dt { color: var(--muted); }
.how-item dd { margin: 0; font-weight: 600; }
.how-note { margin: 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }

/* FAQ */
.faq details {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq summary {
  padding: 15px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--accent); font-size: 18px; line-height: 1; }
.faq details[open] summary::after { content: "-"; }
.faq p { margin: 0; padding: 0 20px 18px; color: var(--muted); font-size: 14.5px; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding: 30px 0 40px; background: var(--bg-2); }
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 13.5px;
}
.foot-inner p { margin: 0; }
.foot-inner a { color: var(--muted); }
.foot-inner a:hover { color: var(--text); }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card:hover, .btn:hover { transform: none; }
}

@media (max-width: 640px) {
  .head-nav { gap: 14px; font-size: 13px; }
  .hero { padding: 56px 0 44px; }
  .hero-facts { gap: 26px; }
  .section { padding: 48px 0; }
}

/* --------------------------------------------------- small screen polish */

/* Footer links were 22px tall, well under a comfortable thumb target. Padding
   them out costs nothing on a desktop and makes them properly tappable. */
.foot-links { gap: 10px 18px; }
.foot-inner a {
  display: inline-block;
  padding: 8px 2px;
  min-height: 24px;
}

@media (max-width: 640px) {
  .foot-inner { gap: 6px; }
  .foot-links { gap: 4px 16px; }
}

/* Keep content clear of notches and the home bar. Narrowing the wrapper rather
   than padding it keeps the layout centred, which padding would not. */
@supports (width: min(1px, 1px)) {
  .wrap {
    width: min(1120px, calc(100% - 40px - env(safe-area-inset-left) - env(safe-area-inset-right)));
  }
  .site-foot { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
}

/* ------------------------------------------------------------- daily strip */
/* Sits above the hero: the daily is the only thing here that changes, so it is
   the only thing worth showing first to someone who has been before. */
.daily {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(120% 140% at 8% 0%, rgba(46, 196, 107, 0.16), rgba(0, 0, 0, 0) 60%),
    radial-gradient(120% 140% at 92% 100%, rgba(88, 88, 253, 0.18), rgba(0, 0, 0, 0) 58%),
    var(--panel);
}
.daily-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding-top: 18px;
  padding-bottom: 18px;
  flex-wrap: wrap;
}
.daily-copy { min-width: 0; }
.daily-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #2ec46b;
}
.daily-title { margin: 0 0 6px; font-size: 24px; letter-spacing: -0.5px; }
.daily-note { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; max-width: 54ch; }
.daily-side { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.daily-cta { white-space: nowrap; }
.daily-streak { margin: 0; width: 100%; text-align: right; color: #ffb703; font-size: 12.5px; }
.daily-marks { display: flex; gap: 5px; }
.daily-marks span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: rgba(8, 8, 20, 0.5);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}
.daily-marks span.is-out { color: #ffd0d0; border-color: rgba(226, 59, 59, 0.6); }

@media (max-width: 640px) {
  .daily-inner { gap: 14px; }
  .daily-side { width: 100%; justify-content: space-between; }
  .daily-streak { text-align: left; }
  .daily-title { font-size: 21px; }
}
