/* =============================================
   ISSA Yoga 200 — Audio Course Platform
   SoundCloud-inspired dark theme with yoga aesthetics
   ============================================= */

/* === RESET & VARIABLES === */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Backgrounds */
  --bg-primary: #0a0a12;
  --bg-secondary: #0f0f18;
  --bg-tertiary: #161620;
  --bg-elevated: #1e1e2a;

  /* Surfaces (glass) */
  --surface-1: rgba(255, 255, 255, 0.025);
  --surface-2: rgba(255, 255, 255, 0.05);
  --surface-3: rgba(255, 255, 255, 0.08);
  --surface-hover: rgba(255, 255, 255, 0.06);

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-medium: rgba(255, 255, 255, 0.1);
  --border-accent: rgba(249, 115, 22, 0.3);

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Accent colors */
  --accent-orange: #f97316;
  --accent-pink: #ec4899;
  --accent-purple: #8b5cf6;
  --accent-indigo: #6366f1;
  --accent-teal: #14b8a6;
  --accent-green: #22c55e;
  --accent-red: #ef4444;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #f97316, #ec4899, #8b5cf6);
  --gradient-warm: linear-gradient(135deg, #f97316, #ef4444);
  --gradient-cool: linear-gradient(135deg, #8b5cf6, #6366f1);
  --gradient-glow: linear-gradient(135deg, rgba(249,115,22,0.2), rgba(139,92,246,0.2));

  /* Layout */
  --sidebar-width: 340px;
  --header-height: 60px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

html,
body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

/* === CUSTOM SCROLLBAR === */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* === SCREEN MANAGEMENT === */
.screen {
  position: fixed;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-slow), visibility var(--transition-slow);
}
.screen.active {
  opacity: 1;
  visibility: visible;
}

/* ==============================================
   LOADING SCREEN
   ============================================== */
.loading-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}
.loader-ring {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-orange);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.loader-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--text-muted);
  letter-spacing: 6px;
  text-transform: uppercase;
}

/* ==============================================
   AUTH SCREEN
   ============================================== */
.auth-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--bg-primary);
}
.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  animation: float 25s ease-in-out infinite;
}
.auth-orb-1 {
  width: 500px;
  height: 500px;
  background: var(--accent-orange);
  top: -150px;
  right: -100px;
  animation-delay: 0s;
}
.auth-orb-2 {
  width: 600px;
  height: 600px;
  background: var(--accent-purple);
  bottom: -200px;
  left: -150px;
  animation-delay: -8s;
}
.auth-orb-3 {
  width: 350px;
  height: 350px;
  background: var(--accent-pink);
  top: 40%;
  left: 45%;
  transform: translate(-50%, -50%);
  animation-delay: -16s;
}

.auth-container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: rgba(15, 15, 24, 0.75);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.auth-header {
  text-align: center;
  margin-bottom: 40px;
}
.auth-logo {
  font-size: 52px;
  margin-bottom: 16px;
  display: block;
  animation: breathe 4s ease-in-out infinite;
}
.auth-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  font-weight: 600;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}
.auth-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Auth Forms */
.auth-form {
  display: none;
}
.auth-form.active {
  display: block;
  animation: fadeSlideUp 0.35s ease;
}

.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.form-group input {
  width: 100%;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}
.form-group input::placeholder {
  color: var(--text-muted);
}
.form-group input:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

/* Buttons */
.btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
  overflow: hidden;
}
.btn-primary {
  background: var(--gradient-primary);
  color: white;
  margin-top: 8px;
}
.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(249, 115, 22, 0.25);
}
.btn-primary:active {
  transform: translateY(0);
  opacity: 1;
}
.btn.loading .btn-text {
  opacity: 0;
}
.btn.loading .btn-loader {
  display: block;
}
.btn-loader {
  display: none;
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.auth-switch {
  text-align: center;
  margin-top: 28px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.auth-switch a {
  color: var(--accent-orange);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-fast);
}
.auth-switch a:hover {
  color: var(--accent-pink);
}

.auth-error {
  margin-top: 20px;
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-sm);
  color: #f87171;
  font-size: 0.85rem;
  text-align: center;
  display: none;
}
.auth-error.visible {
  display: block;
  animation: shake 0.4s ease;
}

/* ==============================================
   APP LAYOUT
   ============================================== */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(10, 10, 18, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 200;
}

.sidebar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.sidebar-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1rem;
}
.header-logo {
  font-size: 1.4rem;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-user {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-icon:hover {
  background: var(--surface-3);
  color: var(--text-primary);
}

.app-layout {
  display: flex;
  height: 100vh;
  padding-top: var(--header-height);
}

/* ==============================================
   SIDEBAR
   ============================================== */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: transform var(--transition-base);
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(249,115,22,0.03), transparent);
}
.course-info h2 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.progress-overview {
  display: flex;
  align-items: center;
  gap: 20px;
}
.progress-ring-container {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}
.progress-ring {
  transform: rotate(-90deg);
  width: 80px;
  height: 80px;
}
.progress-ring-bg {
  fill: none;
  stroke: var(--surface-3);
  stroke-width: 8;
}
.progress-ring-fill {
  fill: none;
  stroke: url(#progress-gradient);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  transition: stroke-dashoffset 1s ease;
}
.progress-percent {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.progress-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stat {
  display: flex;
  flex-direction: column;
}
.stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}
.stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Sidebar Search */
.sidebar-search {
  position: relative;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.sidebar-search input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition-fast);
}
.sidebar-search input::placeholder {
  color: var(--text-muted);
}
.sidebar-search input:focus {
  border-color: var(--accent-purple);
}
.search-icon {
  position: absolute;
  left: 33px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* ==============================================
   TRACK LIST
   ============================================== */
.track-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}

.track-section {
  margin-bottom: 2px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition-fast);
}
.section-header:hover {
  background: var(--surface-hover);
}
.section-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-chevron {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}
.section-header.collapsed .section-chevron {
  transform: rotate(-90deg);
}
.section-name {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}
.section-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 4px;
}
.section-count {
  font-size: 0.68rem;
  color: var(--text-muted);
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.section-tracks {
  overflow: hidden;
  transition: max-height var(--transition-base) ease;
}

/* Track Items */
.track-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 20px 7px 28px;
  cursor: pointer;
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
}
.track-item:hover {
  background: var(--surface-hover);
}
.track-item.active {
  background: rgba(249, 115, 22, 0.06);
  border-left-color: var(--accent-orange);
}
.track-item.active .track-item-title {
  color: var(--accent-orange);
}
.track-item.active .track-item-number {
  color: var(--accent-orange);
}

.track-item-number {
  font-size: 0.72rem;
  color: var(--text-muted);
  min-width: 26px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.track-item-title {
  flex: 1;
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--transition-fast);
  line-height: 1.4;
}
.track-item-status {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.track-item.completed .track-item-status {
  opacity: 1;
  color: var(--accent-green);
}
.track-item.active .track-item-playing {
  display: flex;
}
.track-item-playing {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}
.track-item-playing span {
  width: 3px;
  background: var(--accent-orange);
  border-radius: 1px;
  animation: equalizer 0.8s ease-in-out infinite alternate;
}
.track-item-playing span:nth-child(1) { height: 40%; animation-delay: 0s; }
.track-item-playing span:nth-child(2) { height: 70%; animation-delay: 0.2s; }
.track-item-playing span:nth-child(3) { height: 50%; animation-delay: 0.4s; }

/* ==============================================
   MAIN CONTENT
   ============================================== */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 36px 48px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.player-section {
  max-width: 800px;
  width: 100%;
}

/* ==============================================
   NOW PLAYING CARD
   ============================================== */
.now-playing-card {
  text-align: center;
  padding: 32px 28px 24px;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}
.now-playing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  opacity: 0.6;
}
.now-playing-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
}
.now-playing-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent-orange);
  text-transform: uppercase;
}
.now-playing-section {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--surface-2);
  padding: 3px 12px;
  border-radius: var(--radius-full);
}
.now-playing-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 6px;
}
.now-playing-number {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==============================================
   WAVEFORM VISUALIZATION
   ============================================== */
.waveform-container {
  position: relative;
  width: 100%;
  height: 110px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-1);
  cursor: pointer;
}
#waveform-canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.waveform-time-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,18,0.3) 0%, transparent 40%);
  pointer-events: none;
}

/* ==============================================
   PROGRESS BAR
   ============================================== */
.progress-bar-container {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.time-display {
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  min-width: 44px;
  font-weight: 500;
}
.time-display:last-child {
  text-align: right;
}
.progress-bar {
  flex: 1;
  height: 5px;
  background: var(--surface-3);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: height var(--transition-fast);
}
.progress-bar:hover {
  height: 8px;
}
.progress-bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 4px;
  width: 0%;
  transition: none;
  position: relative;
}
.progress-bar-handle {
  position: absolute;
  top: 50%;
  right: -7px;
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity var(--transition-fast);
  pointer-events: none;
}
.progress-bar:hover .progress-bar-handle {
  opacity: 1;
}

/* ==============================================
   PLAYER CONTROLS
   ============================================== */
.player-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.controls-left,
.controls-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 100px;
}
.controls-right {
  justify-content: flex-end;
}
.controls-center {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-control {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.btn-control:hover {
  color: var(--text-primary);
  background: var(--surface-2);
}
.btn-control.active {
  color: var(--accent-orange);
}

/* Play Button */
.btn-play {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 24px rgba(249, 115, 22, 0.3);
  margin: 0 4px;
}
.btn-play:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 30px rgba(249, 115, 22, 0.4);
}
.btn-play:active {
  transform: scale(0.97);
}

/* Complete Button */
.btn-complete.completed {
  color: var(--accent-green) !important;
}
.btn-complete.completed:hover {
  background: rgba(34, 197, 94, 0.1);
}

/* Speed Select */
.speed-select {
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition-fast);
}
.speed-select:focus {
  border-color: var(--accent-purple);
}
.speed-select option {
  background: var(--bg-elevated);
}

/* Volume */
.volume-control {
  display: flex;
  align-items: center;
  gap: 4px;
}
.volume-slider {
  width: 80px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--surface-3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-primary);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* ==============================================
   NOTES SECTION
   ============================================== */
.notes-section {
  max-width: 800px;
  width: 100%;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.notes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
}
.notes-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.notes-status {
  font-size: 0.72rem;
  color: var(--accent-green);
  font-weight: 500;
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.notes-status.visible {
  opacity: 1;
}
.notes-textarea {
  width: 100%;
  min-height: 140px;
  padding: 18px 24px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.8;
  resize: vertical;
  outline: none;
}
.notes-textarea::placeholder {
  color: var(--text-muted);
}

/* ==============================================
   SIDEBAR OVERLAY (MOBILE)
   ============================================== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 149;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}
.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ==============================================
   TOAST NOTIFICATIONS
   ============================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9000;
  pointer-events: none;
}
.toast {
  padding: 14px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  animation: toastIn 0.35s ease;
  max-width: 380px;
  pointer-events: auto;
  backdrop-filter: blur(12px);
}
.toast.success {
  border-left: 3px solid var(--accent-green);
}
.toast.error {
  border-left: 3px solid var(--accent-red);
}
.toast.info {
  border-left: 3px solid var(--accent-purple);
}
.toast.leaving {
  opacity: 0;
  transform: translateX(60px);
  transition: all 0.3s ease;
}

/* ==============================================
   ANIMATIONS
   ============================================== */
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(40px, -40px) scale(1.05); }
  50% { transform: translate(-30px, 30px) scale(0.95); }
  75% { transform: translate(25px, 15px) scale(1.02); }
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(60px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes equalizer {
  0% { height: 30%; }
  100% { height: 100%; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ==============================================
   RESPONSIVE
   ============================================== */
@media (max-width: 1100px) {
  .main-content {
    padding: 28px 28px 48px;
  }
  .volume-slider {
    width: 60px;
  }
}

@media (max-width: 768px) {
  :root {
    --sidebar-width: 300px;
  }

  .sidebar-toggle {
    display: flex;
  }

  .sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    z-index: 150;
    transform: translateX(-100%);
    box-shadow: 4px 0 40px rgba(0, 0, 0, 0.5);
  }
  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: block;
    pointer-events: none;
  }
  .sidebar-overlay.active {
    pointer-events: auto;
  }

  .main-content {
    padding: 20px 16px 40px;
  }

  .now-playing-card {
    padding: 24px 20px 20px;
  }
  .now-playing-title {
    font-size: 1.3rem;
  }

  .player-controls {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
  .controls-left,
  .controls-right {
    min-width: auto;
    order: 1;
  }
  .controls-center {
    order: 0;
    width: 100%;
    justify-content: center;
  }

  .volume-slider {
    display: none;
  }

  .auth-card {
    padding: 36px 24px;
  }
  .auth-logo {
    font-size: 40px;
  }
  .auth-title {
    font-size: 1.5rem;
  }

  .waveform-container {
    height: 80px;
  }
}

@media (max-width: 480px) {
  .header-user {
    display: none;
  }
  .now-playing-title {
    font-size: 1.1rem;
  }
  .now-playing-header {
    flex-direction: column;
    gap: 8px;
  }
  .controls-left {
    display: none;
  }
}
