/* ===== crazy8 游戏年鉴 · 深色电竞霓虹 ===== */
:root {
  --bg: #0a0a14;
  --bg-2: #0e0e1c;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e9e9f4;
  --muted: #8f8fad;
  --accent-a: #00e5ff;
  --accent-b: #b44dff;
  --accent-c: #ff4d8d;
  --grad: linear-gradient(120deg, var(--accent-a), var(--accent-b) 55%, var(--accent-c));
  --radius: 16px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(180, 77, 255, 0.14), transparent 60%),
    radial-gradient(900px 500px at 10% 10%, rgba(0, 229, 255, 0.10), transparent 55%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== 背景 ===== */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
}
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: conic-gradient(from 0deg at 50% 0%, transparent, rgba(0, 229, 255, 0.05), transparent 40%);
}

/* ===== Hero ===== */
.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(64px, 12vh, 120px) 24px 48px;
  text-align: center;
}
.hero__kicker {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.35em;
  color: var(--accent-a);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero__title {
  font-size: clamp(40px, 8vw, 76px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.hero__title .accent {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__sub {
  margin-top: 16px;
  color: var(--muted);
  font-size: 18px;
}

/* ===== 统计 ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.stat:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}
.stat__num {
  display: block;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  font-family: var(--mono);
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat__label {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.05em;
}

/* ===== 通用 block ===== */
main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 40px;
}
.block {
  margin-top: 72px;
}
.block__title {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 750;
  letter-spacing: -0.01em;
  position: relative;
  display: inline-block;
}
.block__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 44px;
  height: 3px;
  border-radius: 2px;
  background: var(--grad);
}
.block__hint {
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

/* ===== 数据看板 ===== */
.dash {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.dash > div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(8px);
}
.dash__time {
  grid-column: span 2;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.dash__time::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 180px;
  height: 180px;
  background: var(--grad);
  filter: blur(60px);
  opacity: 0.25;
  border-radius: 50%;
}
.dash__time-num {
  font-family: var(--mono);
  font-size: clamp(48px, 9vw, 84px);
  font-weight: 800;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.dash__time-unit {
  font-size: 24px;
  color: var(--text);
  font-weight: 700;
}
.dash__time-sub {
  display: block;
  width: 100%;
  color: var(--muted);
  font-size: 14px;
}
.dash__facts {
  grid-column: span 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  backdrop-filter: none !important;
}
.fact {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.fact:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.fact__label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.fact__value {
  display: block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.fact__name {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash__title {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.genre-chart { display: flex; flex-direction: column; gap: 12px; }
.gbar { display: grid; grid-template-columns: 92px 1fr 30px; align-items: center; gap: 10px; }
.gbar__label {
  font-size: 13px;
  color: var(--text);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gbar__track {
  height: 10px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.gbar__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.45);
  transform-origin: left;
  animation: gbar-in 0.8s ease both;
}
@keyframes gbar-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.gbar__count {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--mono);
  text-align: right;
}
.gamer-tag {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gamer-desc { margin-top: 10px; color: var(--muted); font-size: 14px; }

/* ===== 高光时刻 ===== */
.highlights {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.hl {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  aspect-ratio: 16 / 10;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.hl:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.25), var(--shadow);
}
.hl__media {
  position: absolute;
  inset: 0;
}
.hl__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.55) saturate(1.1);
}
.hl__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 12px;
  text-align: center;
  background: linear-gradient(140deg, var(--accent-b), var(--accent-a));
}
.hl__placeholder span {
  font-size: 15px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.55);
  line-height: 1.4;
}
.hl__body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 16px;
  background: linear-gradient(transparent, rgba(5, 5, 15, 0.92) 45%);
}
.hl__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent-a);
  text-transform: uppercase;
}
.hl__name {
  font-size: 16px;
  font-weight: 700;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hl__detail {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

/* ===== 工具栏 ===== */
.toolbar {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  font-family: inherit;
  font-size: 13px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.is-active {
  color: #04121a;
  background: var(--grad);
  border-color: transparent;
  font-weight: 700;
}
.search {
  margin-left: auto;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 18px;
  min-width: 220px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search::placeholder { color: var(--muted); }
.search:focus {
  border-color: var(--accent-a);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15);
}

/* ===== 游戏库 ===== */
.library {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: 0 0 0 1px rgba(180, 77, 255, 0.25), var(--shadow);
}
.card__media {
  position: relative;
  aspect-ratio: 460 / 215;
  background: #141425;
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 12px;
  text-align: center;
  background: linear-gradient(140deg, #1c1c34, #24143a);
}
.card__placeholder span {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}
.badge--installed {
  background: rgba(0, 229, 255, 0.16);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: var(--accent-a);
}
.card__body { padding: 14px; }
.card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.card__name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.card__hours {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent-b);
  white-space: nowrap;
  margin-top: 2px;
}
.card__meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}
.card__tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  font-size: 11px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 8px;
}

/* ===== 时间线 ===== */
.timeline {
  margin-top: 28px;
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: linear-gradient(var(--accent-a), var(--accent-b), var(--accent-c));
  border-radius: 2px;
}
.tl-year { position: relative; padding: 0 0 36px; }
.tl-year__label {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 14px;
}
.tl-year__label::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 9px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent-a);
  box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.15), 0 0 16px rgba(0, 229, 255, 0.5);
}
.tl-year__label span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tl-games {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tl-chip {
  display: block;
  width: 184px;
  aspect-ratio: 460 / 215;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}
.tl-chip:hover { transform: scale(1.04); border-color: var(--border-strong); z-index: 1; }
.tl-chip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-chip__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 10px;
  text-align: center;
  background: linear-gradient(140deg, #1c1c34, #24143a);
}
.tl-chip__placeholder span {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.tl-chip .tl-chip__name {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 10px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(transparent, rgba(5, 5, 15, 0.9));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== footer ===== */
.footer {
  max-width: 1080px;
  margin: 80px auto 0;
  padding: 32px 24px 56px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
}
.footer__note { margin-top: 6px; opacity: 0.7; }

.empty { margin-top: 24px; color: var(--muted); text-align: center; }

/* ===== 进入动画 ===== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: none; }
.reveal:nth-child(1) { transition-delay: calc(var(--i, 0) * 30ms); }

/* ===== 响应式 ===== */
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .highlights { grid-template-columns: repeat(2, 1fr); }
  .search { margin-left: 0; width: 100%; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .dash { grid-template-columns: 1fr; }
  .dash__time, .dash__facts { grid-column: span 1; }
  .dash__facts { grid-template-columns: 1fr; }
}
@media (max-width: 440px) {
  .library { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .tl-chip { width: 100%; }
  .gbar { grid-template-columns: 72px 1fr 24px; }
}
