/* 全局强隐藏规则，防止 display: flex/grid 覆盖 hidden 属性 */
[hidden] { display: none !important; }

/* ============================================================
   RADIO · 现代极简设计系统
   Inspired by Dieter Rams & Teenage Engineering
   ============================================================ */

:root {
  --bg-deep: #070709;
  --bg-subtle: #0f0f13;
  --surface: #14141a;
  --surface-active: #1c1c24;
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-light: rgba(255, 255, 255, 0.14);
  
  --text-pure: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.72);
  --text-dim: rgba(255, 255, 255, 0.36);
  --text-faint: rgba(255, 255, 255, 0.2);

  --amber: #ff9800;
  --amber-light: #ffb74d;
  --amber-glow: rgba(255, 152, 0, 0.38);
  --amber-bg: rgba(255, 152, 0, 0.12);

  --emerald: #10b981;
  --emerald-bg: rgba(16, 185, 129, 0.15);
  --rose: #f43f5e;

  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);

  --spring-ease: cubic-bezier(0.2, 0.85, 0.25, 1);
  --smooth-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* 基础重置 */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-deep);
  color: var(--text-pure);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  overscroll-behavior: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
}

input {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
}

/* 视口外壳 */
#shell {
  position: relative;
  width: 100vw;
  max-width: 500px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(255, 152, 0, 0.08), transparent 60%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(30, 41, 59, 0.25), transparent 70%),
    var(--bg-deep);
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.8);
}

#app {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  z-index: 1;
}

/* 顶栏 */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(14px + var(--sat)) 22px 10px;
  position: relative;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  transition: all 0.3s var(--smooth-ease);
}

.card.playing ~ * .live-pill,
#app:has(.card.playing) .live-pill {
  background: var(--amber-bg);
  color: var(--amber-light);
  box-shadow: 0 0 14px var(--amber-glow);
}

.brand-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.36em;
  color: var(--text-muted);
}

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

.icon-btn:active {
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-pure);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--amber);
  color: #000;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* 调频主舞台 */
#stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  touch-action: pan-y;
  cursor: grab;
  overflow: hidden;
}

#stage:active {
  cursor: grabbing;
}

/* 明确的左右切台按钮；不再用覆盖整屏的透明热区 */
.nav-cue {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  background: rgba(20, 20, 26, 0.54);
  color: var(--text-dim);
  opacity: 0.7;
  transition: opacity 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.2s var(--spring-ease);
  z-index: 7;
}
.nav-cue svg { width: 20px; height: 20px; }
.nav-cue-left { left: 8px; }
.nav-cue-right { right: 8px; }
.nav-cue:active {
  color: var(--amber-light);
  background: var(--amber-bg);
  opacity: 1;
  transform: translateY(-50%) scale(0.92);
}
.nav-cue:focus-visible,
.playback-bar:focus-visible {
  outline: 2px solid var(--amber-light);
  outline-offset: 3px;
}

/* 主电台卡片 */
.card {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform: translate3d(0, 0, 0);
  transition: transform 0.36s var(--spring-ease), opacity 0.3s ease;
  will-change: transform, opacity;
  z-index: 6;
  pointer-events: auto;
}

.card.dragging {
  transition: none;
}

/* 索引与频道号 */
.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 8px;
  margin-bottom: 22px;
}

.index-badge {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.index-badge .slash {
  margin: 0 4px;
  opacity: 0.4;
}

.freq-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--amber-light);
  border: 1px solid rgba(255, 152, 0, 0.2);
}

/* 精密触控圆盘 (Dial) */
.dial-wrapper {
  margin: 6px 0 28px;
  position: relative;
}

.dial {
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s var(--spring-ease);
}

.dial:active {
  transform: scale(0.93);
}

.dial-glow {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--amber-glow) 0%, transparent 68%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.card.playing .dial-glow {
  opacity: 1;
  animation: pulse-glow 3s infinite ease-in-out;
}

.dial-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border-light);
  background: linear-gradient(145deg, #181822, #0d0d12);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.12),
    0 12px 28px rgba(0, 0, 0, 0.6);
  transition: border-color 0.3s ease;
}

.card.playing .dial-ring {
  border-color: rgba(255, 152, 0, 0.55);
}

/* 加载时旋转微光环 */
.card.loading .dial-ring::after,
.card.retry .dial-ring::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--amber);
  border-right-color: var(--amber-light);
  animation: spin 0.85s linear infinite;
}

.dial-core {
  position: relative;
  z-index: 2;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #111117;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-pure);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
  transition: color 0.25s ease;
}

.card.playing .dial-core {
  color: var(--amber-light);
}

.dial-core svg {
  width: 26px;
  height: 26px;
  transition: transform 0.2s ease;
}

.dial-core .ic-play {
  transform: translateX(2px);
}

.dial-core .ic-pause {
  display: none;
}

.card.playing .ic-play {
  display: none;
}

.card.playing .ic-pause {
  display: block;
}

/* 电台信息排版 */
.station-info {
  width: 100%;
  margin-bottom: 24px;
}

.st-name {
  font-size: clamp(26px, 7.8vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.16;
  color: var(--text-pure);
  margin-bottom: 14px;
  word-break: break-word;
}

.tags-cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  font-size: 12px;
  font-weight: 550;
  padding: 5px 13px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.pill-accent {
  background: var(--amber-bg);
  color: var(--amber-light);
  border: 1px solid rgba(255, 152, 0, 0.24);
}

.pill-subtle {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

/* 调频刻度标尺 (Tuning Ruler) */
.ruler-wrapper {
  width: 100%;
  max-width: 320px;
  height: 20px;
  margin-bottom: 22px;
  position: relative;
  display: flex;
  align-items: center;
}

.ruler-track {
  width: 100%;
  height: 6px;
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  overflow: visible;
}

.ruler-lines {
  position: absolute;
  inset: -6px 0;
  background-image: repeating-linear-gradient(
    to right,
    rgba(255, 255, 255, 0.15) 0px,
    rgba(255, 255, 255, 0.15) 1.5px,
    transparent 1.5px,
    transparent 12px
  );
  opacity: 0.6;
}

.ruler-cursor {
  position: absolute;
  top: -8px;
  left: 0%;
  width: 3px;
  height: 22px;
  background: var(--amber);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--amber-glow);
  transform: translateX(-50%);
  transition: left 0.35s var(--smooth-ease);
}

/* 播放状态条与频谱律动 */
.playback-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  transition: transform 0.2s var(--spring-ease), background 0.2s ease, border-color 0.2s ease;
}

.playback-bar:not(:disabled):active {
  transform: scale(0.96);
  background: var(--amber-bg);
  border-color: rgba(255, 152, 0, 0.3);
}

.playback-bar:disabled {
  cursor: default;
}

.eq-visualizer {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 14px;
}

.eq-visualizer .bar {
  width: 2.5px;
  height: 4px;
  border-radius: 2px;
  background: var(--amber);
  opacity: 0.4;
  transition: height 0.2s ease, opacity 0.2s ease;
}

.card.playing .eq-visualizer .bar {
  opacity: 1;
  animation: eq-bounce 1.1s ease-in-out infinite alternate;
}

.card.playing .eq-visualizer .bar:nth-child(1) { animation-delay: 0.05s; animation-duration: 0.8s; }
.card.playing .eq-visualizer .bar:nth-child(2) { animation-delay: 0.25s; animation-duration: 1.2s; }
.card.playing .eq-visualizer .bar:nth-child(3) { animation-delay: 0.10s; animation-duration: 0.9s; }
.card.playing .eq-visualizer .bar:nth-child(4) { animation-delay: 0.35s; animation-duration: 1.1s; }
.card.playing .eq-visualizer .bar:nth-child(5) { animation-delay: 0.15s; animation-duration: 0.7s; }
.card.playing .eq-visualizer .bar:nth-child(6) { animation-delay: 0.30s; animation-duration: 1.0s; }

.card.loading .eq-visualizer .bar,
.card.retry .eq-visualizer .bar {
  animation: eq-pulse 0.9s ease-in-out infinite alternate;
}

.status-label {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.card.playing .status-label {
  color: var(--amber-light);
}

.card.failed .status-label {
  color: var(--rose);
}

/* 底部把手栏 */
.bottom-bar {
  padding: 8px 0 calc(6px + var(--sab));
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 10;
}

.expand-handle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 8px 24px;
  color: var(--text-dim);
  transition: color 0.2s ease;
}

.expand-handle:active {
  color: var(--text-muted);
}

.handle-pill {
  width: 44px;
  height: 4.5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.22);
  transition: background 0.2s ease, width 0.2s ease;
}

.expand-handle:active .handle-pill {
  background: var(--amber);
  width: 50px;
}

.handle-text {
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.3em;
}

/* 抽屉遮罩 (Scrim) */
.scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 6, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s var(--smooth-ease);
  z-index: 40;
}

.scrim.show {
  opacity: 1;
  pointer-events: auto;
}

/* 毛玻璃管理抽屉 (Drawer) */
.drawer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 84%;
  height: 84dvh;
  background: rgba(18, 18, 24, 0.88);
  backdrop-filter: blur(36px) saturate(190%);
  -webkit-backdrop-filter: blur(36px) saturate(190%);
  border-top: 1px solid var(--border-light);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.6);
  z-index: 50;
  display: flex;
  flex-direction: column;
  transform: translate3d(0, 102%, 0);
  transition: transform 0.38s var(--spring-ease);
  touch-action: pan-y;
  will-change: transform;
}

.drawer.open {
  transform: translate3d(0, 0, 0);
}

.drawer.dragging {
  transition: none;
}

.drawer-handle-zone {
  padding: 12px 0 6px;
  cursor: grab;
  display: flex;
  justify-content: center;
}

.grabber-bar {
  width: 48px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.28);
}

.drawer-head {
  padding: 6px 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-pure);
}

.icon-btn-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.icon-btn-close svg { width: 17px; height: 17px; }

/* 搜索框 */
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 10px 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.search-box:focus-within {
  border-color: rgba(255, 152, 0, 0.45);
  background: rgba(255, 255, 255, 0.08);
}

.search-icon {
  width: 18px;
  height: 18px;
  color: var(--text-dim);
  flex-shrink: 0;
}

#searchInput {
  flex: 1;
  background: transparent;
  font-size: 14px;
  color: var(--text-pure);
}

#searchInput::placeholder {
  color: var(--text-dim);
}

.search-clear {
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-clear svg { width: 17px; height: 17px; }

/* 选项卡分段控制 (Nav Tabs) */
.nav-tabs {
  display: flex;
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: 12px;
}

.tab-item {
  flex: 1;
  padding: 8px 0;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  text-align: center;
  transition: all 0.2s ease;
}

.tab-item.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-pure);
}

/* 抽屉列表区 */
.drawer-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 18px calc(24px + var(--sab));
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.station-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 电台行项目 (Row) */
.st-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
  cursor: pointer;
}

.st-row:active {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(0.985);
}

.st-row.current {
  background: rgba(255, 152, 0, 0.08);
  border-color: rgba(255, 152, 0, 0.35);
}

.st-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}



.st-texts {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.st-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-pure);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.st-row.current .st-title {
  color: var(--amber-light);
}

.st-desc {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 行操作按钮 */
.st-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 10px;
}

.row-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  background: transparent;
  transition: all 0.15s ease;
}

.row-btn:active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-pure);
}

.row-btn svg { width: 16px; height: 16px; }

.row-btn.btn-add {
  color: var(--amber);
  background: var(--amber-bg);
}

.row-btn.btn-added {
  color: var(--text-dim);
}

.row-btn.btn-remove:hover,
.row-btn.btn-remove:active {
  color: var(--rose);
}

/* 空状态 */
.empty-state {
  padding: 44px 20px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.8;
}

.empty-state small {
  font-size: 12px;
  opacity: 0.8;
}

/* 浮动轻提示 (Toast) */
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + var(--sab));
  transform: translate(-50%, 14px);
  z-index: 70;
  max-width: 86vw;
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(28, 28, 36, 0.94);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 13px;
  font-weight: 550;
  color: var(--text-pure);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s var(--spring-ease);
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* 动效关键帧 */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

@keyframes eq-bounce {
  0% { height: 4px; }
  100% { height: 14px; }
}

@keyframes eq-pulse {
  0% { opacity: 0.3; }
  100% { opacity: 1; }
}

/* 无障碍减弱动画 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}

/* ---------- 品类胶囊横向滚动栏 ---------- */
.category-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.category-scroll::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

.cat-pill:active {
  transform: scale(0.95);
}

.cat-pill.active {
  color: var(--amber-light);
  background: var(--amber-bg);
  border-color: rgba(255, 152, 0, 0.35);
  box-shadow: 0 0 12px var(--amber-glow);
}

/* 在线电台库加载指示器 */
.loading-spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 8px;
}

.empty-state .status-msg {
  font-size: 13px;
  color: var(--text-muted);
}

/* 试听模式与快捷收录按钮 */
.meta-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-pin-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--amber);
  color: #070709;
  border: none;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 0 12px var(--amber-glow);
  transition: transform 0.15s ease, background 0.15s ease;
}

.preview-pin-btn:active {
  transform: scale(0.95);
  background: #ffb74d;
}

.preview-pin-btn svg {
  width: 12px;
  height: 12px;
}

.freq-tag.is-preview {
  background: rgba(245, 166, 35, 0.15);
  color: var(--amber);
  border-color: rgba(245, 166, 35, 0.4);
}

/* 协议标识微标签（方便对比 HTTP 与 HTTPS） */
.proto-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
}

.proto-http {
  background: rgba(255, 171, 0, 0.15);
  color: #ffab00;
  border: 1px solid rgba(255, 171, 0, 0.35);
}

.proto-https {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

/* ============================================================
 * 电台封面与图标视觉系统
 * ============================================================ */

/* 主控圆盘内的电台封面 */
.dial-icon {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  transition: opacity 0.3s ease, filter 0.3s ease, transform 0.5s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.card.paused .dial-icon {
  filter: grayscale(40%) brightness(0.7);
  transform: scale(0.96);
}

.card.playing .dial-icon {
  filter: none;
  transform: scale(1);
}

.dial-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 覆盖在封面之上的精致半透明状态指示微标 */
.dial-cue {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(7, 7, 9, 0.35);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.dial-cue svg {
  width: 28px;
  height: 28px;
  color: var(--amber);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
}

.dial-cue .ic-cue-play { display: block; }
.dial-cue .ic-cue-pause { display: none; }

/* 当有封面且处于暂停状态时，透出柔和的播放三角形提醒点按 */
.has-icon.paused .dial-cue {
  opacity: 1;
}

.has-icon.paused .dial-cue .ic-cue-play {
  display: block;
}

.has-icon.playing .dial-cue {
  opacity: 0;
}

/* 列表行内的微型电台头像 */
.st-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
}

.st-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.st-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

/* ============================================================
 * 修复与重构电台头像层叠布局，彻底解决图标靠左挤压偏位问题
 * ============================================================ */

.st-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
  cursor: pointer;
  gap: 12px;
}

.st-main {
  display: flex;
  align-items: center;
  gap: 13px;
  flex: 1;
  min-width: 0;
}

.st-avatar {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}

.st-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #121216;
}

.st-avatar-fallback {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  user-select: none;
  line-height: 1;
}

.st-avatar-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #15151a;
  border-radius: 10px;
}

/* 正在播放时头像的高级琥珀呼吸指示灯 */
.st-row.current.playing-row .st-avatar {
  border-color: rgba(245, 166, 35, 0.6);
  box-shadow: 0 0 10px rgba(245, 166, 35, 0.25);
}

/* 微型声波均衡器浮层 (Mini Equalizer Overlay) */
.st-avatar-eq {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  padding-bottom: 9px;
  background: rgba(7, 7, 9, 0.72);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 10px;
  z-index: 3;
}

.st-avatar-eq .eq-bar {
  width: 3px;
  height: 3px;
  border-radius: 1.5px;
  background: var(--amber);
  box-shadow: 0 0 6px var(--amber-glow);
  transform-origin: bottom;
}

/* 正在播放：浮现声波浮层，三柱有机律动 */
.st-row.current.playing-row .st-avatar-eq {
  opacity: 1;
}

.st-row.current.playing-row .eq-b1 {
  animation: eq-bounce-1 0.85s infinite ease-in-out;
}

.st-row.current.playing-row .eq-b2 {
  animation: eq-bounce-2 0.7s infinite ease-in-out;
}

.st-row.current.playing-row .eq-b3 {
  animation: eq-bounce-3 0.95s infinite ease-in-out;
}

/* 缓冲调频中：声波做平缓呼吸起伏 */
.st-row.current.loading-row .st-avatar-eq {
  opacity: 1;
}

.st-row.current.loading-row .eq-b1 {
  animation: eq-wave 1.2s infinite ease-in-out alternate;
}

.st-row.current.loading-row .eq-b2 {
  animation: eq-wave 1.2s infinite ease-in-out alternate 0.2s;
}

.st-row.current.loading-row .eq-b3 {
  animation: eq-wave 1.2s infinite ease-in-out alternate 0.4s;
}

@keyframes eq-bounce-1 {
  0%, 100% { height: 4px; }
  35% { height: 16px; }
  65% { height: 7px; }
}

@keyframes eq-bounce-2 {
  0%, 100% { height: 9px; }
  50% { height: 20px; }
  80% { height: 5px; }
}

@keyframes eq-bounce-3 {
  0%, 100% { height: 6px; }
  40% { height: 17px; }
  75% { height: 9px; }
}

@keyframes eq-wave {
  0% { height: 4px; opacity: 0.45; }
  100% { height: 13px; opacity: 1; }
}
