/* Trình phát nhạc kiểu Winamp đời đầu — Góc Nhỏ 9x */
:root {
  --metal-1: #3b3f52;
  --metal-2: #23252f;
  --edge: #6b7090;
  --lcd-bg: #041a08;
  --lcd: #33ff66;
  --lcd-dim: #148a32;
  --accent: #ffcc33;
  --pink: #ff4fa3;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: #0b1020 radial-gradient(#ffffff22 1px, transparent 1.5px) 0 0 / 22px 22px;
  font: 12px Tahoma, Verdana, Arial, sans-serif;
  color: #dfe3f5;
  display: flex; justify-content: center; align-items: flex-start;
  padding: 10px;
}
.win {
  width: 100%; max-width: 460px;
  background: linear-gradient(180deg, var(--metal-1), var(--metal-2));
  border: 2px solid; border-color: #8a8fb0 #15161d #15161d #8a8fb0;
  box-shadow: 0 0 0 1px #000, 0 10px 30px rgba(0, 0, 0, .6);
  padding: 0 8px 8px;
}

/* ---- thanh tiêu đề ---- */
.titlebar {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 -8px 8px; padding: 3px 6px;
  background: repeating-linear-gradient(0deg, #2b6bd6 0 2px, #1d4fa8 2px 4px);
  border-bottom: 1px solid #000;
}
.tb-title { font: bold 11px Verdana, sans-serif; letter-spacing: 2px; color: #fff; text-shadow: 1px 1px 0 #000; }
.tb-btns button {
  width: 18px; height: 16px; margin-left: 3px; padding: 0; line-height: 12px;
  font: bold 12px Tahoma, sans-serif; color: #000; cursor: pointer;
  background: linear-gradient(180deg, #eee, #aaa); border: 1px solid; border-color: #fff #555 #555 #fff;
}
.tb-btns button:active { border-color: #555 #fff #fff #555; }

/* ---- màn hình video ---- */
.screen { border: 2px solid; border-color: #15161d #8a8fb0 #8a8fb0 #15161d; background: #000; }
.yt { position: relative; aspect-ratio: 16 / 9; }
.yt > div, .yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.yt-note { display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px; color: var(--accent); }

/* ---- màn hình LCD ---- */
.lcd {
  margin-top: 8px; padding: 6px 8px 4px;
  background: var(--lcd-bg); color: var(--lcd);
  border: 2px solid; border-color: #15161d #8a8fb0 #8a8fb0 #15161d;
  font-family: "Courier New", monospace; text-shadow: 0 0 4px #33ff6688;
}
.lcd-row { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.lcd-row.small { font-size: 11px; color: var(--lcd-dim); justify-content: space-between; margin-top: 3px; }
.lcd-no { font-size: 20px; font-weight: bold; flex: none; }
.lcd-title { flex: 1; min-width: 0; overflow: hidden; font-size: 13px; }
.lcd-title span { display: inline-block; padding-left: 100%; animation: marquee 16s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }
#lcdState { color: var(--accent); font-weight: bold; }
.viz { display: flex; gap: 2px; align-items: flex-end; height: 26px; margin-top: 5px; }
.viz i {
  flex: 1; height: 2px; transition: height .12s;
  background: linear-gradient(0deg, #33ff66 0 50%, #ffee33 50% 80%, #ff3333 80%);
}

/* ---- nút điều khiển ---- */
.ctrls { display: flex; gap: 4px; margin-top: 8px; }
.ctrls button {
  flex: 1; height: 30px; cursor: pointer; font-size: 14px; color: #111;
  background: linear-gradient(180deg, #f2f2f2, #a9abb8); border: 2px solid; border-color: #fff #555 #555 #fff;
}
.ctrls button.big { flex: 1.4; }
.ctrls button:active, .ctrls button.on { border-color: #555 #fff #fff #555; background: linear-gradient(180deg, #9cc4ff, #e8f1ff); }
.vol { display: flex; align-items: center; gap: 8px; margin-top: 6px; font: bold 10px Verdana, sans-serif; color: var(--accent); }
.vol input { flex: 1; accent-color: var(--pink); }
.vol span:last-child { width: 24px; text-align: right; }

/* ---- danh sách bài ---- */
.pl-head {
  display: flex; justify-content: space-between; margin-top: 10px; padding: 2px 6px;
  font: bold 10px Verdana, sans-serif; letter-spacing: 1px; color: #fff;
  background: repeating-linear-gradient(0deg, #2b6bd6 0 2px, #1d4fa8 2px 4px);
}
.search {
  width: 100%; margin-top: 4px; padding: 3px 6px; font: 12px Tahoma, sans-serif;
  background: #0a0c14; color: var(--lcd); border: 2px solid; border-color: #15161d #8a8fb0 #8a8fb0 #15161d;
}
.search::placeholder { color: var(--lcd-dim); }
.plist {
  /* danh sách co giãn theo chiều cao cửa sổ để vừa khít popup */
  margin-top: 4px; height: clamp(170px, calc(100vh - 590px), 640px); overflow-y: auto; position: relative;
  background: #000; border: 2px solid; border-color: #15161d #8a8fb0 #8a8fb0 #15161d;
  font: 11px Tahoma, sans-serif;
}
.plist .row { display: flex; gap: 6px; align-items: center; padding: 3px 6px; cursor: pointer; color: var(--lcd); }
.plist .row:nth-child(even) { background: #050d06; }
.plist .row:hover { background: #12301a; }
.plist .row.on { background: #1d4fa8; color: #fff; }
.plist .no { width: 26px; text-align: right; color: var(--lcd-dim); flex: none; }
.plist .row.on .no { color: #cfe0ff; }
.plist img { width: 40px; height: 30px; object-fit: cover; flex: none; border: 1px solid #333; background: #111; }
.plist .t { min-width: 0; }
.plist .t b { font-size: 13px; line-height: 1.3; font-weight: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.plist .t small { display: block; color: #6c8; }
.plist .row.on .t small { color: #cfe0ff; }
.plist .empty { padding: 20px; text-align: center; color: var(--lcd-dim); }

/* ---- chân ---- */
.foot { margin-top: 8px; text-align: center; font-size: 11px; color: #aab; line-height: 1.6; }
.foot a { color: var(--accent); }
.blink { color: var(--pink); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
