:root {
  --bg-main: #07080D;
  --card-alpha: 0.78;
  --elevated-alpha: 0.72;
  --bg-card: rgba(11, 12, 20, var(--card-alpha));
  --bg-elevated: rgba(20, 22, 36, var(--elevated-alpha));
  --bg-hover: rgba(34, 38, 62, 0.88);
  --border-color: rgba(255, 255, 255, 0.13);
  --text-primary: #F8FAFC;
  --text-secondary: #E2E8F0;
  --text-muted: #94A3B8;
  --accent-green: #10F58A;
  --accent-green-hover: #059669;
  --accent-indigo: #6366F1;
  --accent-gold: #F59E0B;
  --danger: #EF4444;
  --rainbow-chrome: linear-gradient(135deg, #FF2E55 0%, #FF9F1C 20%, #FFEE32 38%, #10F58A 58%, #00BBF9 78%, #D946EF 100%);
  --rainbow-chrome-soft: linear-gradient(90deg, rgba(255, 46, 85, 0.25) 0%, rgba(255, 159, 28, 0.22) 25%, rgba(16, 245, 138, 0.25) 55%, rgba(0, 187, 249, 0.25) 80%, rgba(217, 70, 239, 0.28) 100%);
  --chrome-tube-shadow: inset 0 2px 2px rgba(255, 255, 255, 0.68), inset 0 -3px 5px rgba(0, 0, 0, 0.55), 0 4px 14px rgba(0, 0, 0, 0.45);
  --satin-card-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(0, 0, 0, 0.7), 0 14px 32px rgba(0, 0, 0, 0.65);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
}

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

html, body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Fixed Full-Screen Custom Background Layer (Black Woven Silk Fabric + Daughter's Photo - Zero GPU Blur) */
.custom-bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background-color: #06070B;
  background-image:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.014) 0px,
      rgba(255, 255, 255, 0.014) 1px,
      transparent 1px,
      transparent 4px
    ),
    radial-gradient(ellipse at 22% 18%, rgba(45, 50, 75, 0.42) 0%, transparent 52%),
    radial-gradient(ellipse at 78% 82%, rgba(38, 28, 62, 0.36) 0%, transparent 55%),
    linear-gradient(125deg, #05060A 0%, #121420 28%, #07080D 54%, #151826 78%, #050609 100%);
}

.custom-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.custom-bg-dimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(8, 10, 22, 0.28) 0%,
    rgba(8, 10, 22, 0.42) 55%,
    rgba(8, 10, 22, 0.72) 100%
  );
  opacity: 0.38;
  transition: opacity 150ms ease;
}

/* Chế độ Ngắm Ảnh Nền (Làm siêu trong suốt các khung để ngắm ảnh con gái) */
body.peek-bg-mode {
  --card-alpha: 0.26;
  --elevated-alpha: 0.32;
}

body.peek-bg-mode .custom-bg-dimmer {
  opacity: 0.12 !important;
}

button, input {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  transition: background-color 120ms ease, opacity 120ms ease, border-color 120ms ease;
  touch-action: manipulation;
}

button:active:not(:disabled) {
  opacity: 0.8;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

.icon-sm {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.icon-lg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.icon-xl {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

/* App Shell */
.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1340px;
  margin: 0 auto;
  padding: calc(12px + env(safe-area-inset-top, 0px)) calc(16px + env(safe-area-inset-right, 0px)) calc(32px + env(safe-area-inset-bottom, 0px)) calc(16px + env(safe-area-inset-left, 0px));
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Header */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 16px;
  background-color: var(--bg-card);
  background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.04) 0%, transparent 45%, rgba(0, 0, 0, 0.35) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--satin-card-shadow);
}

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

.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  overflow: hidden;
  background-color: #05060A;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-title {
  font-family: "Righteous", "Poppins", sans-serif;
  font-size: 1.24rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--rainbow-chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.75));
}

.brand-badge {
  font-family: "Poppins", sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: rgba(16, 245, 138, 0.16);
  color: #6EE7B7;
  border: 1px solid rgba(16, 245, 138, 0.5);
  -webkit-text-fill-color: #6EE7B7;
}

.version-badge-pill {
  font-family: "Poppins", sans-serif;
  font-size: 0.64rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(12, 16, 28, 0.9);
  border: 1px solid rgba(34, 211, 238, 0.55);
  color: #E0F2FE;
  -webkit-text-fill-color: #E0F2FE;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 6px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  letter-spacing: 0.01em;
}

.version-badge-pill:hover {
  border-color: #FACC15;
  color: #FEF08A;
  -webkit-text-fill-color: #FEF08A;
}

.app-version-footer {
  display: flex;
  justify-content: center;
  padding: 4px 0 8px;
}

.footer-version-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background-color: rgba(10, 12, 20, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.footer-version-chip:hover {
  border-color: rgba(34, 211, 238, 0.55);
  color: #FFFFFF;
}

.version-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rainbow-chrome);
  box-shadow: 0 0 6px rgba(34, 211, 238, 0.8);
}

.version-refresh-hint {
  color: #38BDF8;
  font-weight: 700;
  padding-left: 6px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.brand-subtitle {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

/* Header & Action Buttons */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 13px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-color);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  font-weight: 500;
}

.btn-ghost:hover,
.btn-ghost.active {
  background-color: var(--bg-hover);
  border-color: var(--accent-green);
}

.btn-settings-highlight {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: var(--rainbow-chrome-soft);
  border: 1px solid rgba(232, 121, 249, 0.6);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  font-size: 0.84rem;
  font-weight: 600;
}

.btn-settings-highlight:hover {
  filter: brightness(1.15);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 13px;
  border-radius: var(--radius-pill);
  background-color: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.5);
  color: #E0E7FF;
  font-size: 0.82rem;
  font-weight: 600;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #10F58A 0%, #00BBF9 55%, #8B5CF6 100%);
  color: #04130C;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--chrome-tube-shadow);
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 15px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-color);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.86rem;
}

.btn-outline:hover {
  background-color: var(--bg-hover);
}

/* Pill-Shaped URL / Search Bar (Black Silk Surface) */
.url-bar-section {
  background-color: var(--bg-card);
  background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.035) 0%, transparent 50%, rgba(0, 0, 0, 0.4) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--satin-card-shadow);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.url-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.pill-search-wrapper {
  flex: 1 1 280px;
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  pointer-events: none;
}

.url-input {
  width: 100%;
  min-height: 44px;
  padding: 0 40px 0 44px;
  border-radius: var(--radius-pill);
  background-color: rgba(5, 6, 12, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.7);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.url-input::placeholder {
  color: var(--text-muted);
}

.btn-clear-input {
  position: absolute;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.url-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.status-banner {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.83rem;
  font-weight: 500;
  background-color: rgba(10, 12, 22, 0.9);
  border-left: 4px solid var(--accent-green);
}

.status-banner.error {
  border-left-color: var(--danger);
  color: #FCA5A5;
}

/* Main 2-Column Grid */
.main-grid {
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 16px;
  align-items: start;
}

/* Left Column: Circular Dial Now Playing Card (Black Silk + Rainbow Chrome Finish) */
.now-playing-card {
  background-color: var(--bg-card);
  background-image:
    radial-gradient(circle at 50% 28%, rgba(99, 102, 241, 0.1) 0%, transparent 60%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.045) 0%, transparent 42%, rgba(0, 0, 0, 0.48) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--satin-card-shadow);
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.np-card-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.quality-pill {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
}

.pill-stream {
  background-color: rgba(6, 78, 59, 0.8);
  color: #6EE7B7;
  border: 1px solid rgba(16, 185, 129, 0.6);
}

.pill-lossless {
  background-color: rgba(120, 53, 15, 0.85);
  color: #FDE68A;
  border: 1px solid var(--accent-gold);
}

.btn-quick-bg {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background-color: rgba(244, 63, 94, 0.2);
  border: 1px solid rgba(251, 113, 133, 0.5);
  color: #FFE4E6;
  font-size: 0.74rem;
  font-weight: 600;
}

.btn-quick-bg:hover {
  background-color: rgba(244, 63, 94, 0.35);
}

/* Circular Vinyl / Dial Stage with -10s / +10s */
.dial-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 2px 0;
}

.btn-seek-side {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-seek-side:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--accent-green);
}

.circular-dial-wrapper {
  position: relative;
  width: 196px;
  height: 196px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dial-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  pointer-events: none;
}

.dial-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.09);
  stroke-width: 7;
}

.dial-ring-buffer {
  fill: none;
  stroke: url(#goldChromeRing);
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dashoffset 200ms linear;
}

.dial-ring-play {
  fill: none;
  stroke: url(#rainbowChromeRing);
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dashoffset 150ms linear;
}

.artwork-disc {
  position: relative;
  width: 164px;
  height: 164px;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at center, #141628 0%, #05060B 100%);
  border: 2px solid rgba(255, 255, 255, 0.24);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.75), inset 0 1px 2px rgba(255, 255, 255, 0.35);
}

.np-artwork {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.np-fallback-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.disc-center-hole {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: rgba(13, 14, 29, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.np-artwork.hidden ~ .disc-center-hole {
  display: none;
}

/* Playback Speed Selector Pills (Reference #1) */
.speed-pills-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.speed-pill {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background-color: rgba(8, 10, 18, 0.72);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 600;
}

.speed-pill.active {
  background: var(--rainbow-chrome-soft);
  border-color: rgba(16, 245, 138, 0.65);
  color: #FFFFFF;
}

/* Centered Song Title & Artist */
.np-meta {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 4px;
}

.np-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75);
}

.np-artist {
  font-size: 0.84rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Explicit Buffer CTA on Now Playing Card */
.explicit-buffer-cta {
  display: flex;
  justify-content: center;
}

.btn-load-buffer-hero {
  width: 100%;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--rainbow-chrome);
  color: #05070E;
  font-size: 0.86rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--chrome-tube-shadow);
}

.btn-load-buffer-hero:hover {
  filter: brightness(1.08);
}

/* Compact Signal Strip */
.signal-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  background-color: rgba(6, 7, 13, 0.76);
  border: 1px solid var(--border-color);
  font-size: 0.74rem;
  font-weight: 600;
}

.sig-sep {
  color: var(--text-muted);
}

.text-accent {
  color: var(--accent-green);
}

.text-gold {
  color: var(--accent-gold);
}

/* Buffer Pre-Loading & 50% Gate Panel */
.buffer-panel {
  background-color: rgba(6, 7, 13, 0.78);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.buffer-panel.buffering-active {
  border-color: var(--accent-gold);
}

.buffer-panel.buffer-ready {
  border-color: rgba(16, 245, 138, 0.65);
}

.buffer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.76rem;
}

.buffer-status-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.buffer-status-text {
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.buffer-percent-badge {
  font-family: monospace;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--accent-gold);
  background-color: rgba(20, 22, 38, 0.9);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}

.buffer-panel.buffer-ready .buffer-percent-badge {
  color: var(--accent-green);
}

.buffer-bar-track {
  position: relative;
  width: 100%;
  height: 9px;
  background-color: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8);
  overflow: visible;
}

.buffer-bar-fill {
  height: 100%;
  background: var(--rainbow-chrome);
  border-radius: var(--radius-pill);
  box-shadow: inset 0 2px 1px rgba(255, 255, 255, 0.65);
  transition: width 160ms linear;
}

.buffer-target-marker {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background-color: #F8FAFC;
  z-index: 2;
  pointer-events: none;
}

.buffer-target-marker span {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-primary);
  background-color: var(--accent-indigo);
  padding: 0 4px;
  border-radius: 4px;
  line-height: 1.25;
}

.buffer-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.buffer-chip {
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background-color: rgba(20, 22, 38, 0.75);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.buffer-chip.active {
  border-color: rgba(99, 102, 241, 0.7);
  color: var(--text-primary);
}

.buffer-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(245, 158, 11, 0.3);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spinRing 0.75s linear infinite;
  flex-shrink: 0;
}

/* Progress Scrub Bar */
.progress-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.seek-slider,
.volume-slider {
  width: 100%;
  height: 5px;
  accent-color: #00BBF9;
  cursor: pointer;
}

.time-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

/* Pill-Shaped Transport Control Bar (Black Silk Capsule) */
.transport-pill-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background-color: rgba(6, 7, 13, 0.8);
  border: 1px solid var(--border-color);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 6px 16px rgba(0, 0, 0, 0.5);
}

.btn-icon {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background-color: transparent;
  border: 1px solid transparent;
}

.btn-icon:hover {
  color: var(--text-primary);
  background-color: var(--bg-elevated);
}

.btn-icon.active {
  color: var(--accent-green);
  border-color: rgba(16, 245, 138, 0.5);
  background-color: rgba(16, 245, 138, 0.14);
}

.repeat-one-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  font-size: 0.6rem;
  font-weight: 800;
  background-color: var(--accent-green);
  color: #052E16;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-play-main {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--rainbow-chrome);
  color: #05070E;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 3px 4px rgba(255, 255, 255, 0.75), inset 0 -4px 6px rgba(0, 0, 0, 0.55), 0 6px 18px rgba(0, 187, 249, 0.35);
}

.btn-play-main:hover {
  filter: brightness(1.08);
}

.btn-play-main:disabled {
  opacity: 0.7;
  cursor: wait;
  background: var(--accent-gold);
}

.btn-play-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(15, 15, 35, 0.3);
  border-top-color: #0F0F23;
  border-radius: 50%;
  animation: spinRing 0.75s linear infinite;
  display: inline-block;
}

.volume-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background-color: var(--bg-elevated);
}

.btn-icon-sm:hover {
  color: var(--text-primary);
  background-color: var(--bg-hover);
}

.volume-label {
  font-size: 0.76rem;
  width: 38px;
  text-align: right;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

/* Right Column: Black Silk Library Sheet & Pill Track Rows */
.library-panel {
  background-color: var(--bg-card);
  background-image: linear-gradient(155deg, rgba(255, 255, 255, 0.04) 0%, transparent 45%, rgba(0, 0, 0, 0.45) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--satin-card-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 540px;
}

.tab-nav {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background-color: rgba(5, 6, 12, 0.65);
  overflow-x: auto;
  padding: 0 8px;
}

.tab-btn {
  flex: 1 1 auto;
  min-height: 46px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: #FFFFFF;
  border-bottom: 3px solid transparent;
  border-image: var(--rainbow-chrome) 1;
  text-shadow: 0 2px 8px rgba(34, 211, 238, 0.45);
}

.tab-panel {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-box {
  flex: 1 1 200px;
}

.filter-input {
  width: 100%;
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background-color: rgba(8, 10, 18, 0.72);
  border: 1px solid var(--border-color);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.7);
  font-size: 0.84rem;
}

.toolbar-actions {
  display: flex;
  gap: 6px;
}

.btn-small-primary {
  min-height: 38px;
  padding: 0 13px;
  border-radius: var(--radius-pill);
  background: var(--rainbow-chrome-btn);
  box-shadow: var(--chrome-tube-shadow);
  border: none;
  color: #FFFFFF;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-small-outline {
  min-height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-small-danger {
  min-height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background-color: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #FCA5A5;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Numbered Pill-Shaped Track Rows (Exact Match to Reference #5 + Black Silk Chrome) */
.track-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 2px;
}

.track-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.track-index {
  width: 24px;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.track-item.playing .track-index {
  background: var(--rainbow-chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.track-pill-body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  background-color: rgba(12, 14, 24, 0.82);
  border: 1px solid var(--border-color);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 4px 10px rgba(0, 0, 0, 0.5);
  transition: background-color 120ms ease, border-color 120ms ease;
}

.track-item:hover .track-pill-body {
  background-color: rgba(24, 28, 48, 0.92);
  border-color: rgba(34, 211, 238, 0.45);
}

.track-item.playing .track-pill-body {
  background:
    linear-gradient(rgba(12, 16, 28, 0.92), rgba(12, 16, 28, 0.92)) padding-box,
    var(--rainbow-chrome) border-box;
  border: 1.5px solid transparent;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 6px 16px rgba(34, 211, 238, 0.22);
}

.track-info {
  min-width: 0;
  flex: 1;
}

.track-title {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-sub {
  font-size: 0.74rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-lossless {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background-color: rgba(245, 158, 11, 0.22);
  color: #FDE68A;
  border: 1px solid rgba(245, 158, 11, 0.5);
}

.badge-stream {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background-color: rgba(99, 102, 241, 0.22);
  color: #C7D2FE;
}

.track-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.results-header-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 260px;
}

.results-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.results-header-info strong {
  font-size: 0.92rem;
  color: #86EFAC;
}

.select-all-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background-color: rgba(30, 33, 66, 0.75);
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
}

.select-all-label:hover {
  border-color: var(--accent-green);
}

.track-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-green);
  cursor: pointer;
  flex-shrink: 0;
}

.selection-count-badge {
  font-size: 0.73rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background-color: rgba(34, 197, 94, 0.22);
  border: 1px solid var(--accent-green);
  color: #86EFAC;
}

/* Smart 3-Step Workflow Guide Bar */
.workflow-steps-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-lg);
  background-color: rgba(8, 10, 18, 0.75);
  border: 1px solid var(--border-color);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.wf-step {
  flex: 1 1 180px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  background-color: rgba(18, 22, 38, 0.78);
  border: 1px solid transparent;
  text-align: left;
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.wf-step:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

.wf-step.active {
  background:
    linear-gradient(rgba(14, 18, 32, 0.92), rgba(14, 18, 32, 0.92)) padding-box,
    var(--rainbow-chrome) border-box;
  border: 1.5px solid transparent;
  color: var(--text-primary);
  box-shadow: 0 4px 12px rgba(34, 211, 238, 0.2);
}

.wf-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: rgba(99, 102, 241, 0.35);
  color: #E0E7FF;
  font-weight: 700;
  font-size: 0.74rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wf-step.active .wf-num {
  background: var(--rainbow-chrome);
  color: #FFFFFF;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.wf-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.wf-text small {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.wf-arrow {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.85rem;
}

.toolbar-hint-sm {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

/* Queue Smart Toolbar & Anti-Chaos Rules Bar */
.queue-smart-toolbar {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.queue-top-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.queue-smart-rules-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.smart-rule-pill {
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background-color: rgba(30, 33, 66, 0.7);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.74rem;
}

.smart-rule-pill.active {
  border-color: rgba(34, 197, 94, 0.55);
  color: var(--text-primary);
}

.smart-rule-pill strong {
  color: #86EFAC;
}

.queue-ram-stats {
  font-size: 0.74rem;
  font-weight: 700;
  color: #FDE68A;
  background-color: rgba(120, 53, 15, 0.5);
  border: 1px solid rgba(245, 158, 11, 0.45);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.btn-small-amber {
  min-height: 36px;
  padding: 0 13px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 700;
}

/* Action Chips inside Track Rows (Staging Results & Playlist Now) */
.btn-row-buffer {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--rainbow-chrome-btn);
  box-shadow: var(--chrome-tube-shadow);
  color: #FFFFFF;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.btn-row-buffer.ready {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  box-shadow: var(--chrome-tube-shadow);
  color: #FFFFFF;
}

.btn-row-buffer.loading {
  background: rgba(245, 158, 11, 0.25);
  border: 1px solid var(--accent-gold);
  color: #FDE68A;
}

.btn-row-buffer.error {
  background: rgba(239, 68, 68, 0.25);
  border: 1px solid var(--danger);
  color: #FCA5A5;
}

.btn-row-prebuffer {
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background-color: rgba(14, 165, 233, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.55);
  color: #BAE6FD;
  font-size: 0.73rem;
  font-weight: 600;
  white-space: nowrap;
}

.btn-row-prebuffer:hover {
  background-color: rgba(14, 165, 233, 0.35);
}

.btn-row-prebuffer.loading {
  background-color: rgba(245, 158, 11, 0.25);
  border-color: var(--accent-gold);
  color: #FDE68A;
}

.btn-row-add-now {
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background-color: rgba(99, 102, 241, 0.22);
  border: 1px solid rgba(99, 102, 241, 0.55);
  color: #E0E7FF;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}

.btn-row-add-now:hover {
  background-color: rgba(99, 102, 241, 0.38);
}

.btn-row-add-now.already-added {
  background-color: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.65);
  color: #86EFAC;
}

.btn-row-add-pl {
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background-color: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #FDE68A;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}

.btn-row-add-pl:hover {
  background-color: rgba(245, 158, 11, 0.32);
}

.btn-move-track {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-secondary);
  font-size: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-move-track:hover {
  background-color: rgba(99, 102, 241, 0.3);
  color: #FFFFFF;
}

/* Inline Custom Playlist Detail Drawer */
.playlist-detail-drawer {
  background-color: rgba(11, 13, 28, 0.78);
  border: 1px solid rgba(99, 102, 241, 0.55);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.pl-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.pl-detail-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pl-detail-name {
  font-size: 0.96rem;
  font-weight: 700;
  color: #E0E7FF;
}

.pl-detail-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.pl-detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.track-item.has-error .track-pill-body {
  border-color: rgba(239, 68, 68, 0.65);
  background-color: rgba(69, 10, 10, 0.45);
}

/* Quick Playlist Picker Modal */
.quick-pl-picker-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.quick-pl-option {
  width: 100%;
  padding: 9px 14px;
  border-radius: var(--radius-md);
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: left;
}

.quick-pl-option:hover {
  background-color: var(--bg-hover);
  border-color: var(--accent-green);
}

.new-pl-form-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.track-duration {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.1);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-variant-numeric: tabular-nums;
}

.btn-remove-track {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.btn-remove-track:hover {
  background-color: rgba(239, 68, 68, 0.25);
  color: #FCA5A5;
}

/* Saved Playlists Grid */
.playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}

.playlist-card {
  background-color: rgba(14, 17, 36, 0.66);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.playlist-card-title {
  font-size: 0.95rem;
  font-weight: 700;
}

.playlist-card-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
  word-break: break-all;
}

.playlist-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Local Browser */
.local-roots-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.root-chip {
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
  font-weight: 600;
}

.local-path-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background-color: rgba(10, 12, 26, 0.6);
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
}

.local-current-dir {
  flex: 1;
  font-size: 0.78rem;
  color: #A5B4FC;
  word-break: break-all;
}

.empty-state {
  padding: 34px 16px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(6, 7, 16, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  z-index: 100;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  background-color: #14162E;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: var(--radius-xl);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-modal-card {
  max-width: 560px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Settings Modal Content */
.settings-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-group {
  background-color: rgba(10, 12, 26, 0.75);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.settings-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-group-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFE4E6;
}

.settings-status-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background-color: rgba(34, 197, 94, 0.18);
  color: #86EFAC;
}

.settings-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.settings-desc-sm {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.bg-preview-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.bg-preview-box {
  width: 96px;
  height: 128px;
  border-radius: var(--radius-md);
  background-color: #090A14;
  border: 1px dashed rgba(251, 113, 133, 0.6);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bg-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bg-preview-placeholder {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  padding: 8px;
}

.bg-actions-col {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.settings-control-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.settings-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.settings-sublabel {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.pos-chips-row,
.threshold-chips-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pos-chip,
.thresh-chip {
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-color);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.pos-chip.active,
.thresh-chip.active {
  background-color: rgba(34, 197, 94, 0.22);
  border-color: var(--accent-green);
  color: #86EFAC;
}

.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.84rem;
}

/* Equalizer Modal */
.eq-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.preset-chip {
  min-height: 38px;
  padding: 0 13px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
  font-weight: 600;
}

.preset-chip.active {
  background-color: rgba(34, 197, 94, 0.2);
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.eq-sliders-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 8px 0;
  text-align: center;
}

.eq-band {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background-color: rgba(10, 12, 26, 0.75);
  padding: 10px 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.eq-slider {
  writing-mode: vertical-lr;
  direction: rtl;
  height: 110px;
  accent-color: var(--accent-green);
}

.eq-db {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-green);
}

.eq-freq {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* Android Connect Modal */
.android-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.88rem;
}

.android-url-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.android-url-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  background-color: rgba(10, 12, 26, 0.8);
  border: 1px solid var(--accent-green);
  border-radius: var(--radius-md);
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--accent-green);
  word-break: break-all;
}

.android-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.standalone-download-box {
  margin-bottom: 4px;
}

.standalone-download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  text-decoration: none;
  padding: 11px 16px;
  font-weight: 700;
  border-radius: var(--radius-pill);
}

@keyframes spinRing {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive for Mobile / Android & Tablet */
@media (max-width: 920px) {
  .main-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    padding: 8px 10px 26px;
    gap: 10px;
  }

  .top-header {
    padding: 8px 12px;
  }

  .brand-subtitle {
    display: none;
  }

  .circular-dial-wrapper {
    width: 178px;
    height: 178px;
  }

  .artwork-disc {
    width: 148px;
    height: 148px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
