/* ==========================================================================
   FAWANEWS (fawanews.lol) - Dark Broadcast Theme & Custom Styles (Bootstrap 5)
   ========================================================================== */

:root {
  --bg-main: #080912;
  --bg-card: #111424;
  --bg-card-hover: #181d33;
  --bg-surface: #1e2540;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(99, 102, 241, 0.5);
  --primary-accent: #6366f1;
  --primary-secondary: #0ea5e9;
  --primary-glow: rgba(99, 102, 241, 0.36);
  --live-red: #ef4444;
  --live-glow: rgba(239, 68, 68, 0.42);
  --popular-gold: #f59e0b;
  --text-muted-custom: #94a3b8;
  --font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-primary: #6366f1;
  --bs-primary-rgb: 99, 102, 241;
  --bs-link-color: #818cf8;
  --bs-link-hover-color: #a5b4fc;
}

body {
  background-color: var(--bg-main);
  background-image: radial-gradient(circle at 12% 0%, rgba(99, 102, 241, 0.1) 0%, transparent 44%),
                    radial-gradient(circle at 88% 4%, rgba(14, 165, 233, 0.08) 0%, transparent 40%);
  color: #f1f5f9;
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.btn-primary {
  --bs-btn-bg: #6366f1;
  --bs-btn-border-color: #6366f1;
  --bs-btn-hover-bg: #4f46e5;
  --bs-btn-hover-border-color: #4f46e5;
  --bs-btn-active-bg: #4338ca;
  --bs-btn-active-border-color: #4338ca;
}

.btn-outline-primary {
  --bs-btn-color: #818cf8;
  --bs-btn-border-color: #6366f1;
  --bs-btn-hover-bg: #6366f1;
  --bs-btn-hover-border-color: #6366f1;
  --bs-btn-hover-color: #ffffff;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #2c3352;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3f4973;
}

/* ==========================================================================
   Navigation & Header
   ========================================================================== */
.navbar-custom {
  background-color: rgba(8, 9, 18, 0.9) !important;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.28);
  transition: all 0.2s ease;
}

.brand-logo {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.4px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff !important;
  text-decoration: none;
}

.brand-icon {
  background: linear-gradient(135deg, #6366f1, #0ea5e9);
  color: #fff;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  box-shadow: 0 4px 16px var(--primary-glow);
}

.nav-link-custom {
  color: #94a3b8 !important;
  font-weight: 500;
  padding: 8px 14px !important;
  border-radius: 9px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link-custom:hover {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.06);
}

.nav-link-custom.active {
  color: #fff !important;
  background-color: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.42);
}

/* Live Badge with Pulse */
.live-pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.42);
  color: #fca5a5;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 20px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #ef4444;
  border-radius: 50%;
  animation: pulse-ring 1.6s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 7px rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* ==========================================================================
   Sports Categories Pill Bar
   ========================================================================== */
.sports-pills-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0 16px;
  white-space: nowrap;
  scrollbar-width: thin;
}

.sport-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sport-pill:hover {
  background-color: var(--bg-card-hover);
  border-color: rgba(99, 102, 241, 0.42);
  color: #fff;
  transform: translateY(-1px);
}

.sport-pill.active {
  background: linear-gradient(135deg, #6366f1, #0ea5e9);
  border-color: #818cf8;
  color: #fff;
  box-shadow: 0 4px 16px var(--primary-glow);
}

/* ==========================================================================
   Hero Featured Match Banner
   ========================================================================== */
.hero-featured-card {
  background: linear-gradient(135deg, #161b36 0%, #0b0d19 100%);
  border: 1px solid rgba(99, 102, 241, 0.32);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.48);
}

.hero-featured-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -20%;
  width: 140%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.16) 0%, transparent 60%);
  pointer-events: none;
}

.hero-team-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.hero-vs-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #cbd5e1;
}

/* ==========================================================================
   Match Cards (Compact Layout)
   ========================================================================== */
#matchesGrid,
#concurrentLiveGrid {
  --bs-gutter-x: 0.85rem;
}

.match-grid-col {
  flex: 0 0 auto;
  width: 100%;
}

@media (min-width: 576px) {
  .match-grid-col {
    width: 50%;
  }
}

@media (min-width: 768px) {
  .match-grid-col {
    width: 33.333333%;
  }
}

@media (min-width: 992px) {
  .match-grid-col {
    width: 25%;
  }
}

@media (min-width: 1200px) {
  .match-grid-col {
    width: 20%;
  }
}

@media (min-width: 1600px) {
  .match-grid-col {
    width: 16.666667%;
  }
}

.match-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100%;
}

.match-card:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(99, 102, 241, 0.18);
}

.match-poster-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8;
  max-height: 120px;
  background-color: #0b0d17;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.match-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.match-card:hover .match-poster-img {
  transform: scale(1.04);
}

.match-poster-overlay {
  position: absolute;
  top: 6px;
  left: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
}

.match-poster-overlay .badge {
  font-size: 0.65rem;
  padding: 3px 6px;
}

.match-card-header {
  padding: 8px 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.match-card-header .live-pulse-badge {
  font-size: 0.64rem;
  padding: 2px 7px;
  gap: 4px;
}

.match-card-header .pulse-dot {
  width: 6px;
  height: 6px;
}

.match-category-tag {
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.35px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 65%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-card-body {
  padding: 10px 11px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.match-teams-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.team-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-badge-wrapper {
  width: 24px;
  height: 24px;
  min-width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.team-badge-img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.team-badge-fallback {
  font-size: 0.66rem;
  font-weight: 700;
  color: #94a3b8;
}

.team-name {
  font-weight: 600;
  font-size: 0.84rem;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
}

.match-single-title {
  font-weight: 600;
  font-size: 0.86rem;
  color: #f1f5f9;
  line-height: 1.35;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.match-date-meta {
  font-size: 0.72rem;
  margin-top: 6px;
}

.match-card-footer {
  padding: 8px 11px;
  background: rgba(0, 0, 0, 0.22);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.match-sources-info {
  font-size: 0.72rem;
  color: var(--text-muted-custom);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.btn-watch-stream {
  background: linear-gradient(135deg, #6366f1, #0ea5e9);
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 0.74rem;
  padding: 4px 10px;
  border-radius: 7px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  white-space: nowrap;
}

.btn-watch-stream:hover {
  background: linear-gradient(135deg, #818cf8, #38bdf8);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-watch-stream.btn-live {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.btn-watch-stream.btn-live:hover {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 4px 12px var(--live-glow);
}

/* ==========================================================================
   Filter & Search Bar
   ========================================================================== */
.filter-container {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 24px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.search-input-group {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 5px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.search-input-group:focus-within {
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22);
}

.search-input-custom {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.9rem;
  width: 100%;
}

.search-input-custom::placeholder {
  color: #64748b;
}

.filter-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 9px;
  transition: all 0.2s;
  cursor: pointer;
}

.filter-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.filter-tab-btn.active {
  color: #fff;
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(99, 102, 241, 0.45);
}

/* ==========================================================================
   Stream Player Modal & Embed Box
   ========================================================================== */
.modal-custom .modal-content {
  background-color: var(--bg-main);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.72);
  color: #f1f5f9;
  overflow: hidden;
}

.modal-custom .modal-header {
  border-bottom: 1px solid var(--border-color);
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.02);
}

.player-aspect-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  background-color: #000;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.player-aspect-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.player-controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0 6px;
}

.source-btn-group,
.stream-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.source-chip {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: #cbd5e1;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.source-chip:hover {
  background-color: #2c355c;
  color: #fff;
}

.source-chip.active {
  background-color: #6366f1;
  border-color: #818cf8;
  color: #ffffff;
  box-shadow: 0 2px 10px var(--primary-glow);
}

.stream-chip {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stream-chip:hover {
  background-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.stream-chip.active {
  background: #0284c7;
  border-color: #38bdf8;
  color: #fff;
  font-weight: 600;
}

.quality-badge-hd {
  background: rgba(99, 102, 241, 0.22);
  color: #a5b4fc;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid rgba(99, 102, 241, 0.42);
}

.quality-badge-sd {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  font-size: 0.68rem;
  padding: 2px 5px;
  border-radius: 4px;
}

/* ==========================================================================
   Watch Page Layout
   ========================================================================== */
.watch-room-container {
  padding: 24px 0 48px;
}

.watch-player-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
}

.watch-sidebar-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  height: 100%;
}

.sidebar-match-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.2s;
  margin-bottom: 8px;
}

.sidebar-match-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(99, 102, 241, 0.32);
  color: #fff;
}

/* ==========================================================================
   Skeletons & Loaders
   ========================================================================== */
.skeleton {
  background: linear-gradient(90deg, #15192e 25%, #202745 50%, #15192e 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 8px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-card {
  height: 160px;
  border-radius: 14px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: #64748b;
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 12px;
  display: inline-block;
  color: #475569;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer-custom {
  background-color: #05060c;
  border-top: 1px solid var(--border-color);
  padding: 36px 0 24px;
  margin-top: auto;
  color: #64748b;
  font-size: 0.88rem;
}

.footer-custom a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-custom a:hover {
  color: #818cf8;
}

/* ==========================================================================
   Event Details Page (event.html)
   ========================================================================== */
.event-hero-card {
  background: linear-gradient(135deg, #161b36 0%, #0b0e1a 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.event-team-badge-lg {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  overflow: hidden;
}

.event-team-badge-lg img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.event-info-panel {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
}

.stream-source-block {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
  transition: all 0.2s ease;
}

.stream-source-block:hover {
  border-color: rgba(99, 102, 241, 0.38);
  background-color: rgba(255, 255, 255, 0.03);
}

.stream-link-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  color: #f1f5f9;
  transition: all 0.2s ease;
  margin-bottom: 10px;
}

.stream-link-card:hover {
  background: #273056;
  border-color: #6366f1;
  color: #fff;
  transform: translateX(4px);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.breadcrumb-custom {
  background: transparent;
  padding: 0;
  margin-bottom: 16px;
}

.breadcrumb-custom .breadcrumb-item a {
  color: var(--text-muted-custom);
  text-decoration: none;
  font-weight: 500;
}

.breadcrumb-custom .breadcrumb-item a:hover {
  color: #fff;
}

.breadcrumb-custom .breadcrumb-item.active {
  color: #fff;
}
