/* ==========================================================================
   STREAMSPORTS - Dark Theme & Custom Styles (Built on Bootstrap 5)
   ========================================================================== */

:root {
  --bg-main: #0a0e17;
  --bg-card: #121927;
  --bg-card-hover: #192336;
  --bg-surface: #1e293b;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(59, 130, 246, 0.4);
  --primary-accent: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.35);
  --live-red: #ef4444;
  --live-glow: rgba(239, 68, 68, 0.4);
  --popular-gold: #f59e0b;
  --text-muted-custom: #94a3b8;
  --font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  background-color: var(--bg-main);
  color: #f1f5f9;
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

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

/* ==========================================================================
   Navigation & Header
   ========================================================================== */
.navbar-custom {
  background-color: rgba(10, 14, 23, 0.9) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

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

.brand-icon {
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  color: #fff;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.nav-link-custom {
  color: #94a3b8 !important;
  font-weight: 500;
  padding: 8px 14px !important;
  border-radius: 8px;
  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.05);
}

.nav-link-custom.active {
  color: #fff !important;
  background-color: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* 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.4);
  color: #f87171;
  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: 50px;
  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(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-1px);
}

.sport-pill.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #3b82f6;
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

/* ==========================================================================
   Hero Featured Match Banner
   ========================================================================== */
.hero-featured-card {
  background: linear-gradient(135deg, #131c31 0%, #0c1220 100%);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

.hero-featured-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -20%;
  width: 140%;
  height: 200%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 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.12);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #94a3b8;
}

/* ==========================================================================
   Match Cards
   ========================================================================== */
.match-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  transition: all 0.25s 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 28px rgba(0, 0, 0, 0.45);
}

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

.match-category-tag {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

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

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

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

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

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

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

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

.match-single-title {
  font-weight: 600;
  font-size: 1rem;
  color: #f1f5f9;
  line-height: 1.4;
  margin-bottom: 0;
}

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

.match-sources-info {
  font-size: 0.78rem;
  color: var(--text-muted-custom);
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-watch-stream {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 6px 14px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.btn-watch-stream:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  box-shadow: 0 4px 12px 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);
  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: 14px;
  padding: 12px 16px;
  margin-bottom: 24px;
}

.search-input-group {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 4px 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(59, 130, 246, 0.2);
}

.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: none;
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 8px;
  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(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.35);
}

/* ==========================================================================
   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.7);
  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: #334155;
  color: #fff;
}

.source-chip.active {
  background-color: #2563eb;
  border-color: #3b82f6;
  color: #fff;
  box-shadow: 0 2px 8px 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: #10b981;
  border-color: #059669;
  color: #fff;
  font-weight: 600;
}

.quality-badge-hd {
  background: rgba(59, 130, 246, 0.25);
  color: #60a5fa;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.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(255, 255, 255, 0.1);
  color: #fff;
}

/* ==========================================================================
   Skeletons & Loaders
   ========================================================================== */
.skeleton {
  background: linear-gradient(90deg, #161f30 25%, #222e45 50%, #161f30 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: #070a10;
  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: #3b82f6;
}

/* ==========================================================================
   Event Details Page (event.html)
   ========================================================================== */
.event-hero-card {
  background: linear-gradient(135deg, #131c31 0%, #0d1322 100%);
  border: 1px solid rgba(59, 130, 246, 0.25);
  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(59, 130, 246, 0.3);
  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: #25334a;
  border-color: #3b82f6;
  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;
}

