:root {
  --bg: #07111f;
  --bg-2: #0f172a;
  --panel: rgba(15, 23, 42, 0.92);
  --panel-2: rgba(17, 26, 46, 0.95);
  --line: #24344f;
  --text: #ebf3ff;
  --muted: #9ab0d1;
  --accent: #67e8f9;
  --accent-2: #38bdf8;
  --danger: #fca5a5;
  --success: #86efac;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --radius: 24px;
  --cinema-dim: rgba(0, 0, 0, 0.45);
  --subtitle-size: 1rem;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.14), transparent 24%),
    radial-gradient(circle at bottom left, rgba(103, 232, 249, 0.1), transparent 20%),
    linear-gradient(145deg, #040913, #0b1220 45%, #111827 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.app-shell {
  max-width: 1500px;
  margin: 0 auto;
  padding: 18px;
}

.app-grid {
  display: grid;
  grid-template-columns: 1.55fr 0.95fr;
  gap: 18px;
  min-height: auto;
  align-items: start;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.inner-panel {
  padding: 14px;
}

.main-panel,
.side-panel {
  padding: 18px;
  display: grid;
  gap: 14px;
  min-height: 0;
}

.hero,
.hero-actions,
.control-row,
.now-playing,
.side-head,
.side-actions,
.search-row,
.modal-head {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.hero {
  justify-content: space-between;
}

.minimal-hero h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.hero h2,
.hero h3,
.side-head h2,
.side-head h3 {
  margin: 0;
}

.icon-bar {
  justify-content: flex-end;
}

.brand-mark {
  display: flex;
  align-items: center;
  min-height: 36px;
}

.brand-logo-long {
  height: 36px;
  width: auto;
  max-width: min(44vw, 280px);
  object-fit: contain;
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.icon-button,
input[type="search"],
select {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 16px;
}

.icon-button {
  position: relative;
  overflow: hidden;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;
}

.icon-button:hover {
  transform: translateY(-1px);
  border-color: var(--accent-2);
}

.icon-button:active {
  transform: translateY(0) scale(0.97);
}

.icon-button.primary {
  color: #021018;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  font-weight: 700;
}

.icon-button.large {
  min-width: 52px;
  height: 52px;
  font-size: 18px;
}

.icon-button.danger {
  color: var(--danger);
}

.icon-button.active,
.icon-button[aria-pressed="true"] {
  border-color: var(--accent-2);
  box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.25);
  background: linear-gradient(180deg, rgba(103, 232, 249, 0.18), rgba(56, 189, 248, 0.10));
}

.icon-button.ghost {
  opacity: 0.9;
}

.icon-button .icon-wrap {
  opacity: 0.96;
}

.icon-button.primary .icon-wrap {
  opacity: 1;
}

.icon-wrap {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-wrap svg {
  width: 20px;
  height: 20px;
  display: block;
}

.icon-button.large .icon-wrap,
.icon-button.large .icon-wrap svg {
  width: 22px;
  height: 22px;
}

input[type="search"],
select {
  padding: 11px 12px;
}

input[type="search"] {
  min-width: 210px;
  flex: 1;
}

/* Fixed player stage */
.dropzone {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 22px;
  border: 1px dashed #35517c;
  background: #000;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.dropzone.is-empty {
  background: linear-gradient(180deg, rgba(10, 16, 30, 0.95), rgba(7, 12, 22, 0.98));
}

.dropzone.dragging {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px rgba(103, 232, 249, 0.18);
}

.empty-state,
.drop-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 26px;
}

.empty-card {
  max-width: 560px;
}

.empty-card h2 {
  margin: 0;
  font-size: 30px;
}

.drop-overlay {
  background: rgba(4, 10, 20, 0.82);
  font-size: 24px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 8;
}

.dropzone.dragging .drop-overlay {
  opacity: 1;
}

.media-element {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: none;
  z-index: 2;
  background: #000;
}

#videoPlayer,
#imageViewer {
  object-fit: contain;
  background: #000;
}

#audioPlayer {
  position: absolute !important;
  left: 16px !important;
  right: 16px !important;
  bottom: 16px !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  max-width: calc(100% - 32px) !important;
  z-index: 6 !important;
  background: transparent !important;
}

.audio-visual {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(18, 39, 63, 0.45), rgba(0, 0, 0, 0.92) 72%);;
}

.audio-poster,
.audio-fallback-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  box-shadow: none;
  background: #000;
}

.audio-poster {
  object-fit: cover;
}

.audio-fallback-logo {
  object-fit: contain;
  padding: 7%;
  background:
    radial-gradient(circle at center, rgba(18, 39, 63, 0.45), rgba(0, 0, 0, 0.92) 72%);
}

.dropzone.is-empty .audio-visual {
  display: none !important;
}

/* Hide native controls */
video::-webkit-media-controls,
audio::-webkit-media-controls {
  display: none !important;
}

video::-webkit-media-controls-enclosure,
audio::-webkit-media-controls-enclosure {
  display: none !important;
}

.now-playing {
  justify-content: space-between;
}

.now-playing h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.status-stack {
  text-align: right;
  margin-left: auto;
}

.status-line {
  margin: 0;
  font-size: 14px;
}

.status-line.success {
  color: var(--success);
}

.status-line.danger {
  color: var(--danger);
}


.progress-block {
  position: relative;
  display: grid;
  gap: 10px;
  width: 100%;
  margin-bottom: 12px;
}

.time-row {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

label {
  display: inline-grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.range-wrap {
  min-width: 160px;
}

input[type="range"] {
  width: 100%;
  margin: 0;
  appearance: none;
  height: 8px;
  background: #24344f;
  border-radius: 999px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}

.controls-grid {
  display: grid;
  gap: 12px;
}

.icon-controls {
  justify-content: center;
  padding-bottom: 4px;
}

.compact-controls {
  justify-content: space-between;
  gap: 14px;
  padding-top: 4px;
  border-top: 1px solid rgba(154, 176, 209, 0.12);
}

.compact-controls label {
  min-width: 110px;
}

.transport-shell {
  position: relative;
  padding: 10px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  transition:
    transform 0.24s ease,
    opacity 0.24s ease,
    background 0.24s ease,
    box-shadow 0.24s ease;
  margin-top: 10px;
}

.main-panel:hover .transport-shell,
.main-panel:focus-within .transport-shell,
body.cinema-mode .transport-shell {
  transform: translateY(0);
  opacity: 1;
}

.small-meta {
  font-size: 13px;
  line-height: 1.5;
  margin-top: 6px;
}

.now-playing-art {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.cover-art {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow);
}

.library-index-panel h3 {
  margin: 0;
  font-size: 18px;
}

.stats-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-grid.compact {
  margin-top: 12px;
}

.stat-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.stat-card:hover {
  transform: translateY(-1px);
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
  word-break: break-word;
}

#metadataIndexStatus {
  margin: 10px 0;
}

.playlist {
  display: grid;
  gap: 10px;
  overflow: auto;
  min-height: 0;
}

.playlist-item {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 18px;
  padding: 12px;
  display: grid;
  gap: 10px;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.playlist-item:hover {
  transform: translateY(-1px);
}

.playlist-item.active {
  border-color: var(--accent-2);
  box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.15);
}

.playlist-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.playlist-main strong {
  display: block;
  margin-bottom: 6px;
}

.playlist-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.playlist-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.playlist-actions .icon-button.small {
  min-width: 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.playlist-actions .icon-button.small .icon-wrap,
.playlist-actions .icon-button.small .icon-wrap svg {
  width: 16px;
  height: 16px;
}

.playlist-actions .icon-button.small:not(.danger) {
  color: var(--muted);
}

.playlist-actions .icon-button.small:not(.danger):hover {
  color: var(--accent);
}

.playlist-actions .icon-button.small.danger {
  color: var(--danger);
}

.badge {
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--accent);
  height: fit-content;
}

/* Cinema mode */
body.cinema-mode::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, transparent 30%, var(--cinema-dim) 100%);
  pointer-events: none;
  z-index: 0;
}

body.cinema-mode .app-shell {
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

body.cinema-mode .app-grid {
  grid-template-columns: 1fr;
  gap: 0;
  min-height: auto;
}

body.cinema-mode .main-panel {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  padding-left: 0;
  padding-right: 0;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body.cinema-mode .hero,
body.cinema-mode .side-panel {
  display: none;
}

body.cinema-mode .main-panel > .inner-panel {
  margin: 0 18px 18px;
}

body.cinema-mode .dropzone {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  box-shadow: none;
}

body.cinema-mode .transport-shell {
  position: sticky;
  bottom: 12px;
  z-index: 15;
  margin: 0 18px 16px;
  background: linear-gradient(180deg, rgba(5, 10, 18, 0.92), rgba(10, 18, 32, 0.88));
  border-color: rgba(103, 232, 249, 0.12);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
}

body.cinema-mode .main-panel > .inner-panel {
  position: relative;
}

body.cinema-mode .transport-shell:not(:hover):not(:focus-within) {
  opacity: 0.2;
  transform: translateY(14px);
}

body.cinema-mode #cinemaBtn {
  border-color: var(--accent-2);
  box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.25);
}

body.audio-only-mode #audioOnlyBtn {
  border-color: var(--accent-2);
  box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.25);
  background: linear-gradient(180deg, rgba(103, 232, 249, 0.18), rgba(56, 189, 248, 0.10));
}

body.audio-only-mode .dropzone.video-audio-only::after {
  content: "Audio-only mode";
  position: absolute;
  inset: auto 14px 14px auto;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(7, 12, 22, 0.88);
  color: var(--muted);
  font-size: 12px;
  z-index: 7;
}

/* Help modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 18, 0.72);
}

.modal-dialog {
  position: relative;
  width: min(520px, calc(100% - 24px));
  margin: 8vh auto 0;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(10, 18, 32, 0.98);
  box-shadow: var(--shadow);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.modal-head {
  justify-content: space-between;
}

.modal-head h3 {
  margin: 0;
}

.modal-dialog .icon-button {
  min-width: 40px;
  height: 40px;
}

.shortcut-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.shortcut-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.shortcut-list strong {
  min-width: 80px;
}

.shortcut-list span {
  color: var(--muted);
  text-align: right;
}

/* Timeline / seek */
.seek-shell {
  position: relative;
  height: 18px;
  display: flex;
  align-items: center;
  --buffered-percent: 0%;
  --played-percent: 0%;
}

.buffer-bar,
.progress-fill {
  position: absolute;
  left: 0;
  right: auto;
  height: 6px;
  border-radius: 999px;
  pointer-events: none;
  top: 50%;
  transform: translateY(-50%);
}

.buffer-bar {
  width: var(--buffered-percent);
  background: rgba(235, 243, 255, 0.18);
  z-index: 1;
}

.progress-fill {
  width: var(--played-percent);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 2;
}

#seekBar {
  position: relative;
  z-index: 3;
  background: transparent;
  height: 18px;
}

#seekBar::-webkit-slider-runnable-track {
  height: 6px;
  background: rgba(154, 176, 209, 0.12);
  border-radius: 999px;
}

#seekBar::-moz-range-track {
  height: 6px;
  background: rgba(154, 176, 209, 0.12);
  border-radius: 999px;
}

#seekBar::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  transform: scale(0.95);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  box-shadow: 0 0 0 0 rgba(103, 232, 249, 0);
}

#seekBar::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 0;
  transform: scale(0.95);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  box-shadow: 0 0 0 0 rgba(103, 232, 249, 0);
}

.seek-shell:hover #seekBar::-webkit-slider-thumb,
.seek-shell.dragging #seekBar::-webkit-slider-thumb,
.seek-shell:focus-within #seekBar::-webkit-slider-thumb {
  transform: scale(1.18);
  box-shadow: 0 0 0 8px rgba(103, 232, 249, 0.12);
}

.seek-shell:hover #seekBar::-moz-range-thumb,
.seek-shell.dragging #seekBar::-moz-range-thumb,
.seek-shell:focus-within #seekBar::-moz-range-thumb {
  transform: scale(1.18);
  box-shadow: 0 0 0 8px rgba(103, 232, 249, 0.12);
}

.seek-preview {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  transform: translateX(-50%);
  padding: 6px 8px;
  min-width: 54px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(7, 12, 22, 0.96);
  color: var(--text);
  font-size: 12px;
  text-align: center;
  pointer-events: none;
  z-index: 10;
  box-shadow: var(--shadow);
}

.seek-preview::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 8px;
  height: 8px;
  background: rgba(7, 12, 22, 0.96);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transform: translate(-50%, -55%) rotate(45deg);
}

/* Stage overlay controls */
.stage-overlay-controls {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  background: transparent;
}

.stage-overlay-btn {
  position: relative;
  width: 58px;
  height: 58px;
  border: none;
  border-radius: 999px;
  background: rgba(7, 12, 22, 0.72);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
  pointer-events: auto;
}

.stage-overlay-btn:hover {
  transform: scale(1.04);
  background: rgba(15, 23, 42, 0.88);
  border: none;
}

.stage-overlay-btn:active {
  transform: scale(0.97);
}

.stage-overlay-btn .icon-wrap,
.stage-overlay-btn .icon-wrap svg {
  width: 26px;
  height: 26px;
  display: block;
  overflow: visible;
}

.stage-overlay-btn-main {
  width: 72px;
  height: 72px;
  background: rgba(103, 232, 249, 0.16);
  border-color: rgba(103, 232, 249, 0.38);
}

.stage-overlay-btn-main .icon-wrap,
.stage-overlay-btn-main .icon-wrap svg {
  width: 28px;
  height: 28px;
}

#overlaySeekBackBtn,
#overlaySeekForwardBtn {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

#overlaySeekBackBtn:hover,
#overlaySeekForwardBtn:hover {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

#overlaySeekBackBtn:active,
#overlaySeekForwardBtn:active {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  transform: scale(0.97);
}

.stage-overlay-label {
  display: none;
}

.dropzone:not(:fullscreen):hover .stage-overlay-controls,
.dropzone:not(:fullscreen):focus-within .stage-overlay-controls,
.dropzone.show-stage-overlay .stage-overlay-controls {
  opacity: 1;
}

.dropzone.is-empty .stage-overlay-controls {
  display: none !important;
}

.dropzone.is-fullscreen.cursor-hidden,
.dropzone.is-fullscreen.cursor-hidden * {
  cursor: none !important;
}

/* Seek zones */
.seek-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28%;
  border: 0;
  background: transparent;
  z-index: 7;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.18s ease, background 0.18s ease;
}

.seek-zone-left {
  left: 0;
}

.seek-zone-right {
  right: 0;
}

.dropzone:hover .seek-zone,
.dropzone:focus-within .seek-zone {
  opacity: 1;
}

.seek-zone:hover {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), transparent);
}

.seek-zone-right:hover {
  background: linear-gradient(270deg, rgba(255, 255, 255, 0.06), transparent);
}

.seek-toast {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(7, 12, 22, 0.94);
  color: var(--text);
  z-index: 9;
  pointer-events: none;
  box-shadow: var(--shadow);
  font-size: 13px;
}

/* Volume / subtitle polish */
.volume-muted #volumeBar::-webkit-slider-runnable-track,
.volume-muted #volumeBar::-moz-range-track {
  background: rgba(252, 165, 165, 0.22);
}

.volume-muted #muteBtn,
#muteBtn.active {
  border-color: rgba(252, 165, 165, 0.55);
  color: var(--danger);
  background: linear-gradient(180deg, rgba(252, 165, 165, 0.12), rgba(252, 165, 165, 0.06));
}

#muteBtn.volume-low {
  color: #fcd34d;
}

#muteBtn.volume-high {
  color: var(--accent);
}

.dropzone video::cue,
.dropzone video::-webkit-media-text-track-display {
  font-size: var(--subtitle-size, 1rem);
}

body.subtitle-theme-light video::cue {
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

body.subtitle-theme-dark video::cue {
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.82);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

body.subtitle-theme-yellow video::cue {
  color: #fde047;
  background: rgba(0, 0, 0, 0.76);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

/* Buttons disabled / active */
#playPauseBtn.active-playing {
  box-shadow: 0 0 0 1px rgba(103, 232, 249, 0.18), 0 8px 20px rgba(56, 189, 248, 0.18);
}

.icon-button:disabled,
input:disabled,
select:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.icon-button:disabled:hover,
input:disabled:hover,
select:disabled:hover {
  border-color: var(--line);
}

/* Responsive */
@media (max-width: 1100px) {
  .app-grid {
    grid-template-columns: 1fr;
  }

  body.cinema-mode .app-grid {
    grid-template-columns: 1fr;
  }

  body.cinema-mode .side-panel {
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .now-playing-art {
    margin-left: 0;
  }

  .stats-grid,
  .stats-grid.compact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .stage-overlay-controls {
    gap: 10px;
  }

  .stage-overlay-btn {
    width: 52px;
    height: 52px;
  }

  .stage-overlay-btn-main {
    width: 64px;
    height: 64px;
  }

  .brand-logo-long {
    height: 28px;
    max-width: min(56vw, 220px);
  }

  .app-shell {
    padding: 12px;
  }

  .main-panel,
  .side-panel {
    padding: 14px;
  }

  .dropzone,
  body.cinema-mode .dropzone {
    aspect-ratio: 4 / 3;
  }

  .compact-controls {
    justify-content: flex-start;
  }

  input[type="search"] {
    min-width: 100%;
  }

  #audioPlayer {
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    max-width: calc(100% - 24px) !important;
  }

  body.cinema-mode .main-panel > .inner-panel {
    margin: 0 10px 10px;
  }

  body.cinema-mode .transport-shell {
    margin: 0 10px 10px;
    bottom: 8px;
  }

  .seek-preview {
    bottom: calc(100% + 8px);
  }
}