:root {
  --bg: #0c0c10;
  --bg-elev: #16161c;
  --bg-card: #1c1c24;
  --line: #2a2a34;
  --text: #ececf1;
  --muted: #9a9aa8;
  --accent: #ff3b5c;
  --accent-2: #ff6b81;
  --gold: #ffc107;
  --header: 52px;
  --footer: 72px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-top: calc(var(--header) + env(safe-area-inset-top));
  padding-bottom: calc(var(--footer) + env(safe-area-inset-bottom));
  overflow-x: hidden;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.15em;
  fill: currentColor;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  height: calc(var(--header) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(12, 12, 16, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 20px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.45));
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #c8c8d0;
}

.ghost-btn {
  background: none;
  border: none;
  color: inherit;
  padding: 6px;
  font-size: 18px;
}

.header-cta {
  display: none;
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  box-shadow: 0 8px 20px rgba(255, 59, 92, 0.35);
}

.notice {
  overflow: hidden;
  background: #14141a;
  border-bottom: 1px solid var(--line);
  color: #ffb020;
  font-size: 12px;
  padding: 8px 0;
  white-space: nowrap;
}

.notice span {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 22s linear infinite;
}

@keyframes marquee {
  to {
    transform: translateX(-160%);
  }
}

.hero {
  display: grid;
  gap: 12px;
  padding: 18px 16px 8px;
  max-width: 1180px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  font-size: 12px;
  color: var(--muted);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
}

.grid-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 12px 24px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.card {
  background: var(--bg-card);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid transparent;
  animation: rise 0.45s ease both;
}

.card:nth-child(2n) {
  animation-delay: 0.04s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.thumb {
  position: relative;
  padding-top: 138%;
  background: #111;
  overflow: hidden;
}

.thumb video,
.thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  pointer-events: none;
  transition: transform 0.3s ease;
}

.card:hover .thumb video,
.card:hover .thumb img {
  transform: scale(1.05);
}

.thumb .poster {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 20% 10%, rgba(255, 255, 255, 0.18), transparent 42%),
    linear-gradient(160deg, var(--c1, #3a1020), var(--c2, #120814) 55%, #07070a);
}

.thumb .grain {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image: repeating-linear-gradient(
    0deg,
    transparent 0 2px,
    rgba(255, 255, 255, 0.04) 2px 3px
  );
}

.badge {
  position: absolute;
  top: 8px;
  z-index: 1;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 6px;
  border-radius: 4px;
}

.badge.live {
  left: 8px;
  background: var(--accent);
  color: #fff;
}

.badge.hd {
  right: 8px;
  background: var(--gold);
  color: #111;
}

.badge.time {
  right: 8px;
  bottom: 8px;
  top: auto;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-weight: 600;
}

.meta {
  padding: 8px 9px 10px;
}

.meta h3 {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 6px;
}

.tags {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}

.tag {
  font-size: 10px;
  color: #8c8c98;
  background: #2a2a33;
  border-radius: 3px;
  padding: 1px 5px;
}

.tag.hot {
  color: #ff6b81;
  background: rgba(255, 59, 92, 0.16);
}

.stats {
  display: flex;
  justify-content: space-between;
  color: #6d6d78;
  font-size: 11px;
}

.more {
  width: 100%;
  margin-top: 14px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--muted);
  border-radius: 10px;
  padding: 14px;
  font-size: 14px;
}

.sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  height: calc(var(--footer) + env(safe-area-inset-bottom));
  padding: 0 14px env(safe-area-inset-bottom);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(16, 16, 20, 0.97);
  border-top: 1px solid var(--line);
}

.sticky strong {
  display: block;
  font-size: 15px;
}

.sticky small {
  color: var(--accent-2);
  font-size: 12px;
}

.dl-btn {
  border: none;
  color: #fff;
  font-weight: 800;
  border-radius: 999px;
  padding: 12px 18px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 0 0 rgba(255, 59, 92, 0.45);
  animation: pulse 1.6s infinite;
  white-space: nowrap;
}

@keyframes pulse {
  70% {
    transform: scale(1.04);
    box-shadow: 0 0 0 10px transparent;
  }
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.78);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.overlay.show {
  display: flex;
}

.modal {
  width: min(360px, 92vw);
  background: #1e1e24;
  border: 1px solid #333;
  border-radius: 14px;
  overflow: hidden;
  animation: pop 0.28s ease;
}

@keyframes pop {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
}

.modal-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: #25252d;
  border-bottom: 1px solid #333;
  font-weight: 700;
}

.modal-hd button {
  background: none;
  border: none;
  color: #999;
  font-size: 22px;
  line-height: 1;
}

.modal-bd {
  padding: 22px 18px 24px;
  text-align: center;
}

.vip-kicker {
  color: var(--accent);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}

.gold-chip {
  display: inline-block;
  background: linear-gradient(45deg, #ffd54a, #ff9800);
  color: #111;
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 12px;
}

.modal-bd p {
  color: #d4d4dc;
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 8px;
}

.warn {
  color: var(--accent) !important;
  font-size: 13px !important;
}

.primary {
  width: 100%;
  margin-top: 14px;
  border: none;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  border-radius: 999px;
  padding: 14px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  box-shadow: 0 8px 18px rgba(255, 59, 92, 0.35);
}

.secondary {
  width: 100%;
  margin-top: 10px;
  border: 1px solid #444;
  background: #2a2a33;
  color: #fff;
  border-radius: 999px;
  padding: 13px;
  font-weight: 700;
}

.hint {
  margin-top: 12px;
  color: #6a6a74 !important;
  font-size: 11px !important;
}

.ok {
  color: #62c56a !important;
  font-size: 12px !important;
  margin-top: 12px;
}

.player {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: #0a0a0e;
  display: none;
  flex-direction: column;
}

.player.show {
  display: flex;
}

.player-top {
  height: calc(50px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #141418;
}

.stage {
  position: relative;
  width: 100%;
  padding-top: 138%;
  background: #000;
  max-height: 70vh;
}

.stage-inner {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--gold);
  text-align: center;
  gap: 8px;
}

.spin {
  width: 28px;
  height: 28px;
  border: 3px solid #333;
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.fake-bar {
  padding: 12px 14px;
  background: #141418;
}

.track {
  height: 4px;
  background: #2a2a33;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 10px;
}

.fill {
  height: 100%;
  width: 0;
  background: var(--accent);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(12px);
  background: #222;
  border: 1px solid #444;
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  z-index: 300;
  transition: 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (min-width: 560px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .header-cta {
    display: inline-flex;
  }
  .hero {
    grid-template-columns: 1.2fr 1fr auto;
    align-items: end;
  }
}

@media (min-width: 900px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
  }
}
