:root {
  color-scheme: dark;
  --ink: #f5f7ff;
  --muted: #8790a8;
  --red: #f34052;
  --blue: #38aaff;
  --panel: #151c30;
  --line: rgba(179, 198, 255, .12);
  font-family: Segoe UI, Arial, sans-serif;
  background: #0b1020;
  color: var(--ink);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 80% 6%, rgba(29, 69, 131, .24), transparent 36%),
    radial-gradient(ellipse at 7% 43%, rgba(164, 30, 55, .13), transparent 35%),
    #0b1020;
}

.page-shell { width: min(1120px, calc(100% - 48px)); margin: auto; }

.topbar {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }

.brand-mark {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(243, 64, 82, .45);
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: rgba(243, 64, 82, .08);
}

.brand-mark:before, .brand-mark:after { content: ""; position: absolute; background: rgba(243, 64, 82, .55); }
.brand-mark:before { width: 1px; height: 34px; }
.brand-mark:after { width: 34px; height: 1px; }

.brand-mark span {
  z-index: 1;
  width: 11px;
  height: 14px;
  background: var(--red);
  border-radius: 50% 50% 42% 42%;
  box-shadow: -8px 7px 0 -4px var(--red), 8px 7px 0 -4px var(--red);
}

.brand-copy { display: flex; flex-direction: column; gap: 1px; }
.brand-copy strong { font-size: 19px; letter-spacing: 1.8px; }
.brand-copy strong span { color: var(--red); }
.brand-copy small, .topbar-right, .edition {
  font: 10px Consolas, monospace;
  letter-spacing: 1.3px;
  color: var(--muted);
}
.brand-copy small { font-size: 8px; letter-spacing: 1px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.status-dot, .playing-indicator {
  width: 7px;
  height: 7px;
  background: #4be0ad;
  border-radius: 100%;
  box-shadow: 0 0 12px #4be0ad;
}
.topbar-divider { height: 15px; width: 1px; background: var(--line); margin: 0 3px; }
.edition b { color: var(--red); font-weight: 500; }

.intro { position: relative; min-height: 225px; display: flex; align-items: center; overflow: hidden; }
.intro-copy { position: relative; z-index: 1; padding: 26px 0; }
.eyebrow { font: 11px Consolas, monospace; letter-spacing: 1.8px; color: var(--blue); margin: 0 0 11px; }
.eyebrow span { color: var(--red); font-size: 9px; }
h1 { font-size: clamp(40px, 5.6vw, 63px); line-height: .9; letter-spacing: .3px; margin: 0; text-transform: uppercase; }
h1 span { color: var(--red); }
.intro-text { font-size: 13px; color: #a1aac0; margin: 14px 0 0; }

.spider-art { position: absolute; right: 4%; top: 0; width: 330px; height: 220px; opacity: .77; }
.web-lines {
  position: absolute;
  right: -45px;
  top: -115px;
  width: 335px;
  height: 335px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, transparent 0deg 14deg, rgba(102, 149, 222, .22) 14.3deg 14.7deg, transparent 15deg 30deg);
  mask: radial-gradient(circle, transparent 0 18%, #000 18.5% 19%, transparent 19.5% 39%, #000 39.5% 40%, transparent 40.5% 61%, #000 61.5% 62%, transparent 62.5% 82%, #000 82.5% 83%, transparent 83.5%);
}
.web-lines:after { content: ""; position: absolute; inset: 0; border: 1px solid rgba(102, 149, 222, .28); border-radius: 50%; }
.spider { position: absolute; right: 95px; top: 42px; width: 54px; height: 54px; transform: rotate(-24deg); }
.spider:before {
  content: "";
  position: absolute;
  left: 18px;
  top: 16px;
  width: 19px;
  height: 25px;
  background: var(--red);
  border-radius: 50% 50% 40% 40%;
  box-shadow: 0 0 24px rgba(243, 64, 82, .5);
}
.spider i {
  position: absolute;
  width: 26px;
  height: 2px;
  background: var(--red);
  transform-origin: right center;
  left: -1px;
  top: 19px;
  transform: rotate(35deg);
  border-radius: 3px;
}
.spider i:nth-child(2) { top: 26px; transform: rotate(12deg); }
.spider i:nth-child(3) { top: 33px; transform: rotate(-10deg); }
.spider i:nth-child(4) { top: 39px; transform: rotate(-35deg); }
.spider i:nth-child(5) { left: 30px; top: 19px; transform-origin: left center; transform: rotate(-35deg); }
.spider i:nth-child(6) { left: 30px; top: 26px; transform-origin: left center; transform: rotate(-12deg); }
.spider i:nth-child(7) { left: 30px; top: 33px; transform-origin: left center; transform: rotate(10deg); }
.spider i:nth-child(8) { left: 30px; top: 39px; transform-origin: left center; transform: rotate(35deg); }
.art-caption { position: absolute; right: 20px; bottom: 13px; text-align: right; font: 8px/1.5 Consolas, monospace; letter-spacing: 1px; color: #8494b7; }

.player-card {
  overflow: hidden;
  border: 1px solid rgba(166, 190, 240, .16);
  border-radius: 12px;
  background: #11182a;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .3);
}
.player-topline {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px;
  background: #171e32;
  border-bottom: 1px solid var(--line);
}
.now-playing {
  display: flex;
  align-items: center;
  gap: 9px;
  font: 9px Consolas, monospace;
  letter-spacing: 1.5px;
  color: #9fa9c0;
  max-width: 88%;
  overflow: hidden;
}
.now-playing span:last-child { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.playing-indicator { background: var(--red); box-shadow: 0 0 11px rgba(243, 64, 82, .7); width: 6px; height: 6px; }
.icon-button, .control-button {
  font: inherit;
  color: #aab4cd;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.icon-button { font-size: 22px; line-height: 1; }
.icon-button:hover, .control-button:hover:not(:disabled) { color: white; }

.video-wrap {
  height: min(55vw, 510px);
  min-height: 280px;
  max-height: 510px;
  position: relative;
  background: radial-gradient(ellipse at 50% 48%, #172745 0, #0a0f1c 67%);
  display: grid;
  place-items: center;
}
.video-wrap video {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: contain;
  background: #05070d;
}
.empty-state { position: relative; z-index: 1; text-align: center; display: flex; align-items: center; flex-direction: column; }
.empty-web {
  width: 66px;
  height: 66px;
  border: 1px solid rgba(91, 154, 239, .35);
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: repeating-conic-gradient(from 0deg, rgba(71, 136, 226, .12) 0deg 1deg, transparent 1deg 30deg);
}
.empty-web:before, .empty-web:after { content: ""; position: absolute; border: 1px solid rgba(91, 154, 239, .32); border-radius: 50%; inset: 12px; }
.empty-web:after { inset: 25px; }
.empty-web span { z-index: 1; color: white; margin-left: 3px; font-size: 16px; text-shadow: 0 0 14px var(--red); }
.empty-title { font-size: 23px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; margin: 15px 0 2px; }
.empty-hint { margin: 0 0 16px; color: #9da8bf; font-size: 11px; }
.primary-button {
  border: 0;
  border-radius: 4px;
  padding: 11px 17px;
  background: var(--red);
  color: white;
  font: 700 10px Consolas, monospace;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 5px 20px rgba(243, 64, 82, .22);
  transition: transform .15s, filter .15s;
}
.primary-button:hover { filter: brightness(1.13); transform: translateY(-1px); }
.primary-button span { font-size: 16px; vertical-align: -1px; margin-right: 5px; }
.format-hint { font: 8px Consolas, monospace; color: #8f9bb6; letter-spacing: .7px; margin: 12px 0 0; }
.format-hint span { color: #66728c; }
.video-message {
  display: none;
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(7, 11, 21, .92);
  border: 1px solid rgba(243, 64, 82, .5);
  border-radius: 6px;
  padding: 14px 18px;
  text-align: center;
  font-size: 12px;
  max-width: min(420px, 85%);
  line-height: 1.5;
}
.video-message.visible { display: block; }
.center-play {
  display: none;
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(243, 64, 82, .9);
  place-items: center;
  color: white;
  font-size: 20px;
  padding-left: 4px;
  box-shadow: 0 0 35px rgba(243, 64, 82, .4);
}
.video-wrap.paused-loaded .center-play { display: grid; }

.controls { padding: 0 17px 10px; background: #11182a; }
.seek-row { height: 36px; display: flex; align-items: center; gap: 11px; }
.time { min-width: 36px; color: #9aa5bc; font: 9px Consolas, monospace; }
.time:last-child { text-align: right; }
.seek-area { position: relative; flex: 1; display: flex; align-items: center; height: 16px; }
.range { appearance: none; background: transparent; outline: none; cursor: pointer; position: relative; z-index: 2; }
.seek { width: 100%; height: 16px; margin: 0; }
.range::-webkit-slider-runnable-track { height: 3px; background: rgba(145, 163, 201, .2); border-radius: 4px; }
.range::-moz-range-track { height: 3px; background: rgba(145, 163, 201, .2); border-radius: 4px; }
.range::-webkit-slider-thumb { appearance: none; width: 10px; height: 10px; border-radius: 50%; background: #fff; margin-top: -3.5px; box-shadow: 0 0 0 3px rgba(243, 64, 82, .28); }
.range::-moz-range-thumb { width: 9px; height: 9px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(243, 64, 82, .28); }
.seek::-webkit-slider-runnable-track { background: linear-gradient(to right, var(--red) var(--progress, 0%), rgba(145, 163, 201, .2) var(--progress, 0%)); }
.seek::-moz-range-progress { height: 3px; background: var(--red); }
.buffer-track { position: absolute; left: 0; right: 0; height: 3px; overflow: hidden; border-radius: 4px; }
.buffer-track span { display: block; height: 100%; width: 0; background: rgba(181, 195, 222, .32); }

.control-row, .control-group { display: flex; align-items: center; }
.control-row { justify-content: space-between; height: 34px; }
.control-group { gap: 12px; }
.control-button { height: 28px; min-width: 23px; position: relative; font-size: 17px; display: grid; place-items: center; padding: 0; }
.control-button:disabled { opacity: .35; cursor: default; }
.play-button { width: 30px; height: 30px; border-radius: 50%; color: white; background: var(--red); font-size: 12px; box-shadow: 0 3px 12px rgba(243, 64, 82, .22); }
.play-button:hover:not(:disabled) { background: #ff5364; color: white; }
.control-button small { position: absolute; right: -2px; bottom: -2px; font: 7px Consolas, monospace; color: #9da8bf; }
.volume-range { width: 75px; }
.right-controls { gap: 13px; }
.speed-control { display: flex; align-items: center; gap: 7px; font: 8px Consolas, monospace; letter-spacing: .8px; color: #7f8ba5; }
.speed-control select { background: #1a2339; color: #dce3f4; border: 1px solid var(--line); border-radius: 3px; padding: 5px 17px 5px 7px; font: 10px Consolas, monospace; outline: none; }
.speed-control select:disabled { opacity: .4; }

.below-player { display: flex; justify-content: space-between; align-items: center; padding: 17px 2px 0; }
.tip-card { display: flex; align-items: center; gap: 11px; }
.tip-icon { width: 29px; height: 29px; border: 1px solid rgba(60, 168, 255, .28); border-radius: 5px; display: grid; place-items: center; color: var(--blue); font-size: 14px; }
.tip-card strong { font: 9px Consolas, monospace; letter-spacing: 1px; color: #bfc8dd; }
.tip-card p { font-size: 9px; color: #8995ae; margin: 5px 0 0; }
.tip-card kbd { font: 8px Consolas, monospace; padding: 2px 4px; border: 1px solid rgba(152, 172, 211, .22); border-radius: 3px; color: #c5cee0; background: rgba(151, 172, 211, .06); }
.tip-card i { font-style: normal; padding: 0 3px; color: #53607a; }
.privacy-note { font: 8px Consolas, monospace; letter-spacing: .8px; color: #9ca8c0; display: grid; grid-template-columns: 18px auto; align-items: center; }
.privacy-note > span { grid-row: span 2; font-size: 16px; color: #51d9a4; }
.privacy-note small { font: 8px Segoe UI, sans-serif; letter-spacing: 0; color: #64718b; margin-top: 3px; }

footer {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding: 13px 0 20px;
  display: flex;
  justify-content: space-between;
  color: #56627c;
  font: 8px Consolas, monospace;
  letter-spacing: 1px;
}
.footer-web { font-size: 14px; color: var(--red); }

body.theater-mode .page-shell { width: min(1420px, calc(100% - 32px)); }
body.theater-mode .intro, body.theater-mode .below-player, body.theater-mode footer { display: none; }
body.theater-mode .player-card { margin-top: 28px; }
body.theater-mode .video-wrap { height: min(70vh, 850px); max-height: none; }

.video-wrap.drag-over {
  outline: 2px solid var(--red);
  outline-offset: -3px;
  box-shadow: inset 0 0 50px rgba(243, 64, 82, .15);
}

@media (max-width: 650px) {
  .page-shell { width: calc(100% - 28px); }
  .topbar { height: 68px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-copy strong { font-size: 16px; }
  .brand-copy small { font-size: 7px; }
  .topbar-right { font-size: 8px; gap: 7px; }
  .edition { font-size: 8px; }
  .intro { min-height: 195px; }
  .intro-copy { padding: 20px 0; }
  .intro-text { font-size: 11px; max-width: 220px; line-height: 1.6; }
  .spider-art { right: -105px; opacity: .54; }
  .video-wrap { height: 57vw; min-height: 250px; }
  .player-topline { height: 40px; }
  .controls { padding: 0 11px 8px; }
  .control-group { gap: 8px; }
  .volume-range { width: 52px; }
  .right-controls { gap: 8px; }
  .speed-control { gap: 4px; font-size: 7px; }
  .speed-control select { padding: 4px 3px; font-size: 9px; }
  .below-player { align-items: flex-start; gap: 13px; }
  .tip-card { gap: 7px; }
  .tip-card p { max-width: 255px; line-height: 1.9; }
  .privacy-note { font-size: 7px; }
  .privacy-note small { max-width: 112px; line-height: 1.5; }
  .format-hint { font-size: 7px; }
  .empty-hint { max-width: 260px; line-height: 1.5; }
}

@media (max-width: 390px) {
  .topbar-right .edition, .topbar-divider { display: none; }
  .control-group { gap: 5px; }
  .volume-range { width: 42px; }
  .speed-control { letter-spacing: 0; }
  .below-player { flex-direction: column; }
  .privacy-note { margin-left: 36px; }
}