/* Davron Audio Player — premium dark glass theme */
.dap-player {
  --dap-bg: #0a0a0c;
  --dap-card: rgba(16, 16, 20, 0.94);
  --dap-surface: rgba(255, 255, 255, 0.045);
  --dap-surface-2: rgba(255, 255, 255, 0.07);
  --dap-border: rgba(255, 255, 255, 0.09);
  --dap-gold: #ffd54f;
  --dap-gold-dim: rgba(255, 213, 79, 0.14);
  --dap-cyan: #26c6da;
  --dap-cyan-dim: rgba(38, 198, 218, 0.14);
  --dap-text: #f8f8fa;
  --dap-muted: rgba(255, 255, 255, 0.52);
  --dap-danger: #ff4081;
  --dap-radius: 20px;
  --dap-radius-sm: 12px;
  font-family: 'Mulish', system-ui, sans-serif;
  color: var(--dap-text);
}

.dap-card,
.dap-card.dm-anim-hover,
html[data-theme="light"] .dap-card,
html[data-theme="light"] .dap-card.dm-anim-hover {
  position: relative;
  isolation: isolate;
  color: #f8f8fa !important;
  background:
    linear-gradient(155deg, rgba(255, 213, 79, 0.08) 0%, rgba(38, 198, 218, 0.05) 28%, rgba(10, 10, 14, 0.98) 62%),
    #101014 !important;
  border: 1px solid rgba(255, 215, 0, 0.38) !important;
  border-radius: var(--dap-radius);
  padding: 18px 16px 14px;
  overflow: hidden;
  filter:
    drop-shadow(0 12px 22px rgba(0, 0, 0, 0.45))
    drop-shadow(0 0 14px rgba(245, 200, 66, 0.28));
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 215, 0, 0.18),
    0 8px 24px rgba(245, 200, 66, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
}

.dap-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgba(255, 215, 0, 0.28),
    inset 0 0 18px rgba(0, 0, 0, 0.2);
}

.dap-card:hover,
.dap-card.dm-anim-hover:hover {
  border-color: rgba(255, 215, 0, 0.55) !important;
  filter:
    drop-shadow(0 16px 26px rgba(0, 0, 0, 0.5))
    drop-shadow(0 0 18px rgba(245, 200, 66, 0.38));
}

html[data-theme="light"] .dap-card h1,
html[data-theme="light"] .dap-card h2,
html[data-theme="light"] .dap-card h3,
html[data-theme="light"] .dap-card p {
  color: inherit !important;
}

.dap-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 140px;
  background: radial-gradient(ellipse 90% 120% at 18% -10%, rgba(255, 213, 79, 0.14), transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.dap-card > * {
  position: relative;
  z-index: 1;
}

.dap-top {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dap-cover {
  width: 76px;
  height: 76px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  background: #111;
  border: 1px solid rgba(255, 213, 79, 0.22);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

.dap-cover.is-playing {
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.45),
    0 0 0 2px rgba(38, 198, 218, 0.45),
    0 0 20px rgba(38, 198, 218, 0.2);
}

.dap-meta { min-width: 0; flex: 1; padding-top: 2px; }

.dap-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dap-cyan);
  margin-bottom: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--dap-cyan-dim);
  border: 1px solid rgba(38, 198, 218, 0.22);
}

.dap-title {
  font-family: 'Unbounded', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  text-shadow: 0 1px 12px rgba(255, 213, 79, 0.15);
}

.dap-artist {
  margin: 0 0 10px;
  color: var(--dap-muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dap-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.dap-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: var(--dap-radius-sm);
  background: var(--dap-surface);
  border: 1px solid var(--dap-border);
  min-width: 0;
}

.dap-stat-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dap-muted);
}

.dap-stat-val {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  min-height: 18px;
}

.dap-key-badge,
.dap-bpm-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  font-family: 'Unbounded', sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.dap-key-badge { color: var(--dap-cyan); }
.dap-bpm-badge { color: var(--dap-gold); }

.dap-note-live {
  font-size: 10px;
  color: var(--dap-gold);
  font-weight: 700;
}

.dap-fx-panel {
  display: none;
  margin-bottom: 12px;
}

.dap-fx-panel.is-open {
  display: block;
  margin-top: 2px;
  padding: 14px;
  border-radius: 16px;
  background:
    linear-gradient(165deg, rgba(38, 198, 218, 0.14) 0%, rgba(8, 12, 18, 0.94) 42%, rgba(255, 213, 79, 0.08) 100%);
  border: 1px solid rgba(38, 198, 218, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 8px 28px rgba(0, 0, 0, 0.38);
}

.dap-card--fx-open {
  border-color: rgba(38, 198, 218, 0.24);
  background:
    linear-gradient(155deg, rgba(38, 198, 218, 0.08) 0%, rgba(255, 213, 79, 0.04) 34%, rgba(12, 12, 16, 0.98) 68%),
    var(--dap-card);
}

.dap-player--fx-open .dap-controls-bar {
  margin-bottom: 8px;
}

.dap-fx-panel.is-open .dap-eq,
.dap-fx-panel.is-open .dap-sliders {
  background: rgba(0, 0, 0, 0.34);
  border-color: rgba(255, 255, 255, 0.08);
}

.dap-eq-icon {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  width: 14px;
  height: 12px;
  color: inherit;
}

.dap-eq-icon i {
  display: block;
  width: 2px;
  border-radius: 1px;
  background: currentColor;
}

.dap-eq-icon i:nth-child(1) { height: 5px; }
.dap-eq-icon i:nth-child(2) { height: 8px; }
.dap-eq-icon i:nth-child(3) { height: 12px; }
.dap-eq-icon i:nth-child(4) { height: 7px; }
.dap-eq-icon i:nth-child(5) { height: 4px; }

.dap-eq-icon--lg {
  width: 18px;
  height: 14px;
  gap: 3px;
}

.dap-eq-icon--lg i { width: 3px; }
.dap-eq-icon--lg i:nth-child(1) { height: 6px; }
.dap-eq-icon--lg i:nth-child(2) { height: 10px; }
.dap-eq-icon--lg i:nth-child(3) { height: 14px; }
.dap-eq-icon--lg i:nth-child(4) { height: 9px; }
.dap-eq-icon--lg i:nth-child(5) { height: 5px; }

.dap-eq {
  margin-bottom: 10px;
  padding: 12px;
  border-radius: var(--dap-radius-sm);
  background: var(--dap-surface);
  border: 1px solid var(--dap-border);
}

.dap-eq-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}

.dap-eq-head-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--dap-text);
}

.dap-eq-reset {
  border: 1px solid var(--dap-border);
  background: transparent;
  color: var(--dap-muted);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.dap-eq-reset:hover {
  color: var(--dap-gold);
  border-color: rgba(255, 213, 79, 0.35);
  background: var(--dap-gold-dim);
}

.dap-eq-bands {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  align-items: end;
}

.dap-eq-band {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.dap-eq-val {
  font-size: 9px;
  font-weight: 700;
  color: var(--dap-cyan);
  min-height: 12px;
}

.dap-eq-band input[type="range"] {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 4px;
  height: 72px;
  accent-color: var(--dap-cyan);
  touch-action: pan-x;
}

.dap-eq-label {
  font-size: 9px;
  color: var(--dap-muted);
  font-weight: 700;
}

.dap-progress-wrap {
  margin-bottom: 14px;
  padding: 0 2px;
}

.dap-times {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 600;
  color: var(--dap-muted);
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.dap-times-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.dap-tempo-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--dap-gold-dim);
  border: 1px solid rgba(255, 213, 79, 0.28);
  color: var(--dap-gold);
  font-family: 'Unbounded', sans-serif;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.dap-tempo-badge[hidden] { display: none !important; }

.dap-progress {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  overflow: visible;
  touch-action: none;
  padding: 12px 0;
  margin: -12px 0;
  background-clip: content-box;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
}

.dap-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffd54f 0%, #ffb300 45%, #26c6da 100%);
  border-radius: inherit;
  transition: width 0.08s linear;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(255, 213, 79, 0.35);
  position: relative;
}

.dap-progress-fill::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 50%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  transform: translate(50%, -50%);
  background: #fff;
  box-shadow:
    0 0 0 2px rgba(255, 213, 79, 0.55),
    0 2px 8px rgba(0, 0, 0, 0.35);
}

.dap-controls {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.dap-controls-bar {
  margin-bottom: 14px;
  padding: 8px 6px;
  border-radius: 16px;
  background: var(--dap-surface);
  border: 1px solid var(--dap-border);
  overflow: hidden;
}

.dap-btn {
  border: 1px solid var(--dap-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--dap-text);
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dap-btn:hover {
  border-color: rgba(255, 213, 79, 0.32);
  background: var(--dap-gold-dim);
  transform: translateY(-1px);
}

.dap-btn:active { transform: translateY(0); }

.dap-btn.is-active {
  color: var(--dap-cyan);
  border-color: rgba(38, 198, 218, 0.42);
  background: var(--dap-cyan-dim);
}

#dap-filter.is-active {
  color: #071318;
  border-color: rgba(38, 198, 218, 0.85);
  background: linear-gradient(180deg, #4de3f5 0%, #26c6da 55%, #0097a7 100%);
  box-shadow:
    0 0 0 1px rgba(38, 198, 218, 0.35),
    0 4px 16px rgba(38, 198, 218, 0.32);
}

#dap-filter.is-active:hover {
  filter: brightness(1.06);
}

#dap-filter.is-active .dap-eq-icon i {
  background: #071318;
}

.dap-btn--icon {
  width: 34px;
  height: 34px;
  font-size: 12px;
  flex-shrink: 0;
}

.dap-btn--main {
  width: 44px;
  height: 44px;
  font-size: 15px;
  flex-shrink: 0;
  background: linear-gradient(145deg, #ffe082 0%, #ffd54f 45%, #ffb300 100%);
  border-color: rgba(255, 213, 79, 0.65);
  color: #14120a;
  box-shadow:
    0 6px 18px rgba(255, 179, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.dap-btn--main:hover {
  filter: brightness(1.05);
  box-shadow:
    0 8px 22px rgba(255, 179, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.dap-volume {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--dap-muted);
  font-size: 11px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  flex-shrink: 0;
}

.dap-volume i { font-size: 11px; }

.dap-volume input[type="range"] {
  width: 56px;
  accent-color: var(--dap-gold);
  height: 4px;
}

.dap-sliders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 0;
  padding: 12px;
  border-radius: var(--dap-radius-sm);
  background: var(--dap-surface);
  border: 1px solid var(--dap-border);
}

.dap-slider--master { grid-column: 1 / -1; }

.dap-slider--master label span:last-child {
  color: var(--dap-cyan) !important;
}

.dap-slider label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--dap-muted);
  margin-bottom: 6px;
  gap: 8px;
}

.dap-slider label span:last-child {
  color: var(--dap-gold);
  font-weight: 700;
  font-size: 11px;
}

.dap-slider input[type="range"] {
  width: 100%;
  accent-color: var(--dap-gold);
  height: 4px;
  touch-action: pan-y;
}

.dap-library {
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.dap-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  padding: 3px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--dap-border);
}

.dap-tab {
  flex: 1;
  min-width: 0;
  padding: 8px 8px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--dap-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.dap-tab:hover {
  color: var(--dap-text);
  background: rgba(255, 255, 255, 0.04);
}

.dap-tab.is-active {
  color: #14120a;
  border-color: rgba(255, 213, 79, 0.45);
  background: linear-gradient(145deg, #ffe082 0%, #ffd54f 55%, #ffb300 100%);
  box-shadow: 0 4px 14px rgba(255, 179, 0, 0.18);
}

.dap-playlist {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 213, 79, 0.35) transparent;
}

.dap-playlist::-webkit-scrollbar { width: 5px; }
.dap-playlist::-webkit-scrollbar-thumb {
  background: rgba(255, 213, 79, 0.35);
  border-radius: 999px;
}

.dap-track {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  min-height: 0;
  border-radius: var(--dap-radius-sm);
  border: 1px solid transparent;
  background: var(--dap-surface);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.dap-track:hover {
  background: var(--dap-surface-2);
  border-color: rgba(255, 213, 79, 0.14);
  transform: translateX(2px);
}

.dap-track.is-active {
  border-color: rgba(255, 213, 79, 0.32);
  background: linear-gradient(90deg, rgba(255, 213, 79, 0.12), rgba(255, 213, 79, 0.04));
  box-shadow: inset 3px 0 0 var(--dap-gold);
}

.dap-track.is-playing .dap-track-num { color: var(--dap-cyan); }

.dap-track-num {
  width: 18px;
  flex-shrink: 0;
  font-size: 10px;
  color: var(--dap-muted);
  text-align: center;
  font-weight: 700;
  line-height: 1.4;
  padding-top: 2px;
  font-variant-numeric: tabular-nums;
}

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

.dap-track-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
}

.dap-track-title {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.dap-track-artist {
  display: block;
  font-size: 10px;
  color: var(--dap-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  margin-top: 2px;
  padding-right: 52px;
}

.dap-track-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  margin-left: auto;
}

.dap-icon-btn {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--dap-muted);
  cursor: pointer;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.dap-icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--dap-text);
}

.dap-icon-btn.is-liked { color: var(--dap-danger); }

.dap-empty {
  text-align: center;
  padding: 28px 12px;
  color: var(--dap-muted);
  font-size: 12px;
  border: 1px dashed var(--dap-border);
  border-radius: var(--dap-radius-sm);
  background: var(--dap-surface);
}

.dap-empty i {
  display: block;
  font-size: 22px;
  margin-bottom: 8px;
  color: var(--dap-gold);
  opacity: 0.7;
}

.dap-loading {
  text-align: center;
  padding: 18px;
  color: var(--dap-muted);
  font-size: 12px;
}

@media (max-width: 560px) {
  .dap-sliders { grid-template-columns: 1fr; }
  .dap-controls { gap: 4px; }
  .dap-btn--icon { width: 30px; height: 30px; font-size: 11px; }
  .dap-btn--main { width: 40px; height: 40px; font-size: 14px; }
  .dap-volume input[type="range"] { width: 48px; }
  .dap-stats { grid-template-columns: 1fr 1fr; }
  .dap-cover {
    width: 68px;
    height: 68px;
  }
}
