/*
  [INPUT]: 依赖首页与一级游戏页共享的语义结构、图片资源与 data-title 属性
  [OUTPUT]: 对外提供 arcade 黑底布局、默认可见的响应式游戏框、推荐卡片、正文排版
  [POS]: sprinter-game 的共享视觉层，负责把首页与一级游戏页组织成统一的游戏门户
  [PROTOCOL]: 变更时更新此头部，然后检查 AGENTS.md
*/
:root {
  --bg: #030303;
  --panel: #0b0b0b;
  --line: #272727;
  --text: #f7f7f4;
  --muted: #a8a8a8;
  --gold: #ffd84d;
  --orange: #ff6a2a;
  --green: #3ddc84;
  --cyan: #2fd7ff;
  --red: #ff435f;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(160px, 230px) 1fr minmax(180px, 260px);
  align-items: center;
  gap: 24px;
  min-height: 80px;
  padding: 10px 28px;
  background: #000;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-grid;
  width: fit-content;
  line-height: 0.9;
  text-transform: uppercase;
  filter: drop-shadow(3px 3px 0 #191919);
}

.brand-top,
.brand-bottom {
  font-weight: 950;
  letter-spacing: 0;
  -webkit-text-stroke: 1px #fff;
}

.brand-top {
  color: #fff;
  font-size: clamp(1.25rem, 2vw, 1.9rem);
}

.brand-bottom {
  color: var(--gold);
  font-size: clamp(1.55rem, 2.4vw, 2.25rem);
}

.top-nav {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 4vw, 58px);
  font-weight: 800;
  font-size: 0.95rem;
  white-space: nowrap;
}

.top-nav a {
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  color: var(--gold);
  border-color: var(--gold);
  outline: none;
}

.search {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 12px 0 18px;
  background: #fff;
  border-radius: 999px;
}

.search input {
  min-width: 0;
  width: 100%;
  color: #101010;
  background: transparent;
  border: 0;
  outline: 0;
}

.search button {
  position: relative;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.search button span::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  width: 14px;
  height: 14px;
  border: 4px solid #050505;
  border-radius: 50%;
}

.search button span::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 22px;
  width: 12px;
  height: 4px;
  background: #050505;
  transform: rotate(45deg);
  transform-origin: left center;
}

main {
  width: min(100%, 1840px);
  margin: 0 auto;
}

.play-layout {
  display: grid;
  grid-template-columns: 118px minmax(320px, 1024px) 118px;
  justify-content: center;
  gap: clamp(22px, 4vw, 54px);
  padding: 32px 20px 28px;
}

.side-rail {
  display: grid;
  align-content: start;
  gap: 12px;
}

.ad-label {
  margin: 0 0 4px;
  color: #6f6f6f;
  font-size: 0.75rem;
  text-align: center;
}

.rail-card {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  padding: 8px;
  overflow: hidden;
  color: #fff;
  background: #181818;
  border: 1px solid #404040;
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-weight: 950;
  font-size: 0.88rem;
  line-height: 1.18;
  overflow-wrap: anywhere;
  text-align: center;
  text-transform: uppercase;
}

.rail-card img {
  margin: -8px;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rail-card.has-image {
  padding: 0;
}

.rail-card.has-image img {
  margin: 0;
  width: 100%;
  height: 100%;
}

.rail-card:hover,
.rail-card:focus-visible,
.game-card:hover,
.game-card:focus-visible {
  border-color: var(--gold);
  transform: translateY(-2px);
  outline: none;
}

.rail-card,
.game-card {
  transition: transform 160ms ease, border-color 160ms ease;
}

.rail-card-text {
  padding: 10px;
  color: #111;
  background: var(--gold);
}

.rail-card-art,
.art-card {
  padding: 10px;
  isolation: isolate;
}

.teal {
  background: #006b6f;
}

.orange {
  background: #9f3c12;
}

.violet {
  background: #5524a0;
}

.green {
  background: #0f773d;
}

.red {
  background: #9c1730;
}

.blue {
  background: #124a9f;
}

.yellow {
  color: #111;
  background: #f5d03e;
}

.game-column {
  min-width: 0;
}

.game-stage {
  overflow: hidden;
  background: #101010;
  border: 1px solid #252525;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.frame-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 280px;
  background: #151515;
}

#game-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #050505;
}

.game-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 50px;
  padding: 8px 14px;
  color: #202020;
  background: #f5f5f2;
}

.rating {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
}

.rating span {
  color: #ffb12b;
  font-size: 1.05rem;
}

.rating strong {
  color: #555;
}

.status {
  margin: 0;
  overflow: hidden;
  color: #5b5b5b;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-actions {
  display: flex;
  gap: 8px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #060606;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 950;
  font-size: 1rem;
}

.icon-button:hover,
.icon-button:focus-visible {
  color: var(--orange);
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.game-strip {
  padding: 10px 40px 32px;
}

.game-strip .section-title {
  margin: 0 0 18px;
  text-align: center;
  text-transform: uppercase;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  line-height: 1;
  color: #fff;
  text-shadow: 0 3px 0 #111, 0 0 0 #fff;
  -webkit-text-stroke: 1px #fff;
}

.strip-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(120px, 1fr));
  gap: 10px;
}

.game-card {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 132px;
  overflow: hidden;
  color: #fff;
  background: #171717;
  border: 1px solid #323232;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.game-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card span {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  padding: 10px 8px;
  background: rgba(0, 0, 0, 0.66);
  font-weight: 950;
  font-size: clamp(0.78rem, 1.1vw, 1rem);
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
}

.game-card.red {
  background: #9c1730;
}

.game-card.blue {
  background: #124a9f;
}

.game-card.yellow {
  color: #111;
  background: #f5d03e;
}

.art-card::before {
  content: "";
  position: absolute;
  inset: 12px 10px 48px;
  border-top: 4px solid rgba(255, 255, 255, 0.55);
  border-bottom: 4px solid rgba(255, 255, 255, 0.38);
  transform: skewY(-8deg);
}

.art-card::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 44px;
  height: 6px;
  background: rgba(255, 255, 255, 0.7);
  transform: skewY(-8deg);
}

.content-panel {
  width: min(100% - 32px, 1040px);
  margin: 12px auto 48px;
  padding: clamp(22px, 4vw, 44px);
  color: #161616;
  background: #f7f5ed;
  border-radius: 8px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #6a6a62;
  font-size: 0.9rem;
}

.breadcrumbs span::before {
  content: "/";
  margin-right: 8px;
  color: #999;
}

.content-panel h1,
.content-panel h2,
.content-panel h3,
.content-panel p {
  letter-spacing: 0;
}

.content-panel h1 {
  margin: 0 0 16px;
  font-size: clamp(2.4rem, 5vw, 4.7rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.content-panel h2 {
  margin: 36px 0 12px;
  font-size: clamp(1.45rem, 2.4vw, 2.05rem);
}

.content-panel h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.content-panel p {
  margin: 0 0 14px;
  color: #333;
  font-size: 1rem;
  line-height: 1.72;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 4px;
}

.quick-links a {
  padding: 9px 12px;
  color: #111;
  background: #fff;
  border: 1px solid #d8d5c9;
  border-radius: 8px;
  font-weight: 800;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.feature-grid > div {
  padding: 16px;
  background: #fff;
  border: 1px solid #ded9c9;
  border-radius: 8px;
}

.faq details {
  padding: 14px 0;
  border-top: 1px solid #d8d1bc;
}

.faq summary {
  cursor: pointer;
  font-weight: 900;
}

.faq p {
  margin-top: 10px;
}

.site-footer {
  padding: 30px 20px 44px;
  color: #8c8c8c;
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.88rem;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1220px) {
  .play-layout {
    grid-template-columns: minmax(320px, 1024px);
  }

  .side-rail {
    display: none;
  }

  .strip-grid {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }
}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px 18px;
  }

  .top-nav {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    overflow: visible;
    white-space: normal;
  }

  .search {
    width: 100%;
  }

  .play-layout {
    padding: 20px 12px;
  }

  .frame-wrap {
    min-height: 220px;
  }

  .game-toolbar {
    grid-template-columns: 1fr auto;
  }

  .status {
    grid-column: 1 / -1;
    order: 3;
    white-space: normal;
  }

  .strip-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

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

@media (max-width: 480px) {
  .game-strip {
    padding-inline: 14px;
  }

  .game-card {
    min-height: 112px;
  }

  .content-panel {
    width: calc(100% - 20px);
    padding: 20px 16px;
  }
}
