/* ============================================================
   PLAYER — extends theme.css variables
   ============================================================ */

.player-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--indigo);
}

/* ---- NAV ---- */
.player-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid rgba(255,184,77,0.08);
}

.nav-back {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s;
  font-family: var(--font-body);
}
.nav-back:hover { color: var(--lavender); }

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--lavender);
  letter-spacing: 0.05em;
}

/* ---- AILMENT SELECTOR ---- */
.ailment-section {
  padding: 2.5rem 2rem 1.5rem;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}

.ailment-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

@media (max-width: 600px) {
  .ailment-grid { grid-template-columns: repeat(2, 1fr); }
}

.ailment-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  background: var(--indigo-mid);
  border: 1px solid rgba(255,184,77,0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  text-align: left;
}

.ailment-btn:hover {
  border-color: rgba(255,184,77,0.3);
  background: var(--indigo-lit);
}

.ailment-btn.active {
  border-color: var(--amber);
  background: rgba(255,184,77,0.08);
  box-shadow: 0 0 16px rgba(255,184,77,0.12);
}

.ailment-btn-hz {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--amber);
  line-height: 1;
}

.ailment-btn-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--lav-dark);
  font-family: var(--font-body);
}

/* ---- PRESCRIPTION SECTION ---- */
.prescription-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 2rem 3rem;
  gap: 2rem;
}

.rx-card {
  text-align: center;
  padding: 2rem 3rem;
  border: 1px solid rgba(255,184,77,0.2);
  border-radius: 16px;
  background: rgba(255,184,77,0.04);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  min-width: 300px;
}

.rx-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,184,77,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.rx-card .rx-label {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.75rem;
}

.rx-card .rx-value {
  font-family: var(--font-display);
  font-size: 4.5rem;
  font-weight: 700;
  color: var(--lavender);
  line-height: 1;
  text-shadow: 0 0 40px rgba(255,184,77,0.35);
}

.rx-card .rx-unit {
  font-size: 1.75rem;
  font-weight: 300;
  color: var(--amber);
  margin-left: 0.25rem;
}

.rx-card .rx-meta {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ---- WAVE CANVAS ---- */
.wave-container {
  width: 100%;
  max-width: 600px;
  height: 120px;
  position: relative;
}

#waveCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.wave-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* ---- CONTROLS ---- */
.controls {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.ctrl-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid rgba(255,184,77,0.3);
  background: var(--indigo-lit);
  color: var(--lavender);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.ctrl-btn:hover {
  background: rgba(255,184,77,0.12);
  border-color: var(--amber);
  box-shadow: 0 0 20px rgba(255,184,77,0.2);
}

.ctrl-btn.playing {
  background: rgba(255,184,77,0.12);
  border-color: var(--amber);
  box-shadow: 0 0 24px rgba(255,184,77,0.25);
}

.timer-display {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--lavender);
  min-width: 80px;
  text-align: center;
}

/* ---- PROGRESS ---- */
.progress-track {
  width: 100%;
  max-width: 500px;
  height: 3px;
  background: var(--indigo-lit);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--amber-dim), var(--amber));
  border-radius: 2px;
  width: 0%;
  transition: width 0.5s linear;
  box-shadow: 0 0 8px rgba(255,184,77,0.4);
}

/* ---- STATUS ---- */
.status-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-body);
  font-weight: 500;
}