/* ============ SPECTRA·SONIC SB-88 PRO — Boombox 拟物样式 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 46px 16px 60px;
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #ddd;
  background: radial-gradient(1200px 620px at 50% -10%, #2b2e35 0%, #17181c 55%, #0b0c0f 100%);
  overflow-x: hidden;
}
.scene { position: relative; width: min(1180px, 96vw); }
.scene::after { /* 地面投影 */
  content: ''; position: absolute; left: 6%; right: 6%; bottom: -28px; height: 52px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(0,0,0,.8), transparent 72%);
  filter: blur(7px); z-index: 0;
}

/* ============ 机箱 ============ */
.boombox {
  position: relative; z-index: 1;
  border-radius: 22px;
  padding-bottom: 14px;
  border: 1px solid #000;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.022) 0 2px, transparent 2px 5px),
    linear-gradient(180deg, #34353b 0%, #26272c 32%, #1b1c20 100%);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.15),
    inset 0 -10px 20px rgba(0,0,0,.55),
    0 26px 55px rgba(0,0,0,.65);
}
.handle {
  position: absolute; top: -28px; left: 50%; transform: translateX(-50%);
  width: 44%; height: 36px;
  border-radius: 22px 22px 0 0;
  border: 1px solid #000; border-bottom: none;
  background: linear-gradient(#3b3c42, #232428);
  box-shadow: inset 0 3px 5px rgba(255,255,255,.14);
}
.brand-plate {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px 8px;
}
.brand-block { display: flex; flex-direction: column; gap: 1px; }
.brand {
  font: 800 17px/1 'Segoe UI'; letter-spacing: 5px;
  color: #e8c56b;
  text-shadow: 0 1px 2px #000, 0 0 14px rgba(232,197,107,.35);
}
.brand-sub { font: 600 8px/1.4 'Segoe UI'; letter-spacing: 2.5px; color: #7c8089; }
.model {
  font: 11px Consolas, monospace; letter-spacing: 3px; color: #9296a0;
  border: 1px solid #3b3e45; border-radius: 4px; padding: 4px 9px;
  background: linear-gradient(#272930, #1a1b20);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

/* ============ 机箱三栏布局 ============ */
.chassis {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  padding: 6px 16px 4px;
  align-items: stretch;
}
.center { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

/* 扬声器 */
.speaker {
  width: 190px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid #000; border-radius: 12px;
  background: radial-gradient(circle at 50% 38%, #1d1e24, #101116 72%);
  box-shadow: inset 0 2px 10px rgba(0,0,0,.85), inset 0 -2px 0 rgba(255,255,255,.05);
}
.speaker svg { width: 172px; height: 172px; display: block; }
.boombox.playing .speaker svg { animation: vibe .55s ease-in-out infinite; }
@keyframes vibe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.014); } }

/* ============ 荧光屏窗口 ============ */
.windows {
  display: grid; gap: 12px;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: 'list list' 'meta spec';
}
.win-list { grid-area: list; }
.win-meta { grid-area: meta; height: 176px; }
.win-spec { grid-area: spec; height: 176px; }
.window {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  border-radius: 10px;
  border: 6px solid;
  border-color: #4c4d55 #101114 #0a0a0c #35363d;
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), transparent 32%),
    linear-gradient(180deg, #0b130c, #0e1a10);
  box-shadow:
    inset 0 0 28px rgba(0,0,0,.9),
    inset 0 0 4px #000,
    0 1px 0 rgba(255,255,255,.07);
}
.window::after { /* 扫描线 */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.26) 0 1px, transparent 1px 3px);
}
.win-title {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 5px 10px;
  font: 600 11px Consolas, monospace; letter-spacing: 2.5px;
  color: #8fe89a;
  text-shadow: 0 0 8px rgba(120,255,140,.5);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.01));
  border-bottom: 1px solid rgba(140,255,150,.16);
}
.status { color: #ffd97a; text-shadow: 0 0 8px rgba(255,217,122,.5); }

/* 音轨列表 */
.tracklist {
  list-style: none;
  height: 148px; overflow-y: auto;
  padding: 4px 0;
  font: 13px Consolas, monospace;
}
.tracklist li {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 12px;
  color: #9fdca8; cursor: pointer; user-select: none;
}
.tracklist li:hover { background: rgba(120,255,140,.08); }
.tracklist li.active {
  background: linear-gradient(90deg, rgba(120,255,140,.24), rgba(120,255,140,.05));
  color: #dcffe5;
}
.tracklist li.active .no { color: #5cff7f; text-shadow: 0 0 8px rgba(92,255,127,.8); }
.tracklist li .no { width: 24px; flex: none; color: #5f9c6a; }
.tracklist li .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tracklist li .du { flex: none; color: #5f9c6a; }
.tracklist li.empty { justify-content: center; color: #4f7a58; cursor: default; }
.tracklist::-webkit-scrollbar { width: 8px; }
.tracklist::-webkit-scrollbar-thumb { background: rgba(120,255,140,.28); border-radius: 4px; }
.tracklist::-webkit-scrollbar-track { background: transparent; }
.add-btn {
  cursor: pointer; user-select: none;
  font: 600 10px Consolas, monospace; letter-spacing: 1px;
  color: #ffd97a;
  border: 1px solid rgba(255,217,122,.4); border-radius: 4px; padding: 2px 9px;
  background: linear-gradient(180deg, rgba(255,217,122,.18), rgba(255,217,122,.05));
}
.add-btn:hover { background: rgba(255,217,122,.28); }

/* 元数据窗口 */
.meta-body {
  flex: 1; min-height: 0;
  display: flex; gap: 10px;
  padding: 8px 10px;
}
#m-cover {
  flex: none;
  width: 74px; height: 74px;
  object-fit: cover;
  border: 2px solid rgba(140,255,150,.28); border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,.65);
}
.meta-fields {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; justify-content: center; gap: 3px;
  font: 10.5px Consolas, monospace;
}
.mrow { display: flex; gap: 8px; line-height: 1.25; }
.mrow b { flex: none; width: 48px; color: #4f8a5c; font-weight: 600; letter-spacing: 1px; }
.mrow span {
  color: #c9f5d1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 频谱窗口 */
#specCanvas { flex: 1; width: 100%; min-height: 0; display: block; }
.spec-btns { display: flex; gap: 4px; }
.spec-btns button {
  font: 600 9px Consolas, monospace; letter-spacing: 1px;
  color: #8fe89a;
  background: transparent;
  border: 1px solid rgba(140,255,150,.3); border-radius: 3px;
  padding: 2px 9px; cursor: pointer;
}
.spec-btns button:hover { background: rgba(140,255,150,.12); }
.spec-btns button.on {
  background: rgba(140,255,150,.22);
  color: #e4ffee;
  box-shadow: inset 0 0 8px rgba(140,255,150,.35);
}

/* ============ 控制面板 ============ */
.control-panel {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 14px 20px;
  border-radius: 12px;
  border: 1px solid #000;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, #2b2c32, #191a1e);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.1),
    inset 0 -4px 10px rgba(0,0,0,.5);
}

/* 拟物按钮 */
.btn {
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  border: 1px solid #3c3d44;
  background: linear-gradient(180deg, #f2f2f5 0%, #d4d4da 42%, #a6a6ae 100%);
  box-shadow:
    0 5px 0 #48494f,
    0 8px 10px rgba(0,0,0,.55),
    inset 0 1px 0 rgba(255,255,255,.9),
    inset 0 -2px 3px rgba(0,0,0,.18);
  transition: transform .05s, box-shadow .05s, filter .15s;
}
.btn:hover { filter: brightness(1.07); }
.btn:active {
  transform: translateY(4px);
  box-shadow:
    0 1px 0 #48494f,
    0 2px 4px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(255,255,255,.8);
}
.btn:focus-visible { outline: 2px solid #ffd97a; outline-offset: 2px; }
.btn svg { display: block; filter: drop-shadow(0 1px 0 rgba(255,255,255,.45)); }
.btn-sq { width: 54px; height: 46px; border-radius: 8px; }
.transport { display: flex; align-items: center; gap: 14px; }
.btn-round {
  width: 72px; height: 72px; border-radius: 50%;
  box-shadow:
    0 0 0 4px #c9973f,
    0 0 0 5.5px #57401a,
    0 6px 0 #48494f,
    0 9px 13px rgba(0,0,0,.6),
    inset 0 2px 0 rgba(255,255,255,.9),
    inset 0 -3px 6px rgba(0,0,0,.2);
}
.btn-round:active {
  box-shadow:
    0 0 0 4px #c9973f,
    0 0 0 5.5px #57401a,
    0 2px 0 #48494f,
    0 3px 5px rgba(0,0,0,.5),
    inset 0 2px 0 rgba(255,255,255,.8);
}

/* 电源指示灯 */
.power { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.led {
  width: 13px; height: 13px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #7a2626, #3c0d0d);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.8), 0 0 0 2px #13141a;
}
.led.on {
  background: radial-gradient(circle at 35% 30%, #b8ffb2, #2fae4a 60%, #145c28);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.35), 0 0 0 2px #13141a, 0 0 14px rgba(80,255,120,.85);
}
.power small { font: 9px Consolas, monospace; letter-spacing: 2px; color: #8f939c; }

/* 音量旋钮 */
.vol-group { display: flex; flex-direction: column; align-items: center; gap: 2px; }
#knob { cursor: ns-resize; touch-action: none; user-select: none; -webkit-user-select: none; }
#knob:focus-visible { outline: 2px solid #ffd97a; outline-offset: 3px; border-radius: 50%; }
.vol-label { font: 600 9px 'Segoe UI'; letter-spacing: 3.5px; color: #8f939c; }
.vol-val {
  font: 700 13px Consolas, monospace;
  color: #ffd97a;
  text-shadow: 0 0 8px rgba(255,217,122,.55);
}

/* ============ 响应式 ============ */
@media (max-width: 1000px) {
  .chassis { grid-template-columns: 1fr; }
  .center { order: 1; }
  .speaker { order: 2; width: 100%; }
  .speaker svg { width: 110px; height: 110px; }
  .windows { grid-template-columns: 1fr; grid-template-areas: 'list' 'meta' 'spec'; }
  .control-panel { flex-wrap: wrap; justify-content: center; row-gap: 14px; }
}