:root {
  --accent: #43f0b0;
  --accent-rgb: 67, 240, 176;
  --bg: #050908;
  --panel: #0a100f;
  --panel-soft: #101816;
  --text: #f1f7f5;
  --muted: #94a29f;
  --line: rgba(255,255,255,.1);
  --danger: #ff4b55;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { width:100%; height:100%; background: #000; }
body {
  width:100%;
  height:100%;
  min-height: 0;
  margin: 0;
  overflow:hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 14% -12%, rgba(var(--accent-rgb),.18), transparent 31rem),
    radial-gradient(circle at 92% 110%, rgba(var(--accent-rgb),.09), transparent 34rem),
    var(--bg);
  font-family: Tahoma, "Segoe UI", Arial, sans-serif;
}
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.is-hidden { display: none !important; }

.page-shell {
  width:100%;
  height:100%;
  min-height:0;
  margin: 0 auto;
  padding:0;
  display:block;
}

.player-card {
  width:100%;
  height:100%;
  overflow: hidden;
  border:0;
  border-radius:0;
  background: #030605;
  box-shadow: 0 36px 100px rgba(0,0,0,.46), 0 0 0 1px rgba(var(--accent-rgb),.025) inset;
}

.video-stage {
  position: relative;
  overflow: hidden;
  width:100%;
  height:100%;
  aspect-ratio:auto;
  min-height:0;
  background: #000;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.video-stage:not(.controls-visible) { cursor:none; }

.video-stage video {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  transition: object-fit .18s ease;
}
.video-stage.video-fit-contain video { object-fit:contain; }
.video-stage.video-fit-cover video { object-fit:cover; }
.video-stage.video-fit-fill video { object-fit:fill; }
.video-stage video::cue { color:#fff; background:rgba(0,0,0,.72); font-family:Tahoma,"Segoe UI",Arial,sans-serif; font-size:clamp(13px,2.1vw,25px); line-height:1.45; text-shadow:0 2px 4px #000; }
.shaka-text-container { position:absolute!important; z-index:6!important; inset:0!important; pointer-events:none!important; }
.shaka-text-container span { font-family:Tahoma,"Segoe UI",Arial,sans-serif!important; text-shadow:0 2px 5px #000!important; }

.video-stage:fullscreen,
.video-stage:-webkit-full-screen { width: 100vw; height: 100vh; max-width: none; aspect-ratio: auto; background: #000; }

.visual-poster {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, rgba(var(--accent-rgb),.23), transparent 34%), linear-gradient(135deg,#081512,#020403 70%);
  transition: opacity .5s ease;
}
.visual-poster.is-dimmed { opacity: .2; }
.poster-grid {
  position: absolute; inset: -25%; transform: perspective(700px) rotateX(58deg) translateY(30%);
  background-image: linear-gradient(rgba(var(--accent-rgb),.08) 1px,transparent 1px),linear-gradient(90deg,rgba(var(--accent-rgb),.08) 1px,transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom,transparent 5%,black 45%,transparent 92%);
}
.poster-glow { position: absolute; width: 48%; aspect-ratio: 1; border: 1px solid rgba(var(--accent-rgb),.16); border-radius: 50%; left: 26%; top: 24%; box-shadow: 0 0 90px rgba(var(--accent-rgb),.08) inset; }
.poster-glow::before,.poster-glow::after { content:""; position:absolute; inset:14%; border:1px solid rgba(var(--accent-rgb),.1); border-radius:50%; }
.poster-glow::after { inset:33%; background:rgba(var(--accent-rgb),.04); }
.poster-copy { position:absolute; z-index:2; inset:0; display:grid; place-content:center; justify-items:center; text-align:center; }
.poster-kicker { color:var(--accent); font-size:12px; letter-spacing:.12em; }
.poster-copy strong { margin-top:8px; font-size:clamp(25px,4vw,50px); letter-spacing:-.04em; }
.poster-copy small { margin-top:8px; color:var(--muted); font-size:12px; }

.player-head {
  position:absolute; z-index:8; left:0; right:0; top:0; height:90px; padding:18px 20px;
  display:flex; align-items:flex-start; justify-content:flex-start;
  background:linear-gradient(rgba(0,0,0,.68),transparent);
  pointer-events:none;
  opacity:1;
  transition:opacity .22s ease;
}
.video-stage:not(.controls-visible) .player-head { opacity:0; }
.player-brand { pointer-events:auto; display:flex; align-items:center; gap:9px; text-decoration:none; color:white; }
.brand-symbol { width:38px; height:38px; display:grid; place-items:center; border-radius:12px; color:#06120e; background:var(--accent); font:800 17px Arial,sans-serif; box-shadow:0 8px 25px rgba(var(--accent-rgb),.2); }
.player-brand > span:last-child { display:grid; line-height:1; }
.player-brand strong { font-size:16px; letter-spacing:.03em; }
.player-brand small { margin-top:5px; color:var(--accent); font:700 7px Arial,sans-serif; letter-spacing:.18em; }
.head-badges { display:flex; gap:7px; }
.head-badges > span { min-height:29px; padding:0 10px; border:1px solid rgba(255,255,255,.13); border-radius:8px; background:rgba(4,8,7,.58); backdrop-filter:blur(12px); display:flex; align-items:center; gap:7px; font-size:10px; }
.head-badges i { display:block; width:6px; height:6px; border-radius:50%; }
.live-badge i { background:var(--danger); box-shadow:0 0 0 4px rgba(255,75,85,.12); animation:pulse 1.6s infinite; }
.network-badge { color:#c7d2cf; }
.network-badge i { background:var(--accent); }
.network-badge.is-offline i { background:var(--danger); }

.rights-watermark {
  position:absolute;
  z-index:7;
  left:18px;
  bottom:73px;
  display:flex;
  align-items:center;
  gap:9px;
  min-height:38px;
  padding:5px 11px 5px 6px;
  color:#fff;
  border:1px solid rgba(255,255,255,.24);
  border-radius:11px;
  background:linear-gradient(105deg,rgba(2,8,6,.76),rgba(2,8,6,.46));
  box-shadow:0 8px 24px rgba(0,0,0,.34),inset 0 1px rgba(255,255,255,.08);
  backdrop-filter:blur(7px);
  pointer-events:none;
  text-shadow:0 2px 8px rgba(0,0,0,.9);
  transition:bottom .22s ease,opacity .22s ease;
}
.video-stage:not(.controls-visible) .rights-watermark { bottom:18px; }
.watermark-mark {
  width:29px;
  height:29px;
  display:grid;
  place-items:center;
  color:#03110b;
  border:1px solid rgba(255,255,255,.7);
  background:linear-gradient(145deg,var(--accent),#baffdf);
  border-radius:8px;
  font:900 8px Arial,sans-serif;
  letter-spacing:-.04em;
}
.rights-watermark > span:last-child { display:grid; line-height:1; }
.rights-watermark strong { font:800 9px Arial,sans-serif; letter-spacing:.14em; }
.rights-watermark small { margin-top:4px; color:var(--accent); font:700 6px Arial,sans-serif; letter-spacing:.07em; opacity:1; }

.loading-state,.empty-state,.error-state {
  position:absolute; z-index:5; inset:0; display:grid; place-content:center; justify-items:center; padding:30px; text-align:center;
  background:rgba(1,4,3,.48); backdrop-filter:blur(2px);
}
.loading-state strong,.empty-state strong,.error-state strong { margin-top:13px; font-size:17px; }
.loading-state small,.empty-state p,.error-state p { color:var(--muted); margin:6px 0 0; font-size:11px; }
.loader-ring { width:42px; height:42px; border-radius:50%; border:3px solid rgba(255,255,255,.12); border-top-color:var(--accent); animation:spin .9s linear infinite; }
.empty-signal { height:42px; display:flex; align-items:end; gap:5px; }
.empty-signal i { width:6px; border-radius:5px; background:var(--accent); opacity:.8; }
.empty-signal i:nth-child(1){height:14px}.empty-signal i:nth-child(2){height:27px}.empty-signal i:nth-child(3){height:40px;opacity:.2}
.error-icon { width:42px; height:42px; display:grid; place-items:center; border-radius:50%; color:white; background:rgba(255,75,85,.16); border:1px solid rgba(255,75,85,.4); font:bold 22px Arial,sans-serif; }
.state-button { margin-top:16px; min-height:39px; padding:0 14px; display:flex; align-items:center; gap:8px; border:0; border-radius:9px; background:var(--accent); color:#06120e; font-weight:700; font-size:11px; cursor:pointer; }
.retry-icon { width:12px; height:12px; border:2px solid currentColor; border-left-color:transparent; border-radius:50%; }

.big-play {
  position:absolute; z-index:7; left:50%; top:50%; width:74px; height:74px; transform:translate(-50%,-50%); display:grid; place-items:center;
  border:1px solid rgba(255,255,255,.28); border-radius:50%; background:rgba(3,10,8,.68); backdrop-filter:blur(15px); cursor:pointer; box-shadow:0 18px 48px rgba(0,0,0,.42); transition:.2s ease;
}
.big-play:hover { color:#04130e; background:var(--accent); transform:translate(-50%,-50%) scale(1.05); }
.play-icon { display:block; width:0; height:0; margin-left:5px; border-top:12px solid transparent; border-bottom:12px solid transparent; border-left:19px solid currentColor; }
.play-icon.small { border-top-width:7px; border-bottom-width:7px; border-left-width:11px; margin-left:2px; }
.pause-icon { display:block; width:13px; height:15px; border-left:4px solid currentColor; border-right:4px solid currentColor; }

.controls-layer { position:absolute; z-index:9; inset:auto 0 0; padding:48px 18px 13px; background:linear-gradient(transparent,rgba(0,0,0,.94)); opacity:0; transform:translateY(8px); pointer-events:none; transition:.22s ease; }
.controls-layer.is-visible { opacity:1; transform:none; pointer-events:auto; }
.timeline-shell { position:relative; height:17px; display:flex; align-items:center; cursor:pointer; }
.timeline-base,.timeline-buffer,.timeline-played { position:absolute; left:0; height:3px; border-radius:99px; pointer-events:none; }
.timeline-base { right:0; background:rgba(255,255,255,.2); }
.timeline-buffer { width:0; background:rgba(255,255,255,.36); }
.timeline-played { width:0; background:var(--accent); box-shadow:0 0 12px rgba(var(--accent-rgb),.45); }
.timeline-shell input { width:100%; height:17px; margin:0; opacity:0; cursor:pointer; }
.controls-row { display:flex; justify-content:space-between; align-items:center; min-height:39px; }
.controls-group { display:flex; align-items:center; gap:4px; }
.control-button,.quality-button,.latency-button,.edge-button { height:36px; border:0; border-radius:8px; background:transparent; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.control-button { width:36px; }
.control-button:hover,.quality-button:hover,.latency-button:hover { background:rgba(255,255,255,.12); }
.play-button { color:var(--accent); }
.speaker-icon { position:relative; width:14px; height:14px; color:transparent; border:2px solid white; border-left:0; border-radius:0 9px 9px 0; transform:scale(.8); }
.speaker-icon::before { content:""; position:absolute; right:9px; top:2px; border-top:4px solid transparent; border-bottom:4px solid transparent; border-right:6px solid white; }
.speaker-icon.is-muted::after { content:"×"; position:absolute; color:var(--danger); font:700 19px Arial; left:4px; top:-7px; }
.volume-slider { width:74px; height:3px; accent-color:var(--accent); cursor:pointer; }
.time-label { margin-left:5px; color:rgba(255,255,255,.78); font:11px ui-monospace,Consolas,monospace; white-space:nowrap; }
.edge-button { padding:0 8px; gap:6px; font:700 9px Arial,sans-serif; }
.edge-button i { width:5px; height:5px; border-radius:50%; background:var(--danger); }
.text-control span { font:700 7px Arial,sans-serif; letter-spacing:.03em; }
.audio-icon { width:19px; height:16px; border:1px solid currentColor; border-radius:4px; display:grid; place-items:center; font:700 9px Arial,sans-serif; }
.captions-icon { min-width:21px; height:16px; padding:0 2px; border:1px solid currentColor; border-radius:4px; display:grid; place-items:center; font:700 7px Arial,sans-serif; letter-spacing:-.03em; }
.latency-button { gap:5px; padding:0 7px; }
.latency-button b { font:700 8px Arial,sans-serif; }
.latency-icon { position:relative; width:15px; height:15px; border:1.5px solid currentColor; border-radius:50%; }
.latency-icon::before { content:""; position:absolute; width:1.5px; height:4px; left:5.3px; top:2.3px; background:currentColor; border-radius:2px; }
.latency-icon::after { content:""; position:absolute; width:4px; height:1.5px; left:5.3px; top:6px; background:currentColor; border-radius:2px; transform:rotate(25deg); transform-origin:left; }
.airplay-icon { position:relative; width:18px; height:13px; border:1.5px solid currentColor; border-radius:2px; }
.airplay-icon::after { content:""; position:absolute; left:4px; bottom:-6px; border-left:5px solid transparent; border-right:5px solid transparent; border-bottom:6px solid currentColor; }
.cast-icon { position:relative; width:18px; height:14px; border:1.5px solid currentColor; border-left-color:transparent; border-radius:2px; }
.cast-icon::before,.cast-icon::after { content:""; position:absolute; left:-2px; bottom:-2px; border:1.5px solid currentColor; border-left-color:transparent; border-bottom-color:transparent; border-radius:0 12px 0 0; transform:rotate(-45deg); transform-origin:bottom left; }
.cast-icon::before { width:8px; height:8px; }.cast-icon::after { width:3px; height:3px; }
.pip-icon { width:19px; height:14px; border:1.5px solid currentColor; border-radius:2px; position:relative; }
.pip-icon::after { content:""; position:absolute; width:8px; height:5px; right:2px; bottom:2px; background:currentColor; }
.fullscreen-icon { width:17px; height:17px; background:linear-gradient(currentColor,currentColor) 0 0/6px 1.5px no-repeat,linear-gradient(currentColor,currentColor) 0 0/1.5px 6px no-repeat,linear-gradient(currentColor,currentColor) 100% 0/6px 1.5px no-repeat,linear-gradient(currentColor,currentColor) 100% 0/1.5px 6px no-repeat,linear-gradient(currentColor,currentColor) 0 100%/6px 1.5px no-repeat,linear-gradient(currentColor,currentColor) 0 100%/1.5px 6px no-repeat,linear-gradient(currentColor,currentColor) 100% 100%/6px 1.5px no-repeat,linear-gradient(currentColor,currentColor) 100% 100%/1.5px 6px no-repeat; }
.fit-icon { position:relative; width:18px; height:14px; border:1.5px solid currentColor; border-radius:2px; }
.fit-icon::before,.fit-icon::after { content:""; position:absolute; top:50%; width:4px; height:4px; margin-top:-2px; border-top:1.5px solid currentColor; border-right:1.5px solid currentColor; }
.fit-icon::before { left:3px; transform:rotate(-135deg); }
.fit-icon::after { right:3px; transform:rotate(45deg); }
.video-stage.video-fit-fill .fit-icon { border-style:dashed; color:var(--accent); }
.video-stage.video-fit-cover .fit-icon { color:var(--accent); box-shadow:inset 0 0 0 3px rgba(var(--accent-rgb),.18); }
.quality-button { gap:5px; padding:0 7px; font:700 9px Arial,sans-serif; }
.quality-button i { padding:2px 3px; color:#05110d; background:var(--accent); border-radius:3px; font-style:normal; font-size:7px; }

.player-menu,.stats-panel { position:absolute; z-index:12; right:14px; bottom:68px; width:min(290px,calc(100% - 28px)); max-height:70%; overflow:auto; border:1px solid rgba(255,255,255,.14); border-radius:15px; background:rgba(7,14,12,.96); backdrop-filter:blur(18px); box-shadow:0 20px 55px rgba(0,0,0,.52); }
.player-menu header,.stats-panel header { position:sticky; top:0; z-index:1; display:flex; align-items:center; justify-content:space-between; padding:13px 14px; border-bottom:1px solid var(--line); background:rgba(7,14,12,.96); }
.player-menu header span,.stats-panel header span { display:grid; }
.player-menu header strong,.stats-panel header strong { font-size:12px; }
.player-menu header small,.stats-panel header small { color:var(--muted); margin-top:3px; font-size:8px; }
.player-menu header button,.stats-panel header button { width:28px; height:28px; border:0; border-radius:7px; background:rgba(255,255,255,.07); cursor:pointer; font-size:18px; }
.player-menu > div { padding:6px; }
.menu-option { width:100%; min-height:51px; padding:7px 9px; border:0; border-radius:10px; background:transparent; display:flex; align-items:center; justify-content:space-between; cursor:pointer; text-align:right; }
.menu-option:hover { background:rgba(var(--accent-rgb),.08); }
.menu-option > span { display:grid; }
.menu-option strong { font-size:11px; }
.menu-option small { color:var(--muted); margin-top:3px; font:8px Arial,sans-serif; }
.menu-option em { width:17px; height:17px; border:1px solid rgba(255,255,255,.18); border-radius:50%; position:relative; }
.menu-option.is-selected em { border-color:var(--accent); }
.menu-option.is-selected em::after { content:""; position:absolute; inset:4px; background:var(--accent); border-radius:50%; }
.stats-panel { width:240px; }
.stats-panel dl { margin:0; padding:7px 13px 12px; }
.stats-panel dl div { min-height:38px; border-bottom:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; }
.stats-panel dl div:last-child { border:0; }
.stats-panel dt { color:var(--muted); font-size:9px; }.stats-panel dd { margin:0; font:10px ui-monospace,Consolas,monospace; }

.tap-feedback { position:absolute; z-index:8; top:0; bottom:0; width:37%; display:grid; place-items:center; opacity:0; pointer-events:none; }
.tap-feedback span { width:58px; height:58px; border-radius:50%; display:grid; place-items:center; background:rgba(255,255,255,.12); backdrop-filter:blur(9px); font:700 12px Arial,sans-serif; }
.tap-feedback.is-active { animation:tapFeedback .55s ease; }
.tap-right { right:0; }.tap-left { left:0; }

.toast { position:absolute; z-index:15; left:50%; top:18%; transform:translate(-50%,-8px); min-width:180px; max-width:80%; padding:10px 13px; border-radius:9px; color:white; background:rgba(4,10,8,.9); border:1px solid rgba(255,255,255,.12); text-align:center; font-size:10px; opacity:0; pointer-events:none; transition:.2s ease; }
.toast.is-visible { opacity:1; transform:translate(-50%,0); }

.match-bar { min-height:88px; padding:13px 20px; display:flex; justify-content:space-between; align-items:center; border-top:1px solid var(--line); background:linear-gradient(90deg,rgba(var(--accent-rgb),.055),rgba(255,255,255,.015)); }
.match-main { display:flex; align-items:center; gap:12px; }
.channel-logo { width:47px; height:52px; display:grid; place-items:center; color:#07140f; background:linear-gradient(145deg,var(--accent),#a6ffd8); border-radius:14px 14px 18px 18px; font:800 13px Arial,sans-serif; box-shadow:inset 0 0 0 4px rgba(255,255,255,.17); }
.match-main > span:last-child { display:grid; }
.match-main small { color:var(--accent); font-size:9px; }
.match-main strong { margin-top:4px; font-size:15px; }
.match-meta { display:flex; align-items:center; gap:17px; }
.match-meta > span { display:flex; align-items:center; gap:7px; color:var(--muted); font-size:9px; }
.match-meta b { color:#eaf2f0; font-weight:600; }
.clock-icon { width:13px; height:13px; border:1.5px solid var(--accent); border-radius:50%; position:relative; }
.clock-icon::before { content:""; position:absolute; width:1px; height:4px; background:var(--accent); left:5px; top:2px; }
.clock-icon::after { content:""; position:absolute; width:3px; height:1px; background:var(--accent); left:5px; top:6px; transform:rotate(30deg); transform-origin:left; }
.quality-meta { direction:ltr; padding:5px 8px; border:1px solid var(--line); border-radius:7px; background:rgba(255,255,255,.025); }

.device-note { min-height:70px; display:flex; align-items:center; gap:12px; padding:12px 18px; color:var(--muted); border:1px solid rgba(255,255,255,.08); border-radius:15px; background:rgba(255,255,255,.022); }
.device-icon { width:37px; height:37px; flex:0 0 auto; display:grid; place-items:center; border-radius:10px; color:var(--accent); background:rgba(var(--accent-rgb),.08); }
.device-icon i { width:13px; height:21px; border:1.5px solid currentColor; border-radius:3px; position:relative; }
.device-icon i::after { content:""; position:absolute; width:3px; height:1px; background:currentColor; bottom:2px; left:4px; }
.device-note > div { display:grid; }
.device-note strong { color:#dfe8e5; font-size:11px; }.device-note p { margin:3px 0 0; font-size:9px; }
.feature-list { margin-right:auto; direction:ltr; display:flex; align-items:center; gap:8px; font:8px Arial,sans-serif; letter-spacing:.08em; }
.feature-list i { width:3px; height:3px; border-radius:50%; background:var(--accent); }

@media (max-width:700px) {
  .page-shell { width:100%; height:100%; min-height:0; padding:0; }
  .player-card { border-radius:0; border-left:0; border-right:0; box-shadow:none; }
  .video-stage { width:100%; height:100%; aspect-ratio:auto; min-height:0; max-height:none; }
  .player-head { height:72px; padding:12px; }
  .brand-symbol { width:33px; height:33px; border-radius:10px; }
  .player-brand strong { font-size:13px; }
  .network-badge { display:none !important; }
  .controls-layer { padding:38px 8px calc(7px + env(safe-area-inset-bottom)); }
  .volume-slider,.time-label,.controls-right .text-control { display:none; }
  .control-button { width:33px; height:33px; }
  .quality-button { height:33px; }
  .latency-button { height:33px; padding:0 4px; }
  .latency-button b { display:none; }
  .controls-group { gap:1px; }
  .poster-copy strong { font-size:28px; }
  .big-play { width:60px; height:60px; }
  .player-menu,.stats-panel { position:fixed; z-index:30; left:10px; right:10px; bottom:calc(10px + env(safe-area-inset-bottom)); width:auto; max-height:58dvh; }
  .rights-watermark { left:11px; bottom:calc(59px + env(safe-area-inset-bottom)); transform:scale(.9); transform-origin:left bottom; }
  .video-stage:not(.controls-visible) .rights-watermark { bottom:calc(10px + env(safe-area-inset-bottom)); }
}

@media (max-width:410px) {
  .controls-right #airplayButton { display:none; }
  .controls-right #statsButton { display:none; }
}

@media (orientation:landscape) and (max-height:520px) {
  .page-shell { width:100%; padding:0; }
  .player-card { border:0; border-radius:0; }
  .video-stage { width:100vw; height:100dvh; max-height:none; aspect-ratio:auto; }
}

@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; }
}

@keyframes spin { to { transform:rotate(360deg); } }
@keyframes pulse { 50% { opacity:.45; transform:scale(.75); } }
@keyframes tapFeedback { 0%{opacity:0}25%{opacity:1}100%{opacity:0} }
