:root {
  --bg: #0b0c10;
  --surface: #14151b;
  --surface-2: #1a1c24;
  --line: rgba(255, 255, 255, 0.07);
  --text: #f2f3f7;
  --muted: #9ba0ad;
  --accent: #a970ff;
  --accent-deep: #772ce8;
  --live: #eb0400;
  --money: #4ade80;
  --radius: 14px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: "Sora", "Inter", sans-serif; line-height: 1.15; }

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

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(11, 12, 16, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 34px; height: 34px; object-fit: contain; }
.brand-name { font-family: "Sora", sans-serif; font-weight: 800; font-size: 18px; letter-spacing: 0.04em; }
.brand-chip {
  font-family: "Sora", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  padding: 3px 8px;
  border-radius: 6px;
}

.topnav { display: flex; align-items: center; gap: clamp(12px, 2.5vw, 28px); font-size: 14px; font-weight: 500; }
.topnav a { color: var(--muted); transition: color 140ms ease; padding: 8px 2px; }
.topnav a:hover, .topnav a:focus-visible { color: var(--text); }
.topnav .nav-cta {
  color: #fff;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 8px 16px;
  border-radius: 999px;
  transition: border-color 140ms ease, background 140ms ease;
}
.topnav .nav-cta:hover, .topnav .nav-cta:focus-visible { border-color: var(--accent); background: rgba(169, 112, 255, 0.12); }

.hero {
  position: relative;
  padding: clamp(64px, 10vw, 128px) clamp(16px, 4vw, 40px) clamp(40px, 6vw, 72px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 130%;
  background:
    radial-gradient(38% 55% at 24% 18%, rgba(119, 44, 232, 0.24), transparent 70%),
    radial-gradient(30% 45% at 78% 8%, rgba(74, 222, 128, 0.07), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 880px; margin: 0 auto; text-align: center; }
.hero-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.hero-title { font-size: clamp(38px, 7vw, 68px); font-weight: 800; letter-spacing: -0.02em; }
.hero-sub { max-width: 620px; margin: 22px auto 0; color: var(--muted); font-size: clamp(15px, 2vw, 18px); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: #fff; }
.btn-primary:hover, .btn-primary:focus-visible { filter: brightness(1.08); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover, .btn-ghost:focus-visible { border-color: var(--accent); background: rgba(169, 112, 255, 0.08); }

.section { max-width: 1180px; margin: 0 auto; padding: clamp(36px, 5vw, 64px) clamp(16px, 4vw, 40px); }
.section-head { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.section-head h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 700; letter-spacing: -0.01em; }

[hidden] { display: none !important; }

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--live);
  border-radius: 999px;
  padding: 4px 12px;
}
.live-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.featured {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 18px;
  margin-bottom: 26px;
}
.featured-player {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  aspect-ratio: 16 / 9;
}
.featured-player iframe { width: 100%; height: 100%; border: 0; display: block; }
.featured-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.featured-meta {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.featured-meta .fm-name { font-family: "Sora", sans-serif; font-weight: 700; font-size: 20px; display: flex; align-items: center; gap: 10px; }
.featured-meta .fm-title { color: var(--muted); font-size: 14px; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.featured-meta .fm-stats { display: flex; gap: 14px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.featured-meta .fm-stats b { color: var(--text); font-variant-numeric: tabular-nums; }
.featured-meta .fm-link { margin-top: 16px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 160ms ease, border-color 160ms ease;
}
.card:hover, .card:focus-within { transform: translateY(-3px); border-color: rgba(169, 112, 255, 0.45); }
.card a { display: block; }
.card-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-thumb .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 6px;
  padding: 3px 8px;
  color: #fff;
  background: var(--live);
}
.card-thumb .badge.offline { background: rgba(20, 21, 27, 0.85); color: var(--muted); border: 1px solid var(--line); }
.card-thumb .viewers {
  position: absolute;
  bottom: 10px;
  left: 10px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: rgba(0, 0, 0, 0.65);
  border-radius: 6px;
  padding: 2px 8px;
}
.card-body { display: flex; align-items: center; gap: 12px; padding: 13px 15px; }
.card-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--surface-2); flex-shrink: 0; }
.card-name { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.empty-note {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 42px 16px;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.how-step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.how-step h3 { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.step-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(169, 112, 255, 0.12);
  border: 1px solid rgba(169, 112, 255, 0.3);
  padding: 3px 9px;
  border-radius: 999px;
}
.how-step > p { color: var(--muted); font-size: 14.5px; }

.chatbox {
  margin-top: auto;
  background: #0d0e13;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.75;
}
.chat-title {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.tc-bot { color: var(--accent); font-weight: 700; }
.tc-user { color: #3fbf7f; font-weight: 700; }
.tc-user2 { color: #58a6ff; font-weight: 700; }
.gc-prefix { color: #b57aff; font-weight: 700; }
.gc-money { color: var(--money); font-weight: 600; }
.gc-item { color: #fda24d; font-weight: 600; }
.code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  background: rgba(169, 112, 255, 0.12);
  border: 1px solid rgba(169, 112, 255, 0.3);
  border-radius: 5px;
  padding: 1px 7px;
  color: #d9c2ff;
  font-size: 12.5px;
}

.wins-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.win-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}
.win-row:last-child { border-bottom: 0; }
.win-user { font-weight: 600; }
.win-item { color: var(--money); font-weight: 600; }
.win-meta { margin-left: auto; color: var(--muted); font-size: 12.5px; white-space: nowrap; }

.cta-band {
  max-width: 1180px;
  margin: 0 auto clamp(36px, 5vw, 64px);
  padding: clamp(36px, 5vw, 56px) clamp(20px, 4vw, 48px);
  border-radius: 20px;
  border: 1px solid rgba(169, 112, 255, 0.3);
  background:
    radial-gradient(60% 120% at 50% 0%, rgba(119, 44, 232, 0.18), transparent 70%),
    var(--surface);
  text-align: center;
}
.cta-band h2 { font-size: clamp(22px, 3vw, 30px); }
.cta-band p { color: var(--muted); max-width: 520px; margin: 12px auto 24px; }

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 26px clamp(16px, 4vw, 40px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
}
.footer nav { display: flex; gap: 20px; }
.footer a:hover, .footer a:focus-visible { color: var(--text); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

@media (max-width: 900px) {
  .featured { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .topnav a:not(.nav-cta) { display: none; }
  .win-meta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
