/* ============================================
   LIVE HUB INDEX PAGE
   --------------------------------------------
   View:  src/views/pages/live/index.php
   Theme:
     - Dark cinematic look
     - Accent: warm orange / gold
   Layout:
     - Hero with featured live
     - "Live Now" carousel row
     - Upcoming grid
     - Replays grid
   Image aspect ratios:
     - Hero backdrop:    16:9 (1920x1080)
     - Live card thumbs: 16:9 (1280x720)
============================================ */

/* Page wrapper */
.live-page {
  background: radial-gradient(
    circle at top,
    #0b1120 0,
    #020617 40%,
    #020617 100%
  );
  color: #e5e7eb;
  min-height: 100vh;
  padding: 1.25rem 1rem 2.5rem;
}

.live-page-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* Screen-reader-only utility (for hidden headings) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Small dot separator (shared) */
.dot {
  margin: 0 0.35rem;
  opacity: 0.6;
}

/* ==============================
   HERO SECTION
============================== */

.live-hero {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  margin-bottom: 2rem;
  min-height: 320px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: #020617;
}

/* Background image layer (16:9, 1920x1080 recommended) */
.live-hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(18px) brightness(0.5);
  transform: scale(1.1);
  transform-origin: center;
  animation: liveHeroKenBurns 20s ease-in-out infinite alternate;
}

@keyframes liveHeroKenBurns {
  0% {
    transform: scale(1.1) translate3d(0, 0, 0);
    filter: blur(18px) brightness(0.5);
  }
  50% {
    transform: scale(1.13) translate3d(-10px, -6px, 0);
    filter: blur(17px) brightness(0.6);
  }
  100% {
    transform: scale(1.15) translate3d(8px, 5px, 0);
    filter: blur(18px) brightness(0.5);
  }
}

/* Gradient overlay for readability */
.live-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
      135deg,
      rgba(15, 23, 42, 0.93),
      rgba(15, 23, 42, 0.6)
    ),
    radial-gradient(circle at top, rgba(248, 250, 252, 0.05), transparent 60%);
}

/* Inner content */
.live-hero-inner {
  position: relative;
  padding: 1.5rem 1.25rem 1.75rem;
  max-width: 680px;
  text-align: left;
  z-index: 10;
}

/* Badges row */
.live-hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.live-hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.9rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.65);
  color: #e5e7eb;
}

.live-hero-badge--accent {
  border-color: rgba(248, 113, 113, 0.8);
  background: rgba(248, 113, 113, 0.18);
  color: #fecaca;
}

/* Title / subtitle */
.live-hero-title {
  font-family: Poppins, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 0.4rem;
}

.live-hero-subtitle {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #cbd5f5;
  max-width: 36rem;
  margin-bottom: 1rem;
}

/* Meta line */
.live-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem;
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 1.2rem;
}

/* Hero actions */
.live-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.live-hero-btn-primary,
.live-hero-btn-secondary,
.live-hero-btn-icon {
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease,
    color 0.15s ease, border-color 0.15s ease;
}

/* Primary CTA */
.live-hero-btn-primary {
  padding: 0.65rem 1.6rem;
  background: linear-gradient(135deg, #f97316, #facc15);
  color: #111827;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}

.live-hero-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.85);
  filter: brightness(1.03);
}

/* Secondary button */
.live-hero-btn-secondary {
  padding: 0.62rem 1.3rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: #e5e7eb;
}

.live-hero-btn-secondary:hover {
  background: rgba(15, 23, 42, 0.95);
}

/* Icon-only button */
.live-hero-btn-icon {
  padding: 0.55rem 1rem;
  background: rgba(15, 23, 42, 0);
  border: 1px dashed rgba(148, 163, 184, 0.6);
  color: #e5e7eb;
}

.live-hero-btn-icon:hover {
  background: rgba(15, 23, 42, 0.4);
}

/* Filters (under hero actions) */
.live-hero-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Filter pills */
.live-filter-pill {
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.7);
  color: #e5e7eb;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.live-filter-pill.is-active {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.8);
  color: #facc15;
}

/* ==============================
   SECTIONS (Live Now / Upcoming / Replays)
============================== */

.live-section {
  margin-bottom: 2.2rem;
}

.live-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.live-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.live-section-subtitle {
  margin-top: 0.15rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

.live-section-link,
.live-section-link--ghost {
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.4rem 0.9rem;
  white-space: nowrap;
}

/* Default link style */
.live-section-link {
  color: #facc15;
  text-decoration: none;
}

.live-section-link:hover {
  border-color: rgba(250, 204, 21, 0.7);
  background: rgba(24, 24, 27, 0.8);
}

/* Ghost button-style link (for Export Schedule) */
.live-section-link--ghost {
  background: transparent;
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.6);
  text-decoration: none;
}

.live-section-link--ghost:hover {
  background: rgba(15, 23, 42, 0.8);
}

/* ==============================
   GENERIC CAROUSEL (Live Now uses same
   structure as Home: .home-carousel)
============================== */

.home-carousel {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

/* Track: horizontal flex row, swipeable on mobile */
.home-carousel-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  padding-bottom: 0.5rem;
  flex: 1 1 auto;
  scroll-snap-type: x mandatory;
}

.home-carousel-track::-webkit-scrollbar {
  display: none; /* Chrome / Safari */
}

/* Navigation buttons */
.home-carousel-btn {
  flex: 0 0 auto;
  align-self: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: radial-gradient(circle at top, #020617, #020617);
  color: #e5e7eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease,
    transform 0.12s ease;
}

.home-carousel-btn:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: #f5b200;
  transform: translateY(-1px);
}

/* Hide buttons on very small screens (swipe only) */
@media (max-width: 640px) {
  .home-carousel-btn {
    display: none;
  }
}

/* Each card snaps nicely */
.live-card {
  scroll-snap-align: start;
}

/* ==============================
   LIVE CARDS (Now + Upcoming)
============================== */

/* Card base */
.live-card {
  flex: 0 0 260px;
  max-width: 260px;
  background: radial-gradient(
    circle at top,
    rgba(30, 64, 175, 0.35),
    rgba(15, 23, 42, 0.98)
  );
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.9);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.65);
}

.live-card--now {
  border-color: rgba(248, 113, 113, 0.4);
}

.live-card--upcoming {
  background: radial-gradient(
    circle at top,
    rgba(245, 158, 11, 0.3),
    rgba(15, 23, 42, 0.98)
  );
}

/* Thumbnail area (16:9) */
.live-card-thumb-link {
  display: block;
}

.live-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

/* Live / upcoming thumbnails (1280x720 recommended) */
.live-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.live-card-thumb-link:hover .live-card-thumb img {
  transform: scale(1.06);
  filter: brightness(1.05);
}

/* Live / upcoming status badge */
.live-card-status-badge,
.live-card-status-badge--upcoming {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(248, 113, 113, 0.95);
  color: #fee2e2;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.85);
}

.live-card-status-badge--upcoming {
  background: rgba(250, 204, 21, 0.96);
  color: #1f2937;
}

/* Viewer pill */
.live-card-viewers-pill {
  position: absolute;
  bottom: 0.55rem;
  left: 0.55rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.7rem;
  background: rgba(15, 23, 42, 0.88);
  color: #e5e7eb;
}

/* Card body */
.live-card-body {
  padding: 0.75rem 0.85rem 0.9rem;
}

.live-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.live-card-title a {
  color: #f9fafb;
  text-decoration: none;
}

.live-card-title a:hover {
  color: #facc15;
}

.live-card-meta {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-bottom: 0.35rem;
}

.live-card-time {
  font-size: 0.75rem;
  color: #e5e7eb;
}

/* Reminder button (upcoming) */
.live-card-reminder-btn {
  margin-top: 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(250, 204, 21, 0.7);
  background: transparent;
  color: #facc15;
  font-size: 0.75rem;
  padding: 0.3rem 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.live-card-reminder-btn:hover {
  background: rgba(250, 204, 21, 0.08);
}

/* ==============================
   UPCOMING GRID
============================== */

.live-upcoming-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

/* ==============================
   REPLAYS GRID
============================== */

.live-replays-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

/* Replay cards */
.live-replay-card {
  background: radial-gradient(
    circle at top,
    rgba(37, 99, 235, 0.2),
    rgba(15, 23, 42, 0.97)
  );
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.9);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.7);
}

/* Poster area (16:9, 1280x720 recommended) */
.live-replay-poster-link {
  display: block;
}

.live-replay-poster {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.live-replay-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.live-replay-poster-link:hover .live-replay-poster img {
  transform: scale(1.06);
  filter: brightness(1.05);
}

/* Duration label */
.live-replay-duration {
  position: absolute;
  bottom: 0.55rem;
  right: 0.55rem;
  padding: 0.2rem 0.6rem;
  border-radius: 0.4rem;
  font-size: 0.7rem;
  background: rgba(15, 23, 42, 0.92);
  color: #f9fafb;
}

/* Replay body */
.live-replay-body {
  padding: 0.7rem 0.85rem 0.9rem;
}

.live-replay-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.live-replay-title a {
  color: #f9fafb;
  text-decoration: none;
}

.live-replay-title a:hover {
  color: #facc15;
}

.live-replay-meta {
  font-size: 0.75rem;
  color: #9ca3af;
}

/* ==============================
   RESPONSIVE TWEAKS
============================== */

@media (min-width: 640px) {
  .live-page {
    padding: 1.75rem 1.5rem 3rem;
  }

  .live-hero-inner {
    padding: 1.9rem 1.8rem 2.1rem;
  }

  .live-hero-title {
    font-size: 2rem;
  }

  .live-hero-subtitle {
    font-size: 0.95rem;
  }

  .live-section-header {
    align-items: center;
  }

  .live-upcoming-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .live-replays-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .live-page {
    padding-top: 2rem;
  }

  .live-page-inner {
    max-width: 1280px;
  }

  .live-hero {
    min-height: 360px;
  }

  .live-hero-inner {
    max-width: 760px;
  }

  .live-hero-title {
    font-size: 2.3rem;
  }

  .live-hero-subtitle {
    max-width: 32rem;
  }

  .live-upcoming-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .live-card {
    max-width: none;
    flex: 0 0 auto;
  }

  .live-replays-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .live-hero-inner {
    padding-inline: 2.4rem;
  }

  .live-hero-title {
    font-size: 2.5rem;
  }
}
