/* ═══════════════════════════════════════════
   Bekar — Minimalist Design System
   Clean, crisp, modern
   ═══════════════════════════════════════════ */

/* ── CSS Custom Properties ── */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --bg-elevated: #161616;

  --text-primary: #f0f0f0;
  --text-secondary: rgba(255, 255, 255, 0.5);
  --text-muted: rgba(255, 255, 255, 0.25);

  --accent: #a78bfa;
  --accent-dim: rgba(167, 139, 250, 0.15);
  --accent-glow: rgba(167, 139, 250, 0.08);

  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);

  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', 'DM Sans', sans-serif;

  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --speed-fast: 0.15s;
  --speed-normal: 0.25s;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

::selection {
  background: rgba(167, 139, 250, 0.25);
}

/* ── Particle Canvas ── */
#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}

/* ── Network Badge ── */
.network-badge {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.network-badge.online .badge-dot {
  background: #34d399;
  box-shadow: 0 0 6px #34d399;
}

.network-badge.offline .badge-dot {
  background: #ef4444;
}

.network-badge.offline .badge-text {
  color: #fca5a5;
}

/* ── App Container ── */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 180px;
}

/* ══════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════ */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(to bottom, var(--bg-primary) 60%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
  opacity: 0.8;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.brand-tagline {
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Theme Toggle */
.theme-toggle {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--speed-normal) var(--ease);
}

.theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: var(--bg-card);
}

/* Nav */
.header-nav {
  display: flex;
  gap: 2px;
  background: var(--bg-card);
  border-radius: var(--radius-full);
  padding: 3px;
  border: 1px solid var(--border);
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--speed-fast) var(--ease);
}

.nav-btn span {
  position: relative;
  z-index: 1;
}

.nav-btn svg {
  position: relative;
  z-index: 1;
}

.nav-btn:hover {
  color: var(--text-secondary);
}

.nav-btn.active {
  background: var(--accent);
  color: #000;
}

/* ══════════════════════════════════════════
   VIEWS
   ══════════════════════════════════════════ */
.view {
  display: none;
}

.view.active {
  display: block;
  animation: viewIn 0.3s var(--ease);
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ══════════════════════════════════════════
   HERO
   ══════════════════════════════════════════ */
.hero-search {
  text-align: center;
  padding: 60px 0 36px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 12px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), #22d3ee);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 6s ease infinite;
}

.gradient-text::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  background: linear-gradient(135deg, var(--accent), #22d3ee);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 6s ease infinite;
  filter: blur(30px);
  opacity: 0.3;
  z-index: -1;
}

@keyframes shimmer {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
  font-weight: 400;
}

/* Search */
.search-wrapper {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--speed-normal) var(--ease);
}

.search-wrapper:focus-within .search-icon {
  color: var(--accent);
}

.search-input {
  width: 100%;
  padding: 14px 44px 14px 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: all var(--speed-normal) var(--ease);
}

.search-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.search-input:focus {
  border-color: rgba(167, 139, 250, 0.3);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.search-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  transition: color var(--speed-fast) var(--ease);
}

.search-clear:hover {
  color: var(--text-primary);
}

/* Tags */
.search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 16px;
}

.tag {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--speed-normal) var(--ease);
  letter-spacing: 0.3px;
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* ══════════════════════════════════════════
   SECTION HEADERS
   ══════════════════════════════════════════ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.results-count {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ══════════════════════════════════════════
   RESULTS GRID
   ══════════════════════════════════════════ */
.results-section {
  margin-top: 16px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px;
}

/* ══════════════════════════════════════════
   TRACK CARD — Minimal
   ══════════════════════════════════════════ */
.track-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--speed-normal) var(--ease);
}

.track-card:hover {
  background: var(--bg-card);
  border-color: var(--border);
}

.track-card.playing {
  background: var(--accent-dim);
  border-color: rgba(167, 139, 250, 0.15);
}

.track-card.playing .card-title {
  color: var(--accent);
}

/* Card Art */
.card-art-wrap {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
}

.card-album-art {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  transition: all var(--speed-normal) var(--ease);
}

.track-card.playing .card-album-art {
  border-radius: 50%;
  animation: spin-album 8s linear infinite;
}

@keyframes spin-album {
  to {
    transform: rotate(360deg);
  }
}

/* Equalizer */
.card-equalizer {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 1.5px;
  height: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--speed-normal) var(--ease);
}

.track-card.playing .card-equalizer {
  opacity: 1;
}

.eq-bar {
  width: 2px;
  background: var(--accent);
  border-radius: 1px;
  animation: eq-bounce 0.8s ease-in-out infinite;
}

.eq-bar:nth-child(1) {
  height: 40%;
  animation-delay: 0s;
}

.eq-bar:nth-child(2) {
  height: 70%;
  animation-delay: 0.15s;
}

.eq-bar:nth-child(3) {
  height: 50%;
  animation-delay: 0.3s;
}

.eq-bar:nth-child(4) {
  height: 80%;
  animation-delay: 0.45s;
}

@keyframes eq-bounce {

  0%,
  100% {
    transform: scaleY(0.3);
  }

  50% {
    transform: scaleY(1);
  }
}

/* Card Info */
.card-info {
  flex: 1;
  min-width: 0;
}

.card-title {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 1px;
  letter-spacing: -0.01em;
}

.card-artist {
  font-size: 0.72rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-duration {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* Card Actions */
.card-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.card-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--speed-fast) var(--ease);
}

.card-btn:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.card-btn.saved {
  color: var(--accent);
}

.card-btn.saved:hover {
  color: var(--accent);
  background: var(--accent-dim);
}

/* ══════════════════════════════════════════
   SIMILAR SECTION
   ══════════════════════════════════════════ */
.similar-section {
  margin-top: 32px;
}

.similar-carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.similar-carousel::-webkit-scrollbar {
  display: none;
}

.similar-card {
  flex: 0 0 160px;
  scroll-snap-align: start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--speed-normal) var(--ease);
}

.similar-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.similar-card.playing {
  border-color: rgba(167, 139, 250, 0.2);
  background: var(--accent-dim);
}

.similar-card-img-wrap {
  position: relative;
}

.similar-card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.similar-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  transition: opacity var(--speed-normal) var(--ease);
}

.similar-card:hover .similar-card-overlay {
  opacity: 1;
}

.similar-play-btn,
.similar-save-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--speed-fast) var(--ease);
}

.similar-play-btn {
  background: var(--accent);
  color: #000;
}

.similar-save-btn {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.similar-play-btn:hover,
.similar-save-btn:hover {
  transform: scale(1.1);
}

.similar-save-btn.saved {
  color: var(--accent);
}

.similar-card-meta {
  padding: 10px;
}

.similar-card-title {
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.similar-card-artist {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Download All */
.download-all-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--speed-normal) var(--ease);
}

.download-all-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ══════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 20px;
  text-align: center;
}

.empty-visual {
  margin-bottom: 16px;
}

.empty-text {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ══════════════════════════════════════════
   LIBRARY
   ══════════════════════════════════════════ */
.library-header-section {
  padding: 48px 0 24px;
  text-align: center;
}

.library-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.library-count {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 6px;
}

.library-track-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--speed-normal) var(--ease);
}

.library-track-card:hover {
  background: var(--bg-card);
  border-color: var(--border);
}

.library-track-card.playing {
  background: var(--accent-dim);
}

.lib-card-art {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.lib-card-info {
  flex: 1;
  min-width: 0;
}

.lib-card-title {
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lib-card-artist {
  font-size: 0.7rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lib-card-badge {
  font-size: 0.6rem;
  color: var(--accent);
  font-weight: 600;
}

.lib-delete-btn {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--speed-fast) var(--ease);
}

.lib-delete-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.library-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.library-empty svg {
  margin-bottom: 12px;
}

/* ══════════════════════════════════════════
   PLAYER BAR
   ══════════════════════════════════════════ */
.player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: transform 0.3s var(--ease);
}

.player-bar.hidden {
  transform: translateY(100%);
}

.player-bar.visible {
  transform: translateY(0);
}

/* Progress */
.player-progress-wrap {
  padding: 0 16px;
  cursor: pointer;
}

.player-progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.player-progress {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.1s linear;
}

/* Player Content */
.player-content {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  max-width: 960px;
  margin: 0 auto;
}

.player-track-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.player-album-art-wrap {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.player-album-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-meta {
  min-width: 0;
}

.player-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-artist {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Controls */
.player-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ctrl-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--speed-fast) var(--ease);
}

.ctrl-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.ctrl-btn.play-btn {
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: #000;
}

.ctrl-btn.play-btn:hover {
  background: #b8a2fc;
  transform: scale(1.05);
}

/* Extras */
.player-extras {
  display: flex;
  align-items: center;
  gap: 12px;
}

.volume-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

.player-time {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 36px;
}

/* Visualizer */
.visualizer-canvas {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.15;
}

/* ══════════════════════════════════════════
   SKELETON
   ══════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: skeleton-load 1.5s ease infinite;
  border-radius: var(--radius-md);
}

.skeleton-card {
  height: 68px;
}

@keyframes skeleton-load {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ══════════════════════════════════════════
   TOASTS
   ══════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 90px;
  right: 16px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  animation: toast-in 0.25s var(--ease);
}

.toast.success {
  border-color: rgba(52, 211, 153, 0.2);
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.2);
}

.toast-icon {
  font-size: 0.9rem;
}

.toast.removing {
  animation: toast-out 0.2s var(--ease) forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(20px);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ══════════════════════════════════════════
   UTILITY
   ══════════════════════════════════════════ */
.hidden {
  display: none !important;
}

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 640px) {
  .app-container {
    padding: 0 16px 180px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .header-nav span {
    display: none;
  }

  .player-extras .volume-wrap {
    display: none;
  }

  .results-grid,
  .library-grid {
    grid-template-columns: 1fr;
  }

  .similar-card {
    flex: 0 0 140px;
  }
}

/* ══════════════════════════════════════════
   REDUCED MOTION
   ══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ══════════════════════════════════════════
   LIGHT THEME
   ══════════════════════════════════════════ */
[data-theme="light"] {
  --bg-primary: #fafafa;
  --bg-secondary: #f5f5f5;
  --bg-card: rgba(0, 0, 0, 0.03);
  --bg-card-hover: rgba(0, 0, 0, 0.05);
  --bg-elevated: #ffffff;

  --text-primary: #111111;
  --text-secondary: rgba(0, 0, 0, 0.5);
  --text-muted: rgba(0, 0, 0, 0.3);

  --accent: #7c3aed;
  --accent-dim: rgba(124, 58, 237, 0.08);
  --accent-glow: rgba(124, 58, 237, 0.05);

  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] #particleCanvas {
  opacity: 0.15;
}

[data-theme="light"] .app-header {
  background: linear-gradient(to bottom, var(--bg-primary) 60%, transparent);
}

[data-theme="light"] .nav-btn.active {
  color: white;
}

[data-theme="light"] .ctrl-btn.play-btn {
  color: white;
}

[data-theme="light"] .player-bar {
  background: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
}

/* ══════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════ */
.site-footer {
  text-align: center;
  padding: 40px 0 20px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-body);
}

[data-theme="light"] .site-footer {
  color: var(--text-secondary);
}