:root {
  --bg: #0c0c12;
  --panel: #1a1a28;
  --pixel: #00ff9c;
  --pixel-dim: #00a86a;
  --pink: #ff4d9a;
  --blue: #4dc3ff;
  --yellow: #ffe566;
  --text: #e8ffe8;
  --muted: #7a8a7a;
  --font: "Press Start 2P", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, #1a2030 0%, transparent 55%),
    var(--bg);
}

.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.12) 2px,
    rgba(0, 0, 0, 0.12) 4px
  );
  opacity: 0.25;
}

.app {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100%;
  padding: 20px 16px 32px;
  position: relative;
  z-index: 2;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  font-size: 10px;
  color: var(--pixel);
}
.logo span {
  color: var(--pink);
}
.battery {
  color: var(--yellow);
  letter-spacing: 2px;
}

.player {
  background: var(--panel);
  border: 4px solid #2e2e44;
  box-shadow:
    0 0 0 4px #0a0a10,
    0 12px 0 #050508,
    0 0 40px rgba(0, 255, 156, 0.08);
  padding: 16px 14px 20px;
}

.screen {
  margin-bottom: 14px;
}
.screen-bezel {
  position: relative;
  background: #05050a;
  border: 4px solid #333355;
  box-shadow: inset 0 0 0 2px #111;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.yt-wrap {
  position: absolute;
  inset: 0;
  /* slight pixel scale look */
  image-rendering: pixelated;
}
.yt-wrap iframe,
#player {
  width: 100% !important;
  height: 100% !important;
}
/* optional CRT-ish overlay corners */
.pixel-frame {
  pointer-events: none;
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.45);
  border: 2px solid rgba(0, 255, 156, 0.15);
}
.screen-label {
  margin-top: 8px;
  font-size: 7px;
  color: var(--yellow);
  letter-spacing: 0.08em;
  text-align: center;
}

.meta {
  margin-bottom: 14px;
}
.meta h1 {
  font-size: 11px;
  line-height: 1.55;
  color: var(--pixel);
  margin-bottom: 8px;
}
.meta p {
  font-size: 8px;
  line-height: 1.6;
  color: var(--muted);
}
.meta a {
  color: var(--blue);
}

.progress-wrap {
  margin-bottom: 16px;
}
.progress {
  height: 12px;
  background: #0a0a14;
  border: 3px solid #444466;
  position: relative;
  cursor: pointer;
}
.fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--pixel-dim), var(--pixel));
}
.knob {
  position: absolute;
  top: -3px;
  left: 0%;
  width: 10px;
  height: 14px;
  background: var(--pink);
  border: 2px solid #fff;
  transform: translateX(-50%);
  pointer-events: none;
}
.times {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 8px;
  color: var(--muted);
}

.controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}
.ctrl {
  font-family: inherit;
  font-size: 14px;
  width: 52px;
  height: 52px;
  border: 3px solid #555577;
  background: #12121c;
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 4px 0 #050508;
}
.ctrl:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #050508;
}
.ctrl.play {
  width: 72px;
  height: 72px;
  font-size: 20px;
  background: var(--pixel);
  color: #04140c;
  border-color: #88ffcc;
  box-shadow: 0 5px 0 #006644;
}
.ctrl.play.on {
  background: var(--pink);
  border-color: #ff99cc;
  box-shadow: 0 5px 0 #880044;
  color: #fff;
}
.ctrl:disabled {
  opacity: 0.4;
  cursor: default;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.vol {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 8px;
  color: var(--blue);
}
.vol input {
  flex: 1;
  accent-color: var(--pixel);
  height: 8px;
}
.chip-btn {
  font-family: inherit;
  font-size: 7px;
  padding: 10px 8px;
  border: 3px solid var(--blue);
  background: #0a1520;
  color: var(--blue);
  cursor: pointer;
  white-space: nowrap;
}
.chip-btn.on {
  background: var(--pink);
  border-color: #ff99cc;
  color: #fff;
}

.note {
  font-size: 7px;
  line-height: 1.7;
  color: var(--muted);
  border-top: 2px dashed #333;
  padding-top: 12px;
}
.note b {
  color: var(--yellow);
}
.note a {
  color: var(--blue);
  word-break: break-all;
}

.foot {
  text-align: center;
  margin-top: 18px;
  font-size: 7px;
  color: #445;
  letter-spacing: 0.1em;
}

/* loading state before YT ready */
.yt-wrap.loading::after {
  content: "LOADING…";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #05050a;
  color: var(--pixel);
  font-size: 10px;
  z-index: 2;
}
