/* ==========================================================================
   B2 Player — base.css
   Shared CSS variables, reset, and typography
   ========================================================================== */

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

/* The HTML hidden attribute must always win over explicit display rules */
[hidden] { display: none !important; }

/* Reliable icon toggle used by JS — more robust than [hidden] inside flex */
.icon-hidden { display: none !important; }

:root {
  --bg:           #0f0f13;
  --surface:      #1a1a24;
  --surface2:     #22222f;
  --surface3:     #2a2a3a;
  --border:       #2e2e40;
  --accent:       #7c5cbf;
  --accent-dim:   #6448a8;
  --accent-glow:  rgba(124, 92, 191, 0.35);
  --text:         #e8e8f0;
  --text-muted:   #888899;
  --danger:       #c0392b;
  --radius:       12px;
  --transition:   0.18s ease;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: none;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: var(--surface3);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: -5px;
}
input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: var(--surface3);
}
input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
}

/* Toast notification */
#toast {
  position: fixed;
  bottom: calc(120px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface3);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  white-space: nowrap;
  z-index: 9999;
  border: 1px solid var(--border);
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
