@import url('https://fonts.googleapis.com/css2?family=Exo+2:ital,wght@0,300;0,400;0,600;0,700;0,900;1,700&display=swap');

/* ═══════════════════════════════════════
   VARIABLES
═══════════════════════════════════════ */
:root {
  --orange:        #e8620a;
  --orange-light:  #ff8c42;
  --orange-glow:   rgba(232, 98, 10, 0.28);
  --orange-subtle: rgba(232, 98, 10, 0.10);
  --dark:          #090909;
  --dark2:         #111111;
  --dark3:         #191919;
  --dark4:         #222222;
  --card-bg:       #141414;
  --border:        rgba(232, 98, 10, 0.16);
  --border-dim:    rgba(255, 255, 255, 0.06);
  --text:          #f0f0f0;
  --muted:         #666;
  --muted2:        #444;
  --radius:        12px;
  --radius-sm:     8px;
  --font:          'Exo 2', sans-serif;
}

/* ═══════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--dark);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════
   APP SHELL
═══════════════════════════════════════ */
.app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ═══════════════════════════════════════
   TOPBAR
═══════════════════════════════════════ */
.topbar {
  height: 58px;
  flex-shrink: 0;
  background: rgba(9, 9, 9, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 14px;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(232,98,10,0.08), 0 4px 20px rgba(0,0,0,0.4);
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo img {
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(232,98,10,0.3));
}
.logo-fallback {
  font-size: 20px;
  font-weight: 900;
  color: var(--orange);
  display: none;
  letter-spacing: -0.5px;
}
.logo-fallback span { color: #fff; }

.search-wrap {
  flex: 1;
  max-width: 400px;
  position: relative;
}
.search-wrap svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  transition: color .2s;
}
.search-wrap:focus-within svg { color: var(--orange); }
.search-wrap input {
  width: 100%;
  background: var(--dark3);
  border: 1.5px solid var(--border-dim);
  border-radius: 22px;
  padding: 8px 18px 8px 40px;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.search-wrap input:focus {
  border-color: var(--orange);
  background: var(--dark4);
  box-shadow: 0 0 0 3px rgba(232, 98, 10, .10);
}
.search-wrap input::placeholder { color: var(--muted2); }

.live-badge {
  margin-left: auto;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 5px 12px 5px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 12px rgba(232,98,10,0.45);
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: blink 1.4s ease infinite;
  box-shadow: 0 0 6px #fff;
}
@keyframes blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .2; transform: scale(.7); }
}

/* ═══════════════════════════════════════
   TICKER
═══════════════════════════════════════ */
.ticker-wrap {
  height: 36px;
  background: linear-gradient(90deg, var(--orange) 0%, var(--orange-light) 50%, var(--orange) 100%);
  background-size: 200% 100%;
  animation: ticker-bg 6s linear infinite;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  position: relative;
}
/* fade edges */
.ticker-wrap::before,
.ticker-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 48px;
  z-index: 2;
  pointer-events: none;
}
.ticker-wrap::before {
  left: 0;
  background: linear-gradient(to right, var(--orange), transparent);
}
.ticker-wrap::after {
  right: 0;
  background: linear-gradient(to left, var(--orange-light), transparent);
}
@keyframes ticker-bg {
  0%   { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}
.ticker-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: ticker 28s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-item {
  display: inline-block;
  padding: 0 36px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .5px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.ticker-sep {
  color: rgba(255,255,255,.5);
  font-size: 10px;
}
@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ═══════════════════════════════════════
   CATEGORY STRIP
═══════════════════════════════════════ */
.cat-strip {
  height: 48px;
  flex-shrink: 0;
  background: var(--dark2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  position: relative;
}
.cat-strip::-webkit-scrollbar { display: none; }
/* fade right edge */
.cat-strip::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 40px;
  background: linear-gradient(to left, var(--dark2), transparent);
  pointer-events: none;
}

.cat-pill {
  background: transparent;
  border: 1.5px solid var(--border-dim);
  color: var(--muted);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
  font-family: var(--font);
  position: relative;
}
.cat-pill:hover {
  color: var(--text);
  border-color: rgba(232,98,10,0.35);
  background: var(--orange-subtle);
}
.cat-pill.active {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
  box-shadow: 0 2px 14px rgba(232,98,10,0.4);
  font-weight: 800;
}

/* ═══════════════════════════════════════
   HERO SLIDER
═══════════════════════════════════════ */
.hero-slider {
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  height: 240px;
  background: #050d1a;
}
.hero-slider.hidden { display: none !important; }

.hero-slides {
  display: flex;
  height: 100%;
  transition: transform .55s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}

.hero-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* grass stripe */
.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 70, 15, 0.22) 0px,
    rgba(0, 70, 15, 0.22) 22px,
    rgba(0, 45, 10, 0.12) 22px,
    rgba(0, 45, 10, 0.12) 44px
  );
  pointer-events: none;
  z-index: 0;
}
/* center orange glow — exactly like astha_hero_design */
.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 65% 55% at 50% 50%, rgba(232,98,10,0.22) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-slide:nth-child(1) { background: #050d1a; }
.hero-slide:nth-child(2) { background: #0d0600; }
.hero-slide:nth-child(3) { background: #040f04; }
.hero-slide:nth-child(4) { background: #0a0014; }
.hero-slide:nth-child(5) { background: #0d0d00; }

/* bottom fade */
.hero-slide-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(5,13,26,0.05) 0%, rgba(5,13,26,0.7) 100%);
  pointer-events: none;
  z-index: 1;
}

/* bg logo — hidden, not needed with centered layout */
.hero-slide-bg { display: none; }

/* ── CENTERED content ── */
.hero-slide-content {
  position: relative;
  z-index: 3;
  width: 100%;
  text-align: center;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* tournament pill */
.hero-tournament {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  color: var(--orange);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 14px;
  text-shadow: 0 0 16px rgba(232,98,10,0.7);
}

/* teams row — flag + name centered */
.hero-match-teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 14px;
  width: 100%;
}

/* each team block */
.hero-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

/* flag emoji — big, drop shadow */
.hero-flag {
  font-size: 52px;
  line-height: 1;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,0.7));
}

/* team name under flag */
.hero-team-name {
  font-size: 13px;
  font-weight: 800;
  color: rgba(255,255,255,0.9);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
  white-space: nowrap;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* VS center */
.hero-vs-wrap {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.hero-vs-wrap .vs,
.hero-match-teams .vs {
  font-size: 32px;
  font-weight: 900;
  color: var(--orange);
  text-shadow:
    0 0 25px rgba(232,98,10,1),
    0 0 50px rgba(232,98,10,0.5);
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
  letter-spacing: 2px;
}

/* time / date badges — centered row */
.hero-match-info {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-date {
  font-size: 12px;
  color: #ffd700;
  font-weight: 700;
  background: rgba(255,215,0,0.10);
  border: 1px solid rgba(255,215,0,0.28);
  padding: 4px 14px;
  border-radius: 20px;
}
.hero-time {
  font-size: 12px;
  color: rgba(255,255,255,.85);
  font-weight: 700;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 4px 14px;
  border-radius: 20px;
}

/* channel name hidden */
.hero-match-channel { display: none; }

.hero-watch-btn {
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  color: #fff;
  border: none;
  padding: 10px 26px;
  border-radius: 25px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 20px rgba(232,98,10,0.55);
  letter-spacing: .3px;
}
.hero-watch-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 28px rgba(232,98,10,0.7);
}
.hero-watch-btn:active { transform: scale(0.97); }

/* channel logo circle — hidden in centered layout */
.hero-slide-logo { display: none; }

/* nav arrows */
.hero-prev, .hero-next {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  font-size: 20px;
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 20;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
  line-height: 1;
}
.hero-prev { left: 8px; }
.hero-next { right: 8px; }
.hero-prev:hover, .hero-next:hover {
  background: var(--orange);
  border-color: var(--orange);
  box-shadow: 0 0 16px rgba(232,98,10,0.5);
}

/* dots */
.hero-dots {
  position: absolute;
  bottom: 10px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 5px;
  z-index: 20;
}
.hero-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
  cursor: pointer;
  transition: all .25s;
}
.hero-dot.active {
  background: var(--orange);
  width: 20px;
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(232,98,10,0.7);
}

@media (max-width: 640px) {
  .hero-slider { height: 210px; }
  .hero-match-teams { font-size: 20px; }
  .hero-slide-logo { width: 60px; height: 60px; right: 12px; }
  .hero-slide-content { max-width: 65%; }
  .hero-slide { padding: 0 14px; }
}

/* ═══════════════════════════════════════
   PLAYER SECTION
═══════════════════════════════════════ */
.player-section {
  flex-shrink: 0;
  background: #000;
  border-bottom: 1.5px solid var(--border);
  display: none;
}
.player-section.show { display: block; }

.video-box {
  position: relative;
  width: 100%;
  background: #000;
}
video {
  width: 100%;
  display: block;
  max-height: 36vh;
  object-fit: contain;
  background: #000;
}

.v-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(4px);
  z-index: 10;
}
.v-overlay.hidden { display: none; }

.spinner {
  width: 40px;
  height: 40px;
  border: 2.5px solid rgba(232,98,10,0.15);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.overlay-title  { font-size: 15px; font-weight: 700; color: var(--text); }
.overlay-sub    { font-size: 12px; color: var(--muted); }

.retry-btn {
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  color: #fff;
  border: none;
  padding: 8px 22px;
  border-radius: 22px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, transform .15s;
  box-shadow: 0 4px 14px rgba(232,98,10,0.4);
}
.retry-btn:hover { opacity: .85; transform: scale(1.03); }

/* Control bar */
.control-bar {
  height: 52px;
  background: var(--dark2);
  border-top: 1px solid var(--border-dim);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.now-logo {
  width: 44px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--dark3);
  border: 1px solid var(--border-dim);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--orange);
}
.now-logo img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }

.now-info { flex: 1; min-width: 0; }
.now-title {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.now-cat { font-size: 10px; color: var(--muted); margin-top: 1px; letter-spacing: .3px; }

.controls { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.ctrl-btn {
  background: var(--dark3);
  border: 1px solid var(--border-dim);
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: all .15s;
}
.ctrl-btn:hover {
  background: var(--orange);
  border-color: var(--orange);
  box-shadow: 0 0 12px rgba(232,98,10,0.4);
}

input[type="range"].vol-slider {
  -webkit-appearance: none;
  width: 68px;
  height: 3px;
  border-radius: 2px;
  background: var(--dark4);
  outline: none;
  cursor: pointer;
}
input[type="range"].vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--orange);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(232,98,10,0.5);
}

.fs-btn {
  background: var(--dark3);
  border: 1px solid var(--border-dim);
  color: var(--muted);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.fs-btn:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

/* ═══════════════════════════════════════
   SCROLLABLE GRID AREA
═══════════════════════════════════════ */
.scroll-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(232,98,10,0.4) transparent;
}
.scroll-area::-webkit-scrollbar { width: 3px; }
.scroll-area::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--orange), var(--orange-light));
  border-radius: 2px;
}

.grid-section { padding: 18px 16px; max-width: 1400px; margin: 0 auto; }

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.section-title {
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -.3px;
}
.section-count {
  background: var(--dark3);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 20px;
  border: 1px solid var(--border-dim);
}
.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
}

.ch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 10px;
}

/* ═══════════════════════════════════════
   CHANNEL CARD
═══════════════════════════════════════ */
.ch-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 1.5px solid var(--border-dim);
  transition: border-color .2s, transform .2s, box-shadow .2s;
  position: relative;
}
.ch-card:hover {
  border-color: var(--orange);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 4px 16px var(--orange-glow);
}
.ch-card.playing {
  border-color: var(--orange);
  box-shadow:
    0 0 0 2px var(--orange),
    0 8px 28px var(--orange-glow),
    inset 0 0 0 1px rgba(232,98,10,0.15);
}

.card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  /* dark gradient instead of harsh white */
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  transition: transform .25s;
}
.ch-card:hover .card-thumb img { transform: scale(1.06); }

.card-fallback {
  font-size: 13px;
  font-weight: 900;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: none;
}

.card-live-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1.2px;
  padding: 2px 7px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(232,98,10,0.5);
}
.card-live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  animation: blink 1.4s ease infinite;
}

/* playing pulse ring */
.card-playing-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(232, 98, 10, .12);
  align-items: center;
  justify-content: center;
}
.ch-card.playing .card-playing-overlay { display: flex; }

.play-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  box-shadow: 0 0 0 6px rgba(232,98,10,0.2), 0 0 0 12px rgba(232,98,10,0.08);
  animation: pulse-ring 2s ease infinite;
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0px rgba(232,98,10,0.4), 0 0 0 0px rgba(232,98,10,0.15); }
  60%  { box-shadow: 0 0 0 8px rgba(232,98,10,0.12), 0 0 0 16px rgba(232,98,10,0.04); }
  100% { box-shadow: 0 0 0 8px rgba(232,98,10,0), 0 0 0 16px rgba(232,98,10,0); }
}

.card-body {
  padding: 8px 10px 9px;
  background: var(--card-bg);
}
.card-name {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.card-cat {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
  letter-spacing: .2px;
}

/* ═══════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty-state .icon { font-size: 44px; margin-bottom: 12px; opacity: .6; }
.empty-state p { font-size: 14px; font-weight: 600; }

/* ═══════════════════════════════════════
   UTILITY
═══════════════════════════════════════ */
.hidden { display: none !important; }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 640px) {
  .ch-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
  .grid-section { padding: 12px; }
  .vol-slider, .fs-btn { display: none; }
  video { max-height: 27vh; }
  .topbar { padding: 0 12px; }
  .cat-strip { padding: 0 12px; }
  .hero-match-teams { gap: 16px; }
  .hero-flag { font-size: 40px; }
  .hero-team-name { font-size: 11px; max-width: 70px; }
  .hero-vs-wrap .vs { font-size: 24px; }
}
