/* =========================================================
   Tournament Site — Live Page Stylesheet
   Loaded AFTER styles.css and home.css so it inherits the same
   header, bottom-nav, and color/type tokens. This file only
   adds rules specific to the Live tab content.
   ========================================================= */

/* Fix the "Live" nav-pill so it reads as the current page
   (filled) instead of the plain outlined treatment it has
   when just highlighted on other pages, like Home). */
.site-header__nav .nav-pill--live.nav-pill--active {
  background: var(--crimson);
  color: var(--bg-void);
  border-color: var(--crimson);
}

.live-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 24px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* ---------- YouTube eyebrow ---------- */

.live-platform {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-clip);
  padding: 10px 22px;
}

.live-platform__icon {
  width: 26px !important;
  height: 19px !important;
  max-width: 26px !important;
  max-height: 19px !important;
  flex: none !important;
}

.live-platform span {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* ---------- Match status pill (LIVE vs offline effects) ---------- */

.live-status {
  display: flex;
  justify-content: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--panel-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px 26px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: box-shadow 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.status-pill__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}

/* —— LIVE · Streaming —— */
.status-pill--live {
  color: #fff5f5;
  border-color: rgba(232, 40, 63, 0.85);
  background: linear-gradient(135deg, rgba(232, 40, 63, 0.22) 0%, rgba(20, 8, 12, 0.95) 100%);
  box-shadow:
    0 0 16px rgba(232, 40, 63, 0.55),
    0 0 36px rgba(232, 40, 63, 0.28),
    inset 0 0 12px rgba(232, 40, 63, 0.12);
  animation: live-pill-pulse 1.6s ease-in-out infinite;
}

.status-pill--live .status-pill__dot {
  background: #ff3b4e;
  box-shadow: 0 0 8px #ff3b4e, 0 0 16px rgba(255, 59, 78, 0.7);
  animation: live-dot-blink 1s ease-in-out infinite;
}

@keyframes live-pill-pulse {
  0%,
  100% {
    box-shadow:
      0 0 14px rgba(232, 40, 63, 0.45),
      0 0 28px rgba(232, 40, 63, 0.22);
  }
  50% {
    box-shadow:
      0 0 24px rgba(232, 40, 63, 0.85),
      0 0 48px rgba(232, 40, 63, 0.4);
  }
}

@keyframes live-dot-blink {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.85);
  }
}

/* —— Not Streaming —— */
.status-pill--offline {
  color: rgba(180, 200, 230, 0.75);
  border-color: rgba(100, 140, 200, 0.35);
  background: linear-gradient(135deg, rgba(40, 50, 70, 0.5) 0%, rgba(12, 14, 20, 0.95) 100%);
  box-shadow:
    0 0 12px rgba(80, 120, 180, 0.15),
    inset 0 0 10px rgba(60, 90, 140, 0.08);
  animation: offline-pill-breathe 3.2s ease-in-out infinite;
}

.status-pill--offline .status-pill__dot {
  background: #6a7a96;
  box-shadow: 0 0 6px rgba(120, 140, 180, 0.35);
  animation: offline-dot-idle 2.4s ease-in-out infinite;
}

@keyframes offline-pill-breathe {
  0%,
  100% {
    opacity: 0.88;
    box-shadow: 0 0 10px rgba(80, 120, 180, 0.12);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 18px rgba(90, 140, 200, 0.28);
  }
}

@keyframes offline-dot-idle {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.9;
  }
}

/* Page-level atmosphere */
.live-main--on-air {
  position: relative;
}

.live-main--on-air::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(
    ellipse 60% 40% at 50% 0%,
    rgba(232, 40, 63, 0.12) 0%,
    transparent 70%
  );
  animation: live-atmosphere 3s ease-in-out infinite;
}

.live-main--on-air > * {
  position: relative;
  z-index: 1;
}

@keyframes live-atmosphere {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

.live-main--offline::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(
    ellipse 50% 30% at 50% 0%,
    rgba(60, 90, 140, 0.08) 0%,
    transparent 70%
  );
}

.live-main--offline > * {
  position: relative;
  z-index: 1;
}

/* ---------- Stream cards ---------- */

.stream-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.stream-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-clip);
  padding: 26px 20px 20px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.stream-card--live {
  border-color: rgba(232, 40, 63, 0.55);
  box-shadow:
    0 0 18px rgba(232, 40, 63, 0.28),
    0 0 36px rgba(232, 40, 63, 0.12);
  animation: stream-card-live-glow 2s ease-in-out infinite;
}

@keyframes stream-card-live-glow {
  0%,
  100% {
    box-shadow:
      0 0 14px rgba(232, 40, 63, 0.22),
      0 0 28px rgba(232, 40, 63, 0.1);
  }
  50% {
    box-shadow:
      0 0 24px rgba(232, 40, 63, 0.45),
      0 0 44px rgba(232, 40, 63, 0.2);
  }
}

.stream-card--offline {
  border-color: rgba(100, 140, 200, 0.28);
  box-shadow: 0 0 12px rgba(80, 120, 180, 0.1);
  opacity: 0.92;
}

.stream-card__label--live {
  color: #ff8a96 !important;
  border-color: rgba(232, 40, 63, 0.5) !important;
  background: rgba(232, 40, 63, 0.12) !important;
  text-shadow: 0 0 8px rgba(232, 40, 63, 0.45);
}

.stream-card__label--offline {
  color: #8a9bb8 !important;
  border-color: rgba(100, 140, 200, 0.3) !important;
  background: rgba(40, 50, 70, 0.5) !important;
}

.stream-card__link--live {
  box-shadow: 0 0 14px rgba(232, 40, 63, 0.35);
  color: #FFFFFF !important;
}

.stream-card__link--offline {
  opacity: 0.95;
  color: #FFFFFF !important;
}

.stream-card__label {
  position: absolute;
  top: -12px;
  left: 18px;
  background: var(--panel-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-clip);
  padding: 5px 14px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.stream-card__link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Placeholder shown until the admin adds at least one stream link */
.live-empty-note {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  padding: 24px 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .live-main {
    padding: 28px 16px calc(var(--nav-height-mobile) + 32px);
    gap: 22px;
  }
}

@media (max-width: 480px) {
  .live-platform span {
    font-size: 15px;
  }

  .status-pill {
    font-size: 13px;
    padding: 10px 18px;
  }

  .stream-card {
    padding: 24px 16px 16px;
  }
}

/* =========================================================
   Live Page — Light Mode Explicit Overrides
   Ensures 100% visible, high-contrast text for all elements
   ========================================================= */

html[data-theme="light"] .live-platform {
  background: #FFFFFF !important;
  border-color: #DCE3EF !important;
  box-shadow: 0 2px 14px rgba(18, 22, 34, 0.05) !important;
}

html[data-theme="light"] .live-platform span {
  color: #121620 !important;
  font-weight: 700 !important;
}

/* Status Pill in Light Mode */
html[data-theme="light"] .status-pill--offline {
  background: #FFFFFF !important;
  border-color: #CBD5E1 !important;
  color: #1E293B !important;
  box-shadow: 0 2px 12px rgba(30, 41, 59, 0.08) !important;
}

html[data-theme="light"] .status-pill--offline .status-pill__text {
  color: #1E293B !important;
  font-weight: 700 !important;
}

html[data-theme="light"] .status-pill--offline .status-pill__dot {
  background: #64748B !important;
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.2) !important;
}

html[data-theme="light"] .status-pill--live {
  background: #FFF1F2 !important;
  border-color: rgba(232, 40, 63, 0.6) !important;
  color: #C41E33 !important;
  box-shadow: 0 4px 18px rgba(232, 40, 63, 0.18) !important;
}

html[data-theme="light"] .status-pill--live .status-pill__text {
  color: #C41E33 !important;
  font-weight: 700 !important;
}

html[data-theme="light"] .status-pill--live .status-pill__dot {
  background: #E8283F !important;
  box-shadow: 0 0 8px rgba(232, 40, 63, 0.6) !important;
}

/* Stream Cards in Light Mode */
html[data-theme="light"] .stream-card {
  background: #FFFFFF !important;
  border-color: #DCE3EF !important;
  box-shadow: 0 4px 18px rgba(18, 22, 34, 0.05) !important;
}

html[data-theme="light"] .stream-card--offline {
  border-color: #DCE3EF !important;
  box-shadow: 0 4px 16px rgba(18, 22, 34, 0.04) !important;
  opacity: 1 !important;
}

html[data-theme="light"] .stream-card--live {
  border-color: rgba(232, 40, 63, 0.55) !important;
  box-shadow: 0 6px 24px rgba(232, 40, 63, 0.16) !important;
}

/* Stream Card Badges ("Offline" / "● LIVE") in Light Mode */
html[data-theme="light"] .stream-card__label--offline {
  background: #EEF2F8 !important;
  border-color: #CBD5E1 !important;
  color: #1E293B !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  box-shadow: 0 2px 6px rgba(18, 22, 34, 0.05) !important;
}

html[data-theme="light"] .stream-card__label--live {
  background: #FFE4E6 !important;
  border-color: rgba(232, 40, 63, 0.5) !important;
  color: #BE123C !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  text-shadow: none !important;
  box-shadow: 0 2px 6px rgba(232, 40, 63, 0.12) !important;
}

/* Stream Action Buttons ("ZOR-ESPORTS", "XYLOX", "SLAYR") in Light Mode */
html[data-theme="light"] .stream-card__link {
  background: linear-gradient(135deg, #E8283F 0%, #C41E33 100%) !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35) !important;
  box-shadow: 0 4px 14px rgba(232, 40, 63, 0.28) !important;
  opacity: 1 !important;
  filter: none !important;
}

html[data-theme="light"] .stream-card__link:hover {
  background: linear-gradient(135deg, #FF3850 0%, #D42037 100%) !important;
  color: #FFFFFF !important;
  box-shadow: 0 6px 20px rgba(232, 40, 63, 0.42) !important;
  transform: translateY(-1px);
}

html[data-theme="light"] .stream-card__link--offline {
  background: linear-gradient(135deg, #E8283F 0%, #C41E33 100%) !important;
  color: #FFFFFF !important;
  opacity: 1 !important;
  filter: none !important;
}

html[data-theme="light"] .stream-card__link--live {
  background: linear-gradient(135deg, #FF2E48 0%, #B91C1C 100%) !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 18px rgba(232, 40, 63, 0.45) !important;
}

html[data-theme="light"] .live-empty-note {
  color: #60687A !important;
}

