/* ==========================================================================
   eq.downbad.cc - Stylesheet
   Inherits the dark, minimalist, electric-cyan aesthetic of downbad.cc
   ========================================================================== */

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

:root {
  --bg-color: #000000;
  --cyan: #00f5ff;
  --cyan-glow: rgba(0, 245, 255, 0.35);
  --cyan-subtle: rgba(0, 245, 255, 0.12);
  --cyan-dim: rgba(0, 245, 255, 0.05);
  
  --text-main: #ffffff;
  --text-body: #dddddd;
  --text-muted: #888888;
  --text-dim: #555555;
  
  --card-bg: rgba(255, 255, 255, 0.025);
  --card-bg-hover: rgba(255, 255, 255, 0.045);
  --card-border: rgba(255, 255, 255, 0.07);
  --card-border-active: rgba(0, 245, 255, 0.4);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  
  --color-latin: #ff2d55;
  --color-rock: #ff9500;
  --color-pop: #00f5ff;
  --color-rap: #af52de;
}

html,
body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-color);
  background-image: radial-gradient(ellipse 80% 65% at 50% 25%, rgba(0, 245, 255, 0.08) 0%, rgba(0, 245, 255, 0.02) 45%, #000000 80%);
  background-attachment: fixed;
  color: var(--text-body);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 32px 24px 100px 24px;
  position: relative;
}

/* Ambient Background Particles Canvas */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

/* Container */
.app-container {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Top App Header */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: nowrap;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--card-border);
}

.brand-section {
  display: flex;
  align-items: center;
  min-width: 0;
  flex-shrink: 0;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
}

h1.brand-title {
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-main);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.brand-title span.subdomain {
  color: var(--cyan);
  text-shadow: 0 0 20px rgba(0, 245, 255, 0.5);
}

/* Speaker / Audio Button matching downbad.cc */
.audio-btn {
  width: 38px;
  height: 38px;
  position: relative;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  outline: none;
  flex-shrink: 0;
}

.audio-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.06);
}

.audio-btn.playing {
  background: rgba(0, 245, 255, 0.15);
  border-color: var(--cyan);
  box-shadow: 0 0 16px var(--cyan-glow);
}

.sound-bars {
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
  height: 14px;
}

.sound-bar {
  width: 2.5px;
  height: 100%;
  background: var(--cyan);
  border-radius: 2px;
  animation: soundBarAnim 0.8s infinite ease-in-out alternate;
}

.sound-bar:nth-child(2) { animation-delay: 0.2s; height: 60%; }
.sound-bar:nth-child(3) { animation-delay: 0.4s; height: 35%; }
.sound-bar:nth-child(4) { animation-delay: 0.15s; height: 85%; }

@keyframes soundBarAnim {
  0% { transform: scaleY(0.25); }
  100% { transform: scaleY(1); }
}

/* Dictionary-style meta row */
.word-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.phonetic {
  color: #a3a3a3;
  font-style: italic;
}

.pos-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.76rem;
  color: #cccccc;
  text-transform: lowercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

/* User & Auth Pill */
.auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  padding: 0 14px;
  height: 40px;
  box-sizing: border-box;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}

.auth-pill:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.header-actions .btn {
  height: 40px;
  padding: 0 16px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
}

.header-actions #settings-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: #222;
}

.user-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #555;
}

.user-status-dot.connected {
  background: #1db954;
  box-shadow: 0 0 8px #1db954;
}

.user-status-dot.demo {
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.auth-btn-text {
  color: var(--text-main);
  font-weight: 500;
}

/* Primary Action Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  user-select: none;
  outline: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px);
}

.btn-cyan {
  background: rgba(0, 245, 255, 0.1);
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn-cyan:hover {
  background: rgba(0, 245, 255, 0.2);
  box-shadow: 0 0 16px var(--cyan-glow);
}

.btn-spotify {
  background: #1db954;
  border-color: #1ed760;
  color: #000000;
  font-weight: 600;
}

.btn-spotify:hover {
  background: #1ed760;
  box-shadow: 0 0 16px rgba(29, 185, 84, 0.4);
}

.btn-icon {
  padding: 8px;
  border-radius: var(--radius-md);
}

.sync-spinner {
  display: inline-block;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Stats / Metrics Bar */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.metric-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

.metric-card:hover {
  background: var(--card-bg-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.metric-card.highlight {
  border-color: rgba(0, 245, 255, 0.3);
  background: radial-gradient(circle at 10% 10%, rgba(0, 245, 255, 0.08) 0%, rgba(255, 255, 255, 0.015) 70%);
}

.metric-label {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-value {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-main);
  line-height: 1.1;
}

.metric-card.highlight .metric-value {
  color: var(--cyan);
  text-shadow: 0 0 16px rgba(0, 245, 255, 0.35);
}

.metric-sub {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* Target Playlists Shelf */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title {
  font-size: 0.76rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

/* Suggested Playlists Shelf */
.suggested-shelf-container {
  background: radial-gradient(ellipse 90% 80% at 20% 40%, rgba(0, 245, 255, 0.05) 0%, rgba(255, 255, 255, 0.015) 100%);
  border: 1px dashed rgba(0, 245, 255, 0.28);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.suggested-shelf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.suggested-title-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.suggested-sparkle {
  color: var(--cyan);
  font-size: 0.95rem;
}

.suggested-heading {
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.suggested-subtext {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.suggested-dismiss-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.suggested-dismiss-btn:hover {
  color: var(--text-main);
}

.suggested-chips-list {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.suggested-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.suggested-chip:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 245, 255, 0.35);
  transform: translateY(-1px);
}

.suggested-chip-icon {
  font-size: 1.15rem;
}

.suggested-chip-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.suggested-chip-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: #ffffff;
}

.suggested-chip-count {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--cyan);
}

.suggested-add-btn {
  background: rgba(0, 245, 255, 0.08);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-family: var(--font-mono);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.suggested-add-btn:hover {
  background: var(--cyan);
  color: #000000;
  box-shadow: 0 0 10px var(--cyan-glow);
}

.playlists-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

@media (min-width: 860px) {
  .playlists-shelf {
    grid-template-columns: repeat(4, 1fr);
  }
}

.playlist-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.playlist-card:hover {
  background: var(--card-bg-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.playlist-card.active-filter {
  border-color: var(--cyan);
  background: rgba(0, 245, 255, 0.05);
  box-shadow: 0 0 14px rgba(0, 245, 255, 0.15);
}

.playlist-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.playlist-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.playlist-color-bar {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.playlist-count {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
}

.playlist-card-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.playlist-card-action-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1;
  padding: 3px 5px;
  cursor: pointer;
  border-radius: 4px;
  opacity: 0;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.playlist-card:hover .playlist-card-action-btn {
  opacity: 0.7;
}

.playlist-card-action-btn:hover {
  opacity: 1 !important;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.playlist-card-action-btn.del-btn:hover {
  color: #ff2d55;
  background: rgba(255, 45, 85, 0.15);
}

.playlist-card-action-btn.edit-btn:hover {
  color: var(--cyan);
  background: rgba(0, 245, 255, 0.15);
}

.playlist-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.playlist-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.add-playlist-card {
  border: 1px dashed rgba(255, 255, 255, 0.15);
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 500;
  min-height: 105px;
}

.add-playlist-card:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 245, 255, 0.02);
}

/* Triage Toolbar */
.triage-toolbar {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  outline: none;
}

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

.filter-tab.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-main);
}

.filter-tab.active.inbox {
  background: var(--cyan-subtle);
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 245, 255, 0.2);
}

.tab-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.filter-tab.active.inbox .tab-badge {
  background: var(--cyan);
  color: #000;
  font-weight: 700;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--card-border);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  min-width: 240px;
  flex: 1;
  max-width: 380px;
}

.search-box:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.2);
}

.search-input {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 0.84rem;
  outline: none;
  width: 100%;
}

.search-input::placeholder {
  color: #666;
}

/* Batch Bar (shows when tracks selected) */
.batch-bar {
  background: rgba(10, 15, 20, 0.95);
  border: 1px solid var(--cyan);
  border-radius: var(--radius-lg);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.25);
  animation: slideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-wrap: wrap;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.batch-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--cyan);
  font-weight: 600;
}

.batch-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Tracks List */
.tracks-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.track-row {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  display: grid;
  grid-template-columns: 32px 48px 1fr auto;
  align-items: center;
  gap: 16px;
  transition: all 0.15s ease;
  position: relative;
}

.track-row:hover {
  background: var(--card-bg-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.track-row.selected {
  border-color: var(--cyan);
  background: rgba(0, 245, 255, 0.04);
}

.track-row.active-playing {
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(0, 245, 255, 0.15);
}

.track-row.is-new-item {
  animation: pulseNew 2s ease-out;
}

@keyframes pulseNew {
  0% { background: rgba(0, 245, 255, 0.25); border-color: var(--cyan); }
  100% { background: var(--card-bg); border-color: var(--card-border); }
}

/* Custom Checkbox */
.track-checkbox-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  outline: none;
}

.custom-checkbox:checked {
  background: var(--cyan);
  border-color: var(--cyan);
}

.custom-checkbox:checked::after {
  content: "✓";
  font-size: 11px;
  color: #000;
  font-weight: 800;
}

/* Track Cover Art */
.track-cover-container {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  background: #111;
  flex-shrink: 0;
}

.track-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.track-play-btn {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.track-row:hover .track-play-btn,
.track-play-btn.playing {
  opacity: 1;
}

.track-play-btn.playing {
  background: rgba(0, 0, 0, 0.7);
  color: var(--cyan);
}

/* Track Details */
.track-info-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.track-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.track-name {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.track-artist {
  color: #bbb;
}

.track-album {
  color: #777;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}

/* Recommendation & Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}

.badge-unsorted {
  background: rgba(0, 245, 255, 0.08);
  border: 1px solid var(--cyan);
  color: var(--cyan);
}

.badge-sorted {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #999;
}

.badge-suggest {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ff9500;
}

.badge-new {
  background: var(--cyan);
  color: #000000;
  font-weight: 800;
}

/* Quick Sort Actions */
.track-actions-col {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.quick-sort-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cccccc;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.quick-sort-btn:hover {
  transform: scale(1.05);
  border-color: currentColor;
}

.quick-sort-btn.latin:hover { color: var(--color-latin); background: rgba(255, 45, 85, 0.1); }
.quick-sort-btn.rock:hover  { color: var(--color-rock);  background: rgba(255, 149, 0, 0.1); }
.quick-sort-btn.pop:hover   { color: var(--color-pop);   background: rgba(0, 245, 255, 0.1); }
.quick-sort-btn.rap:hover   { color: var(--color-rap);   background: rgba(175, 82, 222, 0.1); }

.quick-sort-btn.is-in-playlist {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-weight: 700;
}

/* Empty State */
.empty-state {
  background: var(--card-bg);
  border: 1px dashed var(--card-border);
  border-radius: var(--radius-lg);
  padding: 60px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.empty-icon {
  font-size: 2.4rem;
  opacity: 0.8;
}

.empty-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.empty-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 440px;
}

/* Floating Audio Player Bar */
.player-bar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 900px;
  background: rgba(10, 12, 16, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 245, 255, 0.25);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 100;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 245, 255, 0.2);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.player-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.player-thumb {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  animation: spinSlow 12s linear infinite;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.player-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.player-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.player-center {
  display: flex;
  align-items: center;
  gap: 14px;
}

.player-ctrl-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  transition: transform 0.15s ease;
}

.player-ctrl-btn:hover {
  transform: scale(1.1);
  color: var(--cyan);
}

.player-play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--cyan);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 14px var(--cyan-glow);
}

.player-play-btn:hover {
  transform: scale(1.08);
}

.player-scrubber-box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 200px;
}

.player-time {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  min-width: 28px;
}

.player-slider {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.player-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  cursor: pointer;
  box-shadow: 0 0 6px var(--cyan);
}

.player-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #090a0d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  padding: 28px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 245, 255, 0.15);
  transform: scale(0.96);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.modal-close-btn:hover {
  color: var(--text-main);
}

/* Form Styles */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.form-label {
  font-size: 0.74rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.form-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.form-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.2);
}

.form-helper {
  font-size: 0.76rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.form-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: #0d1117;
  border: 1px solid rgba(0, 245, 255, 0.3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 245, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-main);
  font-size: 0.86rem;
  pointer-events: auto;
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast-undo-btn {
  background: transparent;
  border: none;
  color: var(--cyan);
  font-weight: 700;
  cursor: pointer;
  padding: 2px 6px;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.toast-undo-btn:hover {
  text-decoration: underline;
}

/* Keyboard Guide Bar */
.keyboard-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  flex-wrap: wrap;
}

.kbd-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 1px 5px;
  color: #fff;
  font-weight: 600;
}

/* Responsive queries */
@media (max-width: 768px) {
  body {
    padding: 20px 14px 100px 14px;
  }
  
  .top-header {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
  
  .brand-section {
    justify-content: center;
  }
  
  .header-actions {
    justify-content: center;
    width: 100%;
    gap: 8px;
    flex-wrap: wrap;
    padding-bottom: 2px;
  }
  
  .track-row {
    grid-template-columns: 28px 40px 1fr;
    gap: 10px;
    padding: 10px;
  }
  
  .track-actions-col {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
  }
  
  .search-box {
    max-width: 100%;
    width: 100%;
  }

  .player-bar {
    width: calc(100% - 20px);
    padding: 8px 12px;
  }

  .player-scrubber-box {
    display: none;
  }
}
