/* ============================================================
   BLOODSTRIKE GIVEAWAY — Season 18
   Design: "event screen" — dark tactical surface, one amber
   accent, red reserved for live/CTA. Rarity tints on rewards.
   Motion budget: slideshow + ticker only (ambient), the rest
   answers user action.
   ============================================================ */

:root {
  --bg: #07090f;
  --surface: #0d1119;
  --surface-2: #10141f;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .18);
  --text: #e8ecf5;
  --muted: #9aa3b5;
  --amber: #ffb300;
  --red: #c81e2b;
  --red-bright: #e02634;
  --rarity-epic: #a855f7;
  --rarity-legendary: #f97316;
  --rarity-ultra: #ef4444;
  --radius: 10px;
  --radius-lg: 14px;
}

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

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(1200px 500px at 70% -10%, rgba(255, 179, 0, .05), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: 'Rajdhani', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  min-height: 100vh;
}

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

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: baseline;
  gap: 14px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px 0;
}
.brand {
  font-family: 'Teko', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 1px;
  line-height: 1;
}
.brand-sub {
  color: var(--muted);
  font-size: .95rem;
  font-weight: 600;
}
.topbar .live-chip {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: 1px;
  color: #ff8d8d;
}

/* ---------- layout ---------- */
.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 32px;
  align-items: start;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 24px 40px;
}
.claim-zone { position: sticky; top: 24px; }

/* ---------- title ---------- */
.title {
  font-family: 'Teko', sans-serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: .95;
  letter-spacing: 1px;
  color: var(--text);
  margin: 8px 0 6px;
}
.title-rule {
  width: 64px;
  height: 3px;
  background: var(--amber);
  border: none;
  margin: 0 0 10px;
}
.subtitle {
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 20px;
}
.subtitle b { color: var(--amber); font-weight: 700; }

/* ---------- drop frame ---------- */
.thumb-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  aspect-ratio: 16 / 9;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.slideshow { position: absolute; inset: 0; }
.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.15) contrast(1.05);
  opacity: 0;
  animation: kenburns 26s ease-in-out infinite alternate;
  transition: opacity 1.1s ease;
}
.slide.active { opacity: 1; }
@keyframes kenburns {
  from { transform: scale(1.1) translate(0, 0); }
  to   { transform: scale(1.02) translate(-1.5%, 1%); }
}
.thumb-frame::after {
  /* legibility scrim under overlay text */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 45%, rgba(4, 6, 12, .88));
  pointer-events: none;
}

.slide-dots {
  position: absolute;
  bottom: 46px;
  right: 16px;
  display: flex;
  gap: 6px;
  z-index: 3;
}
.slide-dots span {
  width: 22px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .28);
  transition: background .3s;
}
.slide-dots span.on { background: var(--amber); }

/* live HUD */
.live-hud {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 4;
}
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(8, 8, 14, .78);
  border: 1px solid rgba(200, 30, 43, .65);
  color: #fff;
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: 999px;
}
.live-pill em { font-style: normal; color: var(--amber); }
.live-dot {
  position: relative;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red-bright);
  flex: none;
  animation: liveBlink 1.6s ease-in-out infinite;
}
@keyframes liveBlink { 50% { opacity: .45; } }
.live-sep { width: 1px; height: 14px; background: rgba(255, 255, 255, .25); }
.viewers { font-weight: 600; font-size: .78rem; color: #ffd9d9; }
.viewers b { color: #fff; font-variant-numeric: tabular-nums; }

.thumb-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 18px 20px 42px;
}
.thumb-overlay h2 {
  font-family: 'Teko', sans-serif;
  font-size: 2rem;
  letter-spacing: 1px;
  line-height: 1;
}
.thumb-overlay p {
  color: var(--amber);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: 1px;
  margin-top: 2px;
}
.live-stats { margin-top: 10px; }
.live-stats span {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  color: #ffe9c4;
  background: rgba(0, 0, 0, .55);
  border: 1px solid rgba(255, 179, 0, .4);
  padding: 3px 12px;
  border-radius: 999px;
}
.live-stats b { color: var(--amber); font-variant-numeric: tabular-nums; }

/* ticker */
.ticker {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  overflow: hidden;
  background: rgba(5, 5, 10, .82);
  border-top: 1px solid var(--line);
}
.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  white-space: nowrap;
  padding: 7px 0;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--amber);
  animation: tickerMove 24s linear infinite;
  will-change: transform;
}
.ticker-track i { color: var(--red-bright); font-style: normal; }
@keyframes tickerMove { to { transform: translateX(-50%); } }

/* ---------- layout helpers ---------- */
.stage { min-width: 0; }
.stage .thumb-frame { margin-top: 4px; }

/* ---------- rewards ---------- */
.rewards { margin-top: 36px; }
.section-title {
  font-family: 'Teko', sans-serif;
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: .5px;
  margin-bottom: 4px;
}
.section-sub {
  color: var(--muted);
  font-size: .95rem;
  margin-bottom: 16px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.item {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px 16px;
  cursor: pointer;
  user-select: none;
  transition: border-color .2s, background .2s, transform .2s;
}
.item:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
  transform: translateY(-2px);
}
.item.selected {
  border-color: var(--amber);
  background: var(--surface-2);
  box-shadow: 0 0 0 1px var(--amber);
}
.item .thumb {
  position: relative;
  height: 104px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #0a0d15;
  border: 1px solid var(--line);
}
.item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.1);
  transition: transform .3s ease;
}
.item:hover .thumb img { transform: scale(1.06); }
.item .thumb.contain img { object-fit: contain; padding: 8px; }
.item .tier {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #0a0d15;
  background: var(--amber);
  padding: 2px 8px;
  border-radius: 4px;
}
.item[data-rarity="epic"] .tier { background: var(--rarity-epic); color: #fff; }
.item[data-rarity="legendary"] .tier { background: var(--rarity-legendary); color: #fff; }
.item[data-rarity="ultra"] .tier { background: var(--rarity-ultra); color: #fff; }
.item[data-rarity="evo"] .tier { background: #ffd60a; color: #0a0d15; }
.item[data-rarity="eternal"] .tier { background: #22d3ee; color: #0a0d15; }
.item[data-rarity="ultra"] { border-top: 2px solid var(--rarity-ultra); }
.item[data-rarity="epic"] { border-top: 2px solid var(--rarity-epic); }
.item[data-rarity="legendary"] { border-top: 2px solid var(--rarity-legendary); }
.item[data-rarity="evo"] { border-top: 2px solid #ffd60a; }
.item[data-rarity="eternal"] { border-top: 2px solid #22d3ee; }
.item h4 { font-size: 1.05rem; letter-spacing: .3px; }
.item .cat {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 2px;
}
.price {
  color: #04120a;
  background: #1fae5f;
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: 2px;
  display: inline-block;
  padding: 2px 12px;
  margin-top: 8px;
  border-radius: 999px;
}
.pick-hint {
  margin-top: 12px;
  color: var(--muted);
  font-size: .9rem;
}

/* ---------- claim card ---------- */
.claim-card {
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 26px 24px 22px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
}
.claim-title {
  font-family: 'Teko', sans-serif;
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: 1px;
  line-height: 1;
  margin-bottom: 4px;
}
.claim-sub {
  color: var(--muted);
  font-size: .92rem;
  margin-bottom: 18px;
}
#claimForm label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 14px 0 6px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--muted);
}
#claimForm label .hint {
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #6f7789;
  font-size: .78rem;
}
#claimForm input:not([type="hidden"]) {
  width: 100%;
  background: #0a0c14;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 12px 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
#claimForm input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(255, 179, 0, .18);
}
#claimForm input.invalid {
  border-color: var(--rarity-ultra);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .2);
}
@keyframes shake {
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
.shake { animation: shake .4s ease; }

.claim-btn {
  width: 100%;
  margin-top: 22px;
  padding: 15px;
  font-family: 'Teko', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 3px;
  color: #fff;
  background: var(--red);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
}
.claim-btn:hover {
  background: var(--red-bright);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(200, 30, 43, .4);
}
.claim-btn:active { transform: translateY(0) scale(.98); }
.claim-btn:disabled { opacity: .7; cursor: wait; transform: none; }

.form-status {
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .95rem;
  text-align: center;
}
.form-status.ok {
  background: rgba(0, 200, 120, .1);
  border: 1px solid rgba(0, 200, 120, .45);
  color: #4ade80;
}
.form-status.err {
  background: rgba(239, 68, 68, .08);
  border: 1px solid rgba(239, 68, 68, .45);
  color: #ff8d8d;
}

.privacy-note {
  margin-top: 16px;
  font-size: .85rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

/* ---------- footer ---------- */
footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 24px 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- confetti ---------- */
.confetti {
  position: fixed;
  z-index: 50;
  width: 8px;
  height: 8px;
  pointer-events: none;
  border-radius: 2px;
}
@keyframes confettiFall {
  to { transform: translateY(60vh) rotate(540deg); opacity: 0; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .claim-zone { position: static; }
}
@media (max-width: 560px) {
  .topbar { flex-wrap: wrap; }
  .topbar .live-chip { margin-left: 0; }
  .thumb-frame { aspect-ratio: 4 / 3; }
  .claim-card { padding: 22px 18px 18px; }
}

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