/* MHD Sports - Dark Theme Stylesheet */
:root {
  --bg-main: #070b12;
  --bg-card: #0d1424;
  --bg-card-border: #1a253c;
  --bg-card-hover: #121c32;
  --text-main: #e2e8f0;
  --text-muted: #8492a6;
  --primary-red: #ff334b;
  --primary-orange: #ff5e3a;
  --live-green: #10b981;
  --cricket-blue: #2563eb;
  --football-green: #059669;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header */
.mhd-header {
  background: rgba(11, 16, 27, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 12px 24px;
}

.mhd-header-inner {
  width: 100%;
  max-width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.mhd-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mhd-logo {
  display: inline-flex;
  align-items: center;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #fff;
}

.mhd-logo span.red {
  color: var(--primary-red);
  background: linear-gradient(135deg, #ff3b30 0%, #ff6b4a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mhd-logo-badge {
  background: linear-gradient(135deg, #e11d48, #b91c1c);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.mhd-tagline {
  color: #94a3b8;
  font-size: 13.5px;
  font-weight: 500;
}

.mhd-search-wrap {
  flex: 1;
  max-width: 380px;
  position: relative;
}

.mhd-search-input {
  width: 100%;
  background: #111a2e;
  border: 1px solid #1e293b;
  border-radius: 6px;
  padding: 7px 14px;
  color: #f1f5f9;
  font-size: 13.5px;
  outline: none;
  transition: all 0.2s;
}

.mhd-search-input:focus {
  border-color: #3b82f6;
  background: #13203a;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.mhd-nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-header-action {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  background: #1e293b;
  color: #cbd5e1;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-header-action:hover {
  background: #334155;
  color: #fff;
}

/* Banner */
.mhd-banner-section {
  width: 100%;
  max-width: 100%;
  margin: 18px 0 8px;
  padding: 0 24px;
  box-sizing: border-box;
}

.mhd-banner-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: transparent;
}

.mhd-banner-text {
  color: #38bdf8;
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.btn-watch-now {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 50%, #075985 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.5px;
  padding: 8px 18px;
  border-radius: 6px;
  border: 1px solid #38bdf8;
  box-shadow: 0 0 15px rgba(2, 132, 199, 0.4);
  text-transform: uppercase;
  transition: all 0.2s;
}

.btn-watch-now:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(2, 132, 199, 0.7);
  filter: brightness(1.1);
}

/* Section Title */
.mhd-events-header {
  width: 100%;
  max-width: 100%;
  margin: 20px 0 14px;
  padding: 0 24px;
  box-sizing: border-box;
}

.mhd-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #f8fafc;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.glowing-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Filter Pills */
.mhd-filters-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  border: 1px solid #1e293b;
  background: #0f172a;
  color: #94a3b8;
  padding: 5px 14px;
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  border-color: #334155;
  color: #e2e8f0;
}

.filter-pill.active {
  background: linear-gradient(135deg, #ef4444 0%, #ea580c 100%);
  border-color: #f87171;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.3);
}

.filter-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
}

/* Matches Grid */
.mhd-matches-grid {
  width: 100%;
  max-width: 100%;
  margin: 16px 0 30px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  box-sizing: border-box;
}

@media (min-width: 1200px) {
  .mhd-matches-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}

/* Match Card */
.match-card {
  background: #0e1526;
  border: 1px solid #1b263b;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  background-image: radial-gradient(circle at 50% 120%, rgba(16, 185, 129, 0.08) 0%, transparent 60%);
  background-size: cover;
  background-position: center;
}

.match-card.card-bg-cricket {
  background-image: linear-gradient(180deg, rgba(11, 17, 30, 0.86) 0%, rgba(11, 17, 30, 0.95) 100%), url('../img/cricket.webp');
}

.match-card.card-bg-football {
  background-image: linear-gradient(180deg, rgba(11, 17, 30, 0.86) 0%, rgba(11, 17, 30, 0.95) 100%), url('../img/football.jpg');
}

.match-card:hover {
  transform: translateY(-3px);
  border-color: #2e3d5b;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.match-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 6px;
  gap: 6px;
}

.badge-sport {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.badge-cricket {
  background: #1e3a8a;
  color: #93c5fd;
  border: 1px solid #2563eb;
}

.badge-football {
  background: #064e3b;
  color: #6ee7b7;
  border: 1px solid #059669;
}

.league-name {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  flex: 1;
  padding: 0 4px;
}

.badge-status-live {
  font-size: 10px;
  font-weight: 800;
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-status-upcoming {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  border: 1px solid #334155;
  background: #1e293b;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* Match Body */
.match-card-body {
  padding: 14px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: center;
}

.team-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.team-flag-box {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.6);
  border: 2px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d1526;
  padding: 4px;
  flex-shrink: 0;
  transition: transform 0.2s ease, border-color 0.2s ease;
  margin-bottom: 6px;
}

.team-name {
  font-size: 12px;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.vs-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0 4px;
}

.vs-text {
  font-size: 13px;
  font-style: italic;
  font-weight: 900;
  color: #ef4444;
}

.time-label {
  font-size: 10px;
  color: #f87171;
  white-space: nowrap;
  font-weight: 500;
}

.time-label.upcoming-time {
  color: #94a3b8;
}

/* Match Footer Button */
.match-card-footer {
  padding: 8px 12px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.btn-watch-live {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #151f33;
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-watch-live:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.btn-view-match {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #131b2e;
  color: #cbd5e1;
  border: 1px solid #1e293b;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-view-match:hover {
  background: #1e293b;
  color: #fff;
  border-color: #334155;
}

/* Footer disclaimer */
.mhd-footer-disclaimer {
  width: 100%;
  max-width: 100%;
  margin: 20px 0 40px;
  padding: 0 24px;
  box-sizing: border-box;
  text-align: center;
  font-size: 12.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Watch Page Layout */
.watch-container {
  max-width: 1400px;
  margin: 24px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 1024px) {
  .watch-container {
    grid-template-columns: 3fr 1fr;
  }
}

.player-card {
  background: #0d1424;
  border: 1px solid #1e293b;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.player-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.servers-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #0a0e1a;
  border-top: 1px solid #1e293b;
  border-bottom: 1px solid #1e293b;
  flex-wrap: wrap;
}

.btn-server {
  background: #162035;
  border: 1px solid #243452;
  color: #94a3b8;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-server:hover {
  color: #fff;
  border-color: #3b82f6;
}

.btn-server.active {
  background: #2563eb;
  border-color: #60a5fa;
  color: #fff;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
}

/* Match Info Panel */
.match-info-panel {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.score-display {
  font-size: 20px;
  font-weight: 800;
  color: #f8fafc;
}

/* Chat & Commentary Sidebar */
.watch-sidebar {
  background: #0d1424;
  border: 1px solid #1e293b;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  height: 600px;
}

.sidebar-header {
  padding: 12px 16px;
  border-bottom: 1px solid #1e293b;
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-messages {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubble {
  background: #131b2e;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
}

.chat-user {
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 2px;
}

.chat-input-row {
  padding: 12px;
  border-top: 1px solid #1e293b;
  display: flex;
  gap: 8px;
}

.chat-input {
  flex: 1;
  background: #111a2e;
  border: 1px solid #1e293b;
  border-radius: 6px;
  padding: 8px 12px;
  color: #fff;
  font-size: 13px;
  outline: none;
}

.btn-send {
  background: #2563eb;
  border: none;
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}

/* ==========================================================================
   Live TV Channels Section
   ========================================================================== */
.mhd-live-tv-section {
  width: 100%;
  max-width: 100%;
  margin: 36px 0 50px;
  padding: 0 24px;
  display: block;
  box-sizing: border-box;
}

.live-tv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.live-tv-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  color: #facc15;
  letter-spacing: -0.2px;
  text-shadow: 0 0 20px rgba(250, 204, 21, 0.4);
  margin: 0;
}

.live-tv-count {
  background: rgba(250, 204, 21, 0.18);
  border: 1px solid rgba(250, 204, 21, 0.4);
  color: #fef08a;
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-weight: 800;
}

.live-tv-subtitle {
  font-size: 12.5px;
  color: #94a3b8;
  margin-top: 3px;
}

.btn-import-channels {
  background: #0f172a;
  border: 1px solid #1e293b;
  color: #38bdf8;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-import-channels:hover {
  background: #1e293b;
  color: #fff;
  border-color: #38bdf8;
}

/* Empty State */
.live-tv-empty-box {
  background: linear-gradient(180deg, #0e1526 0%, #080c14 100%);
  border: 1.5px dashed rgba(250, 204, 21, 0.3);
  border-radius: 16px;
  padding: 40px 20px;
  text-align: center;
  margin: 10px 0;
}

.empty-icon {
  font-size: 42px;
  margin-bottom: 10px;
}

.empty-title {
  font-size: 18px;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 8px;
}

.empty-desc {
  color: #94a3b8;
  font-size: 13.5px;
  max-width: 520px;
  margin: 0 auto 20px;
  line-height: 1.6;
}

.btn-empty-import {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
  color: #070b13;
  font-weight: 900;
  font-size: 13.5px;
  padding: 10px 24px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(234, 179, 8, 0.35);
  transition: all 0.2s;
}

.btn-empty-import:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(234, 179, 8, 0.5);
  filter: brightness(1.1);
}

/* Responsive Grid */
.live-tv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 1400px) {
  .live-tv-grid { grid-template-columns: repeat(11, 1fr); }
}

@media (max-width: 1399px) and (min-width: 1100px) {
  .live-tv-grid { grid-template-columns: repeat(8, 1fr); }
}

@media (max-width: 1099px) and (min-width: 840px) {
  .live-tv-grid { grid-template-columns: repeat(6, 1fr); }
}

@media (max-width: 839px) and (min-width: 580px) {
  .live-tv-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 579px) {
  .live-tv-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
}

/* Card Styling */
.live-tv-card {
  background: linear-gradient(180deg, #0e1526 0%, #090e1a 100%);
  border: 1px solid #1a2744;
  border-radius: 14px;
  padding: 14px 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  box-sizing: border-box;
}

.live-tv-card:hover {
  transform: translateY(-4px) scale(1.02);
  background: #111b33;
  border-color: #06b6d4;
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.35);
}

.channel-logo-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid #06b6d4;
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  margin-bottom: 9px;
  overflow: hidden;
  flex-shrink: 0;
  box-sizing: border-box;
  position: relative;
  transition: transform 0.2s ease;
}

.live-tv-card:hover .channel-logo-ring {
  transform: scale(1.06);
  border-color: #38bdf8;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.6);
}

.channel-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  display: block;
}

.channel-logo-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #0f172a);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}

.fallback-tv-icon {
  font-size: 13px;
  line-height: 1;
}

.fallback-text {
  font-size: 10px;
  font-weight: 900;
  color: #38bdf8;
  letter-spacing: 0.5px;
}

.channel-name {
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
  letter-spacing: 0.2px;
  box-sizing: border-box;
  margin-bottom: 4px;
}

.channel-badge-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.channel-cat-badge {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  color: #94a3b8;
  background: #131d33;
  border: 1px solid #1e293b;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.channel-live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
  display: inline-block;
}

/* Force video aspect ratio stretch (fills 100% container width/height without letterboxing) */
video, #mhd-video, video[data-shaka-player], .shaka-video-container video {
  width: 100% !important;
  height: 100% !important;
  object-fit: fill !important;
  aspect-ratio: auto !important;
}

/* Match Card BDT Date & Time Badge */
.match-datetime-bdt {
  font-size: 9.5px;
  font-weight: 700;
  color: #38bdf8;
  margin-top: 3px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: rgba(14, 22, 40, 0.85);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}


