/* Fantasy Draft Lottery — Draft Night '26 broadcast player */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold: #f5c542;
  --gold-dim: #b8902c;
  --navy: #0b1220;
  --navy-2: #101a30;
  --white: #f4f1e8;
}

html, body {
  height: 100%;
  background: #000;
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  overflow: hidden;
}

.hidden { display: none !important; }

/* ---------- Stage & video ---------- */

#stage {
  position: fixed;
  inset: 0;
  background: #000;
}

.stage-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.stage-video.active { opacity: 1; }

/* Seeded ken-burns treatments: same clip reads as a different camera setup */
.stage-video.cam-push { animation: camPush 14s ease-in-out forwards; }
.stage-video.cam-pull { animation: camPull 14s ease-in-out forwards; }
.stage-video.cam-drift { animation: camDrift 14s ease-in-out forwards; }
@keyframes camPush {
  from { transform: scale(1); }
  to { transform: scale(1.14); }
}
@keyframes camPull {
  from { transform: scale(1.14); }
  to { transform: scale(1); }
}
@keyframes camDrift {
  from { transform: scale(1.08) translateX(-1.5%); }
  to { transform: scale(1.08) translateX(1.5%); }
}

.letterbox {
  position: absolute;
  left: 0; right: 0;
  height: 7vh;
  background: #000;
  z-index: 3;
}
.letterbox-top { top: 0; }
.letterbox-bottom { bottom: 0; }

.grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.10;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 0.9s steps(4) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(-1%, 2%); }
  100% { transform: translate(0, 0); }
}

.vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.55) 100%);
}

/* ---------- Chyron (lower third) ---------- */

.chyron {
  position: absolute;
  left: 4vw;
  bottom: 10vh;
  z-index: 4;
  min-width: 300px;
  max-width: 62vw;
  border-left: 6px solid var(--gold);
  background: linear-gradient(90deg, rgba(11,18,32,0.94) 0%, rgba(11,18,32,0.75) 80%, rgba(11,18,32,0) 100%);
  padding: 10px 40px 12px 16px;
  transform: translateX(-16px);
  animation: chyronIn 0.35s ease-out;
}
@keyframes chyronIn {
  from { transform: translateX(-110%); opacity: 0; }
  to { transform: translateX(-16px); opacity: 1; }
}
.chyron-brand {
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--gold);
  font-weight: bold;
}
.chyron-text {
  font-size: clamp(18px, 3vw, 30px);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ---------- Draft board ---------- */

.board {
  position: absolute;
  top: 9vh;
  right: 2.5vw;
  bottom: 9vh;
  z-index: 4;
  width: min(340px, 34vw);
  background: rgba(11,18,32,0.88);
  border: 2px solid var(--gold-dim);
  border-radius: 6px;
  padding: 14px 14px 10px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0,0,0,0.6);
}
.board-title {
  text-align: center;
  color: var(--gold);
  letter-spacing: 4px;
  font-size: 14px;
  font-weight: bold;
  border-bottom: 1px solid var(--gold-dim);
  padding-bottom: 8px;
  margin-bottom: 8px;
}
.board-slots {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  align-content: start;
}
.board.two-col .board-slots { grid-template-columns: 1fr 1fr; }

.slot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 3px;
  min-height: 30px;
  font-size: 15px;
}
.slot .slot-num {
  color: var(--gold-dim);
  font-weight: bold;
  width: 26px;
  flex: none;
  text-align: right;
}
.slot .slot-name {
  color: rgba(244,241,232,0.35);
  letter-spacing: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.slot.filled .slot-name {
  color: var(--white);
  letter-spacing: normal;
}
.slot.filled {
  background: rgba(245,197,66,0.10);
}
.slot.slam {
  animation: slotSlam 0.45s cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes slotSlam {
  0% { transform: translateX(60px) scale(1.15); background: rgba(245,197,66,0.7); }
  100% { transform: translateX(0) scale(1); }
}
.slot.gold {
  background: linear-gradient(90deg, rgba(245,197,66,0.35), rgba(245,197,66,0.15));
  border: 1px solid var(--gold);
}
.slot.gold .slot-num, .slot.gold .slot-name { color: var(--gold); font-weight: bold; }

/* ---------- Overlays (waiting room, end screen) ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(24,38,70,0.92), rgba(5,8,16,0.98)),
    #05080f;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wr-inner {
  text-align: center;
  max-width: 640px;
  padding: 48px 20px;
  width: 100%;
}
.wr-brand {
  color: var(--gold);
  letter-spacing: 6px;
  font-weight: bold;
  font-size: 15px;
  margin-bottom: 18px;
}
.wr-league {
  font-size: clamp(26px, 6vw, 44px);
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 2px 24px rgba(245,197,66,0.25);
}
.wr-sealed {
  display: inline-block;
  border: 1px solid var(--gold-dim);
  border-radius: 4px;
  padding: 8px 16px;
  color: var(--gold);
  letter-spacing: 2px;
  font-size: 13px;
  margin-bottom: 22px;
}
.wr-hash {
  color: rgba(244,241,232,0.45);
  font-family: monospace;
  font-size: 11px;
  letter-spacing: 0;
  margin-top: 6px;
}
.wr-countdown { margin: 10px 0 24px; }
.wr-countdown-label {
  color: rgba(244,241,232,0.7);
  letter-spacing: 2px;
  font-size: 13px;
  text-transform: uppercase;
}
.wr-countdown-clock {
  font-size: clamp(40px, 10vw, 72px);
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  letter-spacing: 4px;
}
.wr-note {
  color: rgba(244,241,232,0.7);
  margin-bottom: 22px;
}
.wr-live { color: #ff5252; font-weight: bold; letter-spacing: 2px; }

.wr-join {
  display: inline-block;
  background: linear-gradient(135deg, #f8d878, var(--gold) 45%, #c99a25);
  color: #241a02;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-weight: bold;
  font-size: 18px;
  letter-spacing: 2px;
  padding: 16px 34px;
  cursor: pointer;
  box-shadow: 0 4px 30px rgba(245,197,66,0.35);
}
.wr-join:hover { filter: brightness(1.08); }
/* .wr-join is used on an <a> for the sample's buy CTA, not just <button>. */
a.wr-join { text-decoration: none; }
.wr-join:disabled { opacity: 0.6; cursor: default; }
.wr-hint {
  margin-top: 14px;
  color: rgba(244,241,232,0.5);
  font-size: 13px;
}

/* ---------- Host + purchase panels ---------- */

.host-panel, .new-purchase {
  margin-top: 34px;
  border: 1px solid rgba(245,197,66,0.35);
  border-radius: 8px;
  padding: 18px;
  text-align: left;
  background: rgba(11,18,32,0.6);
}
.host-title, .np-title {
  color: var(--gold);
  font-weight: bold;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.host-btn {
  display: block;
  width: 100%;
  background: #b3261e;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-weight: bold;
  font-size: 16px;
  letter-spacing: 2px;
  padding: 14px;
  cursor: pointer;
  margin: 8px 0;
}
.host-btn:hover { filter: brightness(1.1); }
.host-btn-secondary {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  border-radius: 5px;
  font-family: inherit;
  padding: 9px 16px;
  cursor: pointer;
}
.host-btn-secondary:hover { background: rgba(245,197,66,0.1); }
.host-schedule label {
  display: block;
  font-size: 13px;
  color: rgba(244,241,232,0.7);
  margin-bottom: 6px;
}
.host-schedule input[type="datetime-local"],
.host-schedule select {
  width: 100%;
  background: var(--navy-2);
  border: 1px solid rgba(244,241,232,0.25);
  color: var(--white);
  border-radius: 5px;
  padding: 10px;
  font-family: inherit;
  margin-bottom: 8px;
}
.host-msg { font-size: 13px; color: rgba(244,241,232,0.7); margin-top: 8px; min-height: 18px; }

.new-purchase p { font-size: 14px; color: rgba(244,241,232,0.85); margin-bottom: 10px; }
.np-linkrow { display: flex; gap: 8px; margin-bottom: 10px; }
.np-linkrow input {
  flex: 1;
  background: var(--navy-2);
  border: 1px solid rgba(244,241,232,0.25);
  color: var(--white);
  border-radius: 5px;
  padding: 10px;
  font-family: monospace;
  font-size: 12px;
}
.np-warn { color: #e2a962; font-size: 13px; }

/* ---------- End screen ---------- */

.end-board {
  margin: 18px auto 24px;
  max-width: 460px;
  text-align: left;
}
.end-board .slot { margin-bottom: 5px; font-size: 16px; }
.end-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; }
.end-footer { color: rgba(244,241,232,0.55); font-size: 14px; }
.end-footer a { color: var(--gold); }

/* ---------- Mobile ---------- */

@media (max-width: 720px) {
  .board {
    top: auto;
    left: 2.5vw;
    right: 2.5vw;
    bottom: 8vh;
    width: auto;
    max-height: 38vh;
  }
  .board.two-col .board-slots { grid-template-columns: 1fr 1fr; }
  .chyron {
    bottom: 48vh;
    max-width: 90vw;
  }
  .letterbox { height: 4vh; }
  .slot { font-size: 13px; min-height: 26px; }
}
