/* Winamp on the monitor: an original, CSS-only take on the classic 2.x player,
   drawn at 1.5x so it still reads once the page is warped onto the glass.
   Every class here is prefixed wa-. Positions are in the screen's own pixels. */

.wa-win {
  --wa-hi: #6f7291;
  --wa-lo: #0f0f17;
  --wa-ink: #c9cbdc;
  --wa-lcd: #1ee81e;
  --wa-lcd-glow: rgba(30, 232, 30, 0.45);
  --wa-lcd-dim: #0c260e;
  --wa-gold: #d8c27c;
  --wa-sunken: var(--wa-lo) var(--wa-hi) var(--wa-hi) var(--wa-lo);
  --wa-raised: var(--wa-hi) var(--wa-lo) var(--wa-lo) var(--wa-hi);
  position: absolute;
  z-index: 20;
  box-sizing: border-box;
  color: var(--wa-ink);
  font: 11px/1 Tahoma, Verdana, sans-serif;
  text-align: left;
  /* gunmetal with fine horizontal ridges */
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0 1px, rgba(0, 0, 0, 0.14) 1px 2px, transparent 2px 4px),
    linear-gradient(180deg, #3b3d53 0%, #2a2b3e 45%, #1f2030 100%);
  border: 1px solid #07070c;
  box-shadow: inset 1px 1px 0 var(--wa-hi), inset -1px -1px 0 var(--wa-lo), 0 4px 14px rgba(0, 0, 0, 0.5);
  user-select: none;
  -webkit-user-select: none;
}
.wa-win[hidden] { display: none; }
.wa-win *, .wa-win *::before, .wa-win *::after { box-sizing: border-box; }
:where(.wa-win) button { margin: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.wa-win :focus { outline: none; }
.wa-win :focus-visible { outline: 1px dotted var(--wa-gold); outline-offset: 1px; }

.wa-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ------------------------------------------------ title bars */
.wa-title {
  position: absolute; left: 1px; right: 1px; top: 1px; height: 19px;
  display: flex; align-items: center; gap: 6px; padding: 0 4px 0 6px;
  background: linear-gradient(180deg, #34364c, #1c1d2b);
  border-bottom: 1px solid #0a0a12;
}
.wa-movable .wa-title { cursor: move; touch-action: none; }
.wa-title b { font: bold 10px/1 Tahoma, Verdana, sans-serif; letter-spacing: 0.24em; color: #efe7c6; text-shadow: 0 1px 0 #000; white-space: nowrap; }
.wa-ridge {
  flex: 1; min-width: 8px; height: 8px;
  background: repeating-linear-gradient(180deg, var(--wa-gold) 0 1px, #5a4d22 1px 2px, transparent 2px 3px);
}
.wa-inactive .wa-ridge { background: repeating-linear-gradient(180deg, #8a8ca0 0 1px, #34354a 1px 2px, transparent 2px 3px); opacity: 0.7; }
.wa-inactive .wa-title b { color: #9fa1b4; }
.wa-tbtns { display: flex; gap: 2px; margin-left: 2px; }
.wa-tbtn {
  position: relative; width: 14px; height: 13px;
  background: linear-gradient(#5d6079, #34364a);
  border: 1px solid; border-color: #9699b6 #101018 #101018 #9699b6;
}
.wa-tbtn:active { background: #26273a; border-color: #101018 #9699b6 #9699b6 #101018; }
.wa-tbtn::before, .wa-tbtn::after { content: ""; position: absolute; background: #ebe4c6; }
.wa-tmin::before { left: 3px; right: 3px; bottom: 2px; height: 2px; }
.wa-tmin::after { display: none; }
.wa-tx::before, .wa-tx::after { left: 1px; right: 1px; top: 50%; height: 2px; margin-top: -1px; }
.wa-tx::before { transform: rotate(45deg); }
.wa-tx::after { transform: rotate(-45deg); }

/* ------------------------------------------------ main window: display */
.wa-lcd {
  position: absolute; left: 12px; top: 28px; width: 140px; height: 62px; overflow: hidden;
  background: #000; border: 1px solid; border-color: var(--wa-sunken);
}
.wa-state { position: absolute; left: 9px; top: 11px; width: 10px; height: 12px; }
.wa-state::before, .wa-state::after { content: ""; position: absolute; top: 0; bottom: 0; background: var(--wa-lcd); }
.wa-state[data-s="play"]::before, .wa-state[data-s="load"]::before { left: 0; right: 0; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.wa-state[data-s="pause"]::before { left: 0; width: 3px; }
.wa-state[data-s="pause"]::after { right: 1px; width: 3px; }
.wa-state[data-s="stop"]::before { left: 0; right: 0; top: 1px; bottom: 1px; }
.wa-state[data-s="play"]::after, .wa-state[data-s="load"]::after, .wa-state[data-s="stop"]::after { display: none; }
.wa-state[data-s="load"] { animation: wa-pulse 0.8s steps(1, end) infinite; }

.wa-time { position: absolute; left: 24px; top: 3px; width: 110px; height: 30px; font: bold 25px/30px "Courier New", Courier, monospace; letter-spacing: -1px; }
.wa-ghost, .wa-digits, .wa-minus { position: absolute; top: 0; }
.wa-ghost, .wa-digits { left: 16px; }
.wa-minus { left: 1px; color: var(--wa-lcd); text-shadow: 0 0 6px var(--wa-lcd-glow); }
.wa-ghost { color: var(--wa-lcd-dim); }
.wa-digits { color: var(--wa-lcd); text-shadow: 0 0 6px var(--wa-lcd-glow); }
.wa-paused .wa-digits { animation: wa-blink 1s steps(1, end) infinite; }

.wa-visbtn { position: absolute; left: 9px; top: 35px; width: 118px; height: 22px; }
.wa-vis {
  display: block; width: 118px; height: 22px;
  background: radial-gradient(circle, #1d1e2a 0.8px, transparent 1px) 0 0 / 3px 3px, #000;
}

.wa-marquee {
  position: absolute; left: 162px; top: 29px; width: 236px; height: 20px; overflow: hidden;
  background: #000; border: 1px solid; border-color: var(--wa-sunken);
}
.wa-mq {
  position: absolute; left: 5px; top: 0; white-space: pre;
  font: bold 12px/18px "Courier New", Courier, monospace; color: var(--wa-lcd); text-shadow: 0 0 5px var(--wa-lcd-glow);
}
.wa-mq.wa-static { right: 5px; overflow: hidden; text-overflow: ellipsis; }

.wa-info {
  position: absolute; left: 162px; top: 55px; width: 236px; height: 17px;
  display: flex; align-items: center; gap: 4px;
  font: 9px/1 Tahoma, Verdana, sans-serif; letter-spacing: 0.04em; color: #a9abc0;
}
.wa-num {
  min-width: 30px; height: 17px; padding: 0 4px; text-align: right;
  font: bold 12px/15px "Courier New", Courier, monospace; color: var(--wa-lcd);
  background: #000; border: 1px solid; border-color: var(--wa-sunken);
}
.wa-khz { min-width: 24px; margin-left: 6px; }
.wa-ind { font-weight: bold; letter-spacing: 0.08em; color: #394a3b; }
.wa-mono { margin-left: auto; }
.wa-ind.wa-on { color: var(--wa-lcd); text-shadow: 0 0 4px var(--wa-lcd-glow); }

/* ------------------------------------------------ main window: sliders */
.wa-range { position: absolute; margin: 0; padding: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
.wa-range::-webkit-slider-runnable-track {
  height: var(--wa-th-h); box-sizing: border-box;
  background: var(--wa-track); border: 1px solid; border-color: var(--wa-sunken);
}
.wa-range::-moz-range-track {
  height: var(--wa-th-h); box-sizing: border-box;
  background: var(--wa-track); border: 1px solid; border-color: var(--wa-sunken);
}
.wa-range::-webkit-slider-thumb {
  width: var(--wa-th-w); height: var(--wa-th-h); margin-top: -1px; box-sizing: border-box; border-radius: 0;
  background: linear-gradient(#ece5c8, #a69f80); border: 1px solid; border-color: #fbf6e0 #4d4836 #4d4836 #fbf6e0;
  -webkit-appearance: none; appearance: none;
}
.wa-range::-moz-range-thumb {
  width: var(--wa-th-w); height: var(--wa-th-h); box-sizing: border-box; border-radius: 0;
  background: linear-gradient(#ece5c8, #a69f80); border: 1px solid; border-color: #fbf6e0 #4d4836 #4d4836 #fbf6e0;
}
.wa-range:active::-webkit-slider-thumb { background: linear-gradient(#a69f80, #d7d0b2); }
.wa-range:active::-moz-range-thumb { background: linear-gradient(#a69f80, #d7d0b2); }

.wa-seek { left: 12px; top: 102px; width: 386px; height: 15px; --wa-th-w: 44px; --wa-th-h: 15px; --wa-track: linear-gradient(#07070c, #16161f); }
.wa-seek:disabled { cursor: default; }
.wa-seek:disabled::-webkit-slider-thumb { visibility: hidden; }
.wa-seek:disabled::-moz-range-thumb { visibility: hidden; }

.wa-vol {
  left: 162px; top: 79px; width: 150px; height: 14px;
  --wa-th-w: 22px; --wa-th-h: 14px; --wa-fill: 80%; --wa-hue: 24;
  --wa-track: linear-gradient(90deg, hsl(var(--wa-hue) 80% 40%) 0 var(--wa-fill), #0b0b12 var(--wa-fill));
}
.wa-vol.wa-muted { --wa-track: linear-gradient(90deg, #3b3c4c 0 var(--wa-fill), #0b0b12 var(--wa-fill)); }

/* ------------------------------------------------ main window: buttons */
.wa-tog {
  position: absolute; top: 78px; height: 16px;
  font: bold 9px/14px Tahoma, Verdana, sans-serif; letter-spacing: 0.1em; color: #8b8ea6;
  background: linear-gradient(#45475e, #28293a); border: 1px solid; border-color: var(--wa-raised);
}
.wa-tog-vid { left: 318px; width: 40px; }
.wa-tog-pl { left: 361px; width: 37px; }
.wa-tog[aria-pressed="true"] { color: var(--wa-lcd); text-shadow: 0 0 4px var(--wa-lcd-glow); }
.wa-tog:active { border-color: var(--wa-sunken); }

.wa-transport { position: absolute; left: 12px; top: 128px; display: flex; align-items: center; }
.wa-btn {
  width: 34px; height: 28px; display: grid; place-items: center; color: #1f202c;
  background: linear-gradient(#dcdde7, #a4a6b8);
  border: 1px solid; border-color: #fbfbff #3e3f50 #3e3f50 #fbfbff;
  box-shadow: inset -1px -1px 0 #7d8095;
}
.wa-btn:active { background: linear-gradient(#9fa1b3, #c9cad6); border-color: #3e3f50 #fbfbff #fbfbff #3e3f50; box-shadow: inset 1px 1px 0 #7d8095; }
.wa-btn:active .wa-g { transform: translate(1px, 1px); }
.wa-eject { width: 33px; height: 24px; margin-left: 9px; }

/* transport glyphs, drawn rather than typed so no platform turns them into emoji */
.wa-g { position: relative; display: block; width: 13px; height: 11px; }
.wa-g::before, .wa-g::after { content: ""; position: absolute; background: currentColor; }
.wa-g-play::before { left: 1px; right: 1px; top: 0; bottom: 0; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.wa-g-pause::before, .wa-g-pause::after { top: 0; bottom: 0; width: 4px; }
.wa-g-pause::before { left: 2px; }
.wa-g-pause::after { right: 2px; }
.wa-g-stop::before { left: 1px; right: 1px; top: 0; bottom: 0; }
.wa-g-play::after, .wa-g-stop::after { display: none; }
.wa-g-prev::before { left: 0; top: 0; bottom: 0; width: 2px; }
.wa-g-prev::after { left: 2px; right: 0; top: 0; bottom: 0; clip-path: polygon(0 50%, 50% 0, 50% 50%, 100% 0, 100% 100%, 50% 50%, 50% 100%); }
.wa-g-next::before { right: 0; top: 0; bottom: 0; width: 2px; }
.wa-g-next::after { left: 0; right: 2px; top: 0; bottom: 0; clip-path: polygon(0 0, 50% 50%, 50% 0, 100% 50%, 50% 100%, 50% 50%, 0 100%); }
.wa-g-eject::before { left: 0; right: 0; top: 0; height: 6px; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.wa-g-eject::after { left: 0; right: 0; bottom: 1px; height: 2px; }

.wa-sw {
  position: absolute; top: 130px; height: 24px; padding: 0 8px 0 18px; text-align: left;
  font: bold 9px/22px Tahoma, Verdana, sans-serif; letter-spacing: 0.14em; color: #9c9eb4;
  background: linear-gradient(#484a62, #2a2b3d); border: 1px solid; border-color: var(--wa-raised);
}
.wa-sw::before {
  content: ""; position: absolute; left: 7px; top: 50%; width: 6px; height: 6px; margin-top: -3px;
  background: #16301a; box-shadow: inset 0 0 0 1px #07120a;
}
.wa-sw:active { border-color: var(--wa-sunken); }
.wa-sw[aria-pressed="true"] { color: #e6f5da; }
.wa-sw[aria-pressed="true"]::before { background: #46ff46; box-shadow: 0 0 6px #46ff46; }
.wa-shuffle { left: 238px; width: 80px; }
.wa-repeat { left: 322px; width: 76px; }

/* ------------------------------------------------ playlist editor */
.wa-list {
  position: absolute; left: 10px; right: 10px; top: 27px; bottom: 38px;
  margin: 0; padding: 2px 0; list-style: none; overflow-x: hidden; overflow-y: auto;
  font: 12px/17px Tahoma, Verdana, sans-serif; color: var(--wa-lcd);
  background: #000; border: 1px solid; border-color: var(--wa-sunken);
  scrollbar-width: thin; scrollbar-color: #5b5e78 #101018;
}
.wa-list::-webkit-scrollbar { width: 12px; background: #101018; }
.wa-list::-webkit-scrollbar-thumb { background: linear-gradient(90deg, #5d6079, #3a3c52); border: 1px solid; border-color: var(--wa-raised); }
.wa-row { display: flex; gap: 10px; height: 17px; padding: 0 6px; white-space: nowrap; cursor: default; }
.wa-row-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.wa-row-d { flex: none; font-variant-numeric: tabular-nums; }
.wa-row.wa-cur { color: #fff; }
.wa-row[aria-selected="true"] { background: #1a2fb0; }
.wa-row.wa-na { color: #2e6030; text-decoration: line-through; }
.wa-flash .wa-list { animation: wa-flash 0.9s steps(1, end); }

.wa-plfoot { position: absolute; left: 10px; right: 10px; bottom: 8px; height: 22px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wa-pltag {
  height: 20px; padding: 0 9px; white-space: nowrap;
  font: bold 9px/18px Tahoma, Verdana, sans-serif; letter-spacing: 0.16em; text-transform: uppercase; color: #efe7c6;
  background: linear-gradient(#484a62, #2a2b3d); border: 1px solid; border-color: var(--wa-raised);
}
.wa-pltime {
  height: 20px; padding: 0 8px; white-space: nowrap;
  font: bold 12px/18px "Courier New", Courier, monospace; color: var(--wa-lcd);
  background: #000; border: 1px solid; border-color: var(--wa-sunken);
}

/* ------------------------------------------------ video window */
/* the viewport stays at least 256 x 208, as YouTube's embed rules ask */
.wa-vscreen {
  position: absolute; left: 7px; right: 7px; top: 26px; bottom: 12px; overflow: hidden;
  background: #000; border: 1px solid; border-color: var(--wa-sunken);
}
.wa-vhost { position: absolute; inset: 0; }
.wa-vcover {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 18px; text-align: center;
  font: bold 12px/1.5 "Courier New", Courier, monospace; letter-spacing: 0.18em; text-transform: uppercase; color: #1bb51b;
  background: radial-gradient(ellipse at 50% 45%, #0b160c, #000 70%);
}
.wa-vcover[hidden] { display: none; }

/* ------------------------------------------------ motion */
@keyframes wa-blink { 50% { opacity: 0; } }
@keyframes wa-pulse { 50% { opacity: 0.3; } }
@keyframes wa-flash {
  0% { box-shadow: 0 0 0 2px var(--wa-gold); }
  25% { box-shadow: none; }
  50% { box-shadow: 0 0 0 2px var(--wa-gold); }
  75% { box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  .wa-paused .wa-digits, .wa-state[data-s="load"], .wa-flash .wa-list { animation: none; }
  .wa-flash .wa-list { box-shadow: 0 0 0 2px var(--wa-gold); }
}
