/* ============================================
   ONI MUSIC - Anime-inspired Dark Theme
   Colors: Black, White, touches of Blue & Red
   ============================================ */

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --bg-card-hover: #1a1a1a;
  --bg-input: #1a1a1a;
  --border: #222222;
  --border-hover: #333333;

  --text-primary: #f0f0f0;
  --text-secondary: #888888;
  --text-muted: #555555;

  --accent-blue: #3b82f6;
  --accent-blue-dim: #1e3a5f;
  --accent-red: #ef4444;
  --accent-red-dim: #5f1e1e;

  --glow-blue: 0 0 20px rgba(59, 130, 246, 0.15);
  --glow-red: 0 0 20px rgba(239, 68, 68, 0.15);

  --font-display: 'Orbitron', sans-serif;
  --font-heading: 'Rajdhani', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;

  --radius: 8px;
  --radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  --player-height: 80px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; color: inherit; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ---- Animated Background ---- */
.bg-grid {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.scanline {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 100vh;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* ---- Navigation ---- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: 64px;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

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

.brand-icon { color: var(--accent-blue); display: flex; }
.brand-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--text-primary);
}
.brand-accent { color: var(--accent-red); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  letter-spacing: 0.5px;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link i { font-size: 0.85rem; }

.nav-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.user-menu { position: relative; }

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: var(--transition);
}

.user-menu-btn:hover { background: rgba(255, 255, 255, 0.05); }

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  object-fit: cover;
}

.user-name {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  padding-top: 16px;
  display: none;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.user-dropdown::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}

.user-menu:hover .user-dropdown { display: block; }

.user-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.user-dropdown a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

.nav-mobile-toggle { display: none; font-size: 1.2rem; padding: 8px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: var(--transition);
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent-blue);
  color: white;
  border-color: var(--accent-blue);
}
.btn-primary:hover {
  background: #2563eb;
  box-shadow: var(--glow-blue);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-block { width: 100%; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ---- Flash Messages ---- */
.flash {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  animation: slideDown 0.3s ease;
  max-width: 600px;
  width: 90%;
}

.flash-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.flash-error {
  background: var(--accent-red-dim);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.flash-close { margin-left: auto; opacity: 0.6; }
.flash-close:hover { opacity: 1; }

@keyframes slideDown {
  from { transform: translateX(-50%) translateY(-20px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ---- Main Content ---- */
.main-content {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  padding-top: 64px;
  padding-bottom: var(--player-height);
}

/* ---- Hero Section ---- */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 24px 60px;
  gap: 60px;
}

.hero-content { flex: 1; max-width: 650px; }

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid var(--accent-blue);
  border-radius: 100px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 3px;
  color: var(--accent-blue);
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero-line {
  display: block;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
}

.hero-line:nth-child(2) { color: var(--text-secondary); }

.glitch {
  position: relative;
  color: var(--accent-red);
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch::before {
  animation: glitch-1 2s infinite linear alternate;
  clip-path: inset(0 0 60% 0);
  color: var(--accent-blue);
}

.glitch::after {
  animation: glitch-2 2s infinite linear alternate;
  clip-path: inset(60% 0 0 0);
  color: var(--accent-red);
}

@keyframes glitch-1 {
  0%, 90% { transform: translate(0); }
  92% { transform: translate(2px, -1px); }
  94% { transform: translate(-2px, 1px); }
  96% { transform: translate(1px, 2px); }
  98% { transform: translate(-1px, -2px); }
  100% { transform: translate(0); }
}

@keyframes glitch-2 {
  0%, 90% { transform: translate(0); }
  91% { transform: translate(-2px, 1px); }
  93% { transform: translate(2px, -1px); }
  95% { transform: translate(-1px, -2px); }
  97% { transform: translate(1px, 2px); }
  100% { transform: translate(0); }
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-visual { flex-shrink: 0; }

.vinyl-record {
  width: 320px;
  height: 320px;
  animation: vinyl-spin 8s linear infinite;
}

.vinyl-outer {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at center,
    var(--bg-primary) 15%,
    #1a1a1a 16%,
    #1a1a1a 30%,
    #111 31%,
    #1a1a1a 32%,
    #1a1a1a 44%,
    #111 45%,
    #1a1a1a 46%,
    #1a1a1a 58%,
    #111 59%,
    #1a1a1a 60%,
    #1a1a1a 72%,
    #111 73%,
    #1a1a1a 74%,
    #222 100%
  );
  border: 2px solid #333;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vinyl-label {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-red-dim), var(--accent-blue-dim));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 2px;
  border: 2px solid #333;
}

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

/* ---- Features Section ---- */
.section-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
  margin-bottom: 48px;
}

.text-accent { color: var(--accent-red); }

.features-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.feature-card {
  position: relative;
  padding: 36px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: var(--transition);
  overflow: hidden;
}

.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-blue);
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.feature-number {
  position: absolute;
  top: 16px;
  right: 20px;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.03);
}

/* ---- Recent Tracks Section ---- */
.recent-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

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

.section-header .section-title {
  text-align: left;
  margin-bottom: 0;
}

.track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.track-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.track-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.track-card-cover {
  position: relative;
  aspect-ratio: 1;
  background: var(--bg-secondary);
  cursor: pointer;
  overflow: hidden;
}

.track-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.track-card:hover .track-card-cover img { transform: scale(1.05); }

.track-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

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

.track-card-overlay i {
  font-size: 2rem;
  color: white;
  background: var(--accent-blue);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
}

.track-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--text-muted);
}

.track-card-info { padding: 14px 16px; }

.track-card-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.track-card-artist {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ---- Stats Section ---- */
.stats-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.stat-card {
  text-align: center;
  padding: 32px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 4px;
}

/* ---- Auth Section ---- */
.auth-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px);
  padding: 40px 24px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
}

.auth-header { text-align: center; margin-bottom: 36px; }

.auth-icon {
  color: var(--accent-blue);
  margin-bottom: 16px;
  display: inline-block;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-form { display: flex; flex-direction: column; gap: 20px; }

.form-group { display: flex; flex-direction: column; gap: 8px; }

.form-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 16px;
  transition: var(--transition);
}

.form-input-wrap:focus-within {
  border-color: var(--accent-blue);
  box-shadow: var(--glow-blue);
}

.form-input-wrap i {
  color: var(--text-muted);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.form-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  padding: 14px 0;
}

.form-input::placeholder { color: var(--text-muted); }

.form-textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  resize: vertical;
  outline: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: var(--glow-blue);
}

.form-select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
}

.toggle-password {
  padding: 4px;
  color: var(--text-muted);
  transition: var(--transition);
}

.toggle-password:hover { color: var(--text-primary); }

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-decoration {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  display: flex;
}

.auth-line:nth-child(1) { flex: 2; background: var(--accent-blue); }
.auth-line:nth-child(2) { flex: 1; background: var(--text-primary); }
.auth-line:nth-child(3) { flex: 1; background: var(--accent-red); }

/* ---- Browse / Track List ---- */
.browse-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

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

.browse-header .page-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
}

.browse-filters { display: flex; gap: 12px; flex-wrap: wrap; }

.search-form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.search-wrap { min-width: 280px; }

.track-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.track-list-header {
  display: grid;
  grid-template-columns: 50px 1fr 150px 160px 70px 80px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.track-row {
  display: grid;
  grid-template-columns: 50px 1fr 150px 160px 70px 80px;
  padding: 10px 20px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  transition: var(--transition);
}

.track-row:hover { background: rgba(255, 255, 255, 0.03); }

.track-col-num { position: relative; text-align: center; }

.track-number {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.track-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  color: var(--accent-blue);
  font-size: 0.85rem;
}

.track-row:hover .track-number { display: none; }
.track-row:hover .track-play-btn { opacity: 1; }

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

.track-thumb-sm {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.track-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.track-name {
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

.track-uploader {
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

.track-col-format { display: flex; gap: 6px; }

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.badge-format { background: var(--accent-blue-dim); color: var(--accent-blue); }
.badge-quality { background: rgba(255, 255, 255, 0.05); color: var(--text-secondary); }
.badge-role { background: var(--accent-blue-dim); color: var(--accent-blue); text-transform: uppercase; }
.badge-status { text-transform: uppercase; }
.badge-completed { background: rgba(34, 197, 94, 0.1); color: #4ade80; }
.badge-downloading { background: var(--accent-blue-dim); color: var(--accent-blue); }
.badge-failed { background: var(--accent-red-dim); color: var(--accent-red); }
.badge-pending { background: rgba(255, 255, 255, 0.05); color: var(--text-secondary); }

.track-col-duration {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-heading);
}

.track-col-actions { display: flex; gap: 4px; justify-content: flex-end; }

.track-action-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  transition: var(--transition);
  font-size: 0.85rem;
}

.track-action-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent-red);
}

.track-action-btn.active { color: var(--accent-red); }

/* ---- Category Tabs ---- */
.category-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar { display: none; }

.category-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 100px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  white-space: nowrap;
  transition: var(--transition);
  cursor: pointer;
}

.category-tab:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.category-tab.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: white;
}

.category-tab i { font-size: 0.8rem; }

.subcategory-pills {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.subcategory-pills::-webkit-scrollbar { display: none; }

.subcategory-pill {
  padding: 5px 14px;
  border-radius: 100px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  white-space: nowrap;
  transition: var(--transition);
  cursor: pointer;
}

.subcategory-pill:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.subcategory-pill.active {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

/* ---- Infinite Scroll Loader ---- */
.load-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.85rem;
}

/* ---- Existing Track Notice ---- */
.existing-track-notice {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  padding: 24px;
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-lg);
}

.existing-icon {
  font-size: 1.5rem;
  color: var(--accent-blue);
  flex-shrink: 0;
  padding-top: 2px;
}

.existing-content h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.existing-content p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.existing-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.existing-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- Player Close Button ---- */
/* Mobile close button - hidden on desktop, shown on mobile */
.player-close-mobile {
  display: none;
  color: var(--text-muted);
  margin-left: auto;
}

.player-close-mobile:hover { color: var(--accent-red); }

.player-close-btn {
  color: var(--text-muted);
  margin-left: 4px;
}

.player-close-btn:hover {
  color: var(--accent-red);
  background: rgba(239, 68, 68, 0.1);
}

/* ---- Download Section ---- */
.download-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.download-header { text-align: center; margin-bottom: 40px; }

.page-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-top: 8px;
}

.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

/* Download Tabs */
.download-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.download-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}
.download-tab i { font-size: 1.1rem; }
.download-tab:hover { color: var(--text-primary); }
.download-tab.active {
  color: var(--accent-red);
  border-bottom-color: var(--accent-red);
}

/* Upload Dropzone */
.upload-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 24px;
}
.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--accent-red);
  background: rgba(239, 68, 68, 0.05);
}
.upload-dropzone-inner h3 {
  margin: 12px 0 6px;
  color: var(--text-primary);
  font-size: 1.2rem;
}
.upload-dropzone-inner p {
  color: var(--text-muted);
  margin: 4px 0;
  font-size: 0.9rem;
}
.upload-icon {
  font-size: 3rem;
  color: var(--accent-red);
  margin-bottom: 8px;
}
.upload-formats {
  font-size: 0.8rem !important;
  color: var(--text-muted);
  margin-top: 12px !important;
}
.upload-selected {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
}
.upload-file-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.upload-file-info { flex: 1; min-width: 0; }
.upload-file-info h4 {
  margin: 0 0 4px;
  color: var(--text-primary);
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.upload-file-info p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.upload-meta-form {
  margin-top: 16px;
}

.download-input-group {
  display: flex;
  gap: 12px;
}

.download-url-wrap { flex: 1; }

.download-url-wrap i {
  color: var(--accent-red);
  font-size: 1.1rem;
}

.video-preview {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.video-preview-thumb {
  width: 160px;
  flex-shrink: 0;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}

.video-preview-thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

.video-duration {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.8);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: var(--font-heading);
}

.video-preview-info h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.video-preview-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.quality-settings {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.settings-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.settings-grid { display: flex; flex-direction: column; gap: 24px; margin-bottom: 28px; }

.format-selector,
.quality-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.format-option input,
.quality-option input { display: none; }

.format-badge,
.quality-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.quality-badge small {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 2px;
}

.format-option input:checked + .format-badge,
.quality-option input:checked + .quality-badge {
  border-color: var(--accent-blue);
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
}

.format-badge:hover,
.quality-badge:hover {
  border-color: var(--border-hover);
}

/* Download Progress */
.download-progress {
  margin-top: 24px;
  text-align: center;
}

.progress-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-family: var(--font-heading);
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.progress-bar-full {
  position: relative;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.15);
}

/* Indeterminate shimmer: a bright bar slides across repeatedly */
.progress-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 35%;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--accent-red, #ef4444) 50%,
    transparent 100%
  );
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
  animation: progress-slide 1.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes progress-slide {
  0%   { left: -35%; }
  100% { left: 100%; }
}

.download-complete {
  margin-top: 24px;
  text-align: center;
  padding: 24px;
}

.complete-icon {
  font-size: 3rem;
  color: #4ade80;
  margin-bottom: 12px;
}

.download-complete h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.download-complete p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.complete-actions { display: flex; gap: 12px; justify-content: center; }

/* ---- Playlists Grid ---- */
.playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.playlist-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: block;
}

.playlist-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.playlist-card-cover {
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--accent-blue-dim), var(--accent-red-dim));
  position: relative;
  overflow: hidden;
}

.playlist-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.playlist-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

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

.playlist-card-overlay i {
  font-size: 2rem;
  color: white;
}

.playlist-card-info { padding: 14px 16px; }

.playlist-card-name {
  font-family: var(--font-heading);
  font-weight: 600;
  margin-bottom: 4px;
}

.playlist-card-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Playlist Hero */
.playlist-hero {
  display: flex;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.playlist-hero-cover {
  width: 180px;
  height: 180px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent-blue-dim), var(--accent-red-dim));
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.playlist-hero-cover img { width: 100%; height: 100%; object-fit: cover; }
.playlist-hero-icon { font-size: 3rem; color: var(--text-muted); position: absolute; }

.playlist-type-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 3px;
  color: var(--text-muted);
}

.playlist-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 8px;
}

.playlist-meta {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.playlist-meta i { margin-right: 4px; }

/* ---- Profile ---- */
.profile-section {
  display: flex;
  justify-content: center;
  padding: 60px 24px;
}

.profile-card {
  width: 100%;
  max-width: 500px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
}

.profile-avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 16px;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
}

.profile-avatar-ring {
  position: absolute;
  inset: -6px;
  border: 2px solid var(--accent-blue);
  border-radius: 50%;
  animation: ring-pulse 2s ease-in-out infinite;
}

@keyframes ring-pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.02); }
}

.profile-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
}

.profile-username {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.profile-stats {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin: 32px 0;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.profile-stat-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}

.profile-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---- History ---- */
.history-list { display: flex; flex-direction: column; gap: 8px; }

.history-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.history-item:hover { border-color: var(--border-hover); }

.history-thumb { width: 64px; height: 48px; border-radius: 6px; overflow: hidden; flex-shrink: 0; }
.history-thumb img { width: 100%; height: 100%; object-fit: cover; }
.history-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

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

.history-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.history-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.history-date { font-size: 0.8rem; color: var(--text-muted); }

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 80px 20px;
}

.empty-icon {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.empty-state h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* ---- Player Bar ---- */
.player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--player-height);
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 1000;
}

.player-container {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: 20px;
}

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

.player-thumbnail {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
}

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

.player-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-artist {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.player-fav-btn {
  color: var(--text-muted);
  transition: var(--transition);
  flex-shrink: 0;
}

.player-fav-btn:hover { color: var(--accent-red); }

.player-controls { display: flex; flex-direction: column; align-items: center; gap: 6px; }

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

.player-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-secondary);
  transition: var(--transition);
  font-size: 0.85rem;
}

.player-btn:hover { color: var(--text-primary); }

.player-btn-main {
  width: 40px;
  height: 40px;
  background: var(--text-primary);
  color: var(--bg-primary);
  font-size: 0.9rem;
}

.player-btn-main:hover {
  transform: scale(1.05);
  color: var(--bg-primary);
}

.player-btn-active {
  position: relative;
}
.player-btn-active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.player-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.player-time {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 35px;
  text-align: center;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

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

.progress-bar:hover .progress-fill { background: var(--accent-blue); }

.player-extra {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.volume-control { display: flex; align-items: center; gap: 6px; }

.volume-slider {
  width: 80px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.volume-fill {
  height: 100%;
  background: var(--text-secondary);
  border-radius: 2px;
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.modal-body { padding: 24px; display: flex; flex-direction: column; gap: 20px; }

/* ---- Mobile Menu ---- */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px 16px;
}

.mobile-menu.active { display: flex; }

.mobile-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.mobile-link:hover,
.mobile-link:active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.mobile-link i { width: 20px; text-align: center; font-size: 0.9rem; }

.mobile-link-accent { color: var(--accent-blue); }
.mobile-link-danger { color: var(--accent-red); }

.mobile-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 16px;
}

/* ---- Footer ---- */
.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  margin-bottom: var(--player-height);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: var(--transition);
}
.footer-links a:hover { color: var(--text-primary); }

.footer-divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

.footer-dev-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.footer-dev-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: var(--transition);
}

.footer-dev-link:hover {
  border-color: var(--accent-blue);
  box-shadow: var(--glow-blue);
  transform: translateY(-1px);
}

.footer-dev-link .fa-code { color: var(--accent-blue); }
.footer-dev-link .fa-external-link-alt { font-size: 0.65rem; color: var(--text-muted); }

/* ---- Responsive ---- */

/* Tablet */
@media (max-width: 900px) {
  .hero { flex-direction: column; text-align: center; padding-top: 40px; }
  .hero-actions { justify-content: center; }
  .vinyl-record { width: 200px; height: 200px; }

  .track-list-header,
  .track-row {
    grid-template-columns: 40px 1fr 60px 60px;
  }
  .track-col-artist,
  .track-col-format { display: none; }

  .track-name { max-width: 200px; }

  .player-container { grid-template-columns: 1fr 1fr; }
  .player-extra { display: none; }
  .player-close-mobile { display: flex; }

  .playlist-hero { flex-direction: column; align-items: flex-start; }
  .playlist-hero-cover { width: 120px; height: 120px; }

  .stats-grid { grid-template-columns: repeat(3, 1fr); }

  .features-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-top { flex-direction: column; gap: 16px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-dev { flex-direction: column; gap: 8px; }
}

/* Mobile */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-actions { display: none; }
  .nav-mobile-toggle { display: block; }

  .main-content { padding-top: 64px; }

  .hero { padding: 30px 16px 40px; gap: 30px; }
  .hero-line { font-size: 2rem; }
  .hero-badge { font-size: 0.6rem; letter-spacing: 2px; padding: 4px 12px; }
  .hero-subtitle { font-size: 0.95rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 280px; }

  .section-title { font-size: 1.3rem; margin-bottom: 28px; }
  .features-section { padding: 40px 16px; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-card { padding: 24px 20px; }

  .recent-section { padding: 20px 16px 40px; }
  .track-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .track-card-info { padding: 10px 12px; }
  .track-card-title { font-size: 0.85rem; }

  .stats-section { padding: 0 16px 40px; }
  .stats-grid { gap: 12px; }
  .stat-card { padding: 20px 12px; }
  .stat-value { font-size: 1.8rem; }

  .browse-section { padding: 24px 16px 80px; }
  .browse-header { gap: 12px; }
  .browse-header .page-title { font-size: 1.4rem; }
  .search-wrap { min-width: 100%; }
  .browse-filters { width: 100%; }
  .search-form { width: 100%; }

  .track-list-header,
  .track-row {
    grid-template-columns: 36px 1fr 50px;
    padding: 8px 12px;
  }
  .track-col-artist,
  .track-col-format,
  .track-col-duration { display: none; }
  .track-name { max-width: 150px; font-size: 0.85rem; }
  .track-thumb-sm { width: 36px; height: 36px; }
  .track-title-wrap { gap: 10px; }

  .download-section { padding: 30px 16px 80px; }
  .download-card { padding: 20px 16px; }
  .download-input-group { flex-direction: column; }
  .video-preview { flex-direction: column; }
  .video-preview-thumb { width: 100%; }
  .format-badge, .quality-badge { padding: 8px 12px; font-size: 0.8rem; }
  .complete-actions { flex-direction: column; }

  .auth-section { padding: 24px 16px; }
  .auth-card { padding: 32px 24px; }
  .auth-title { font-size: 1.2rem; }

  .player-bar { height: auto; min-height: 56px; }
  .player-container {
    grid-template-columns: 1fr;
    padding: 10px 12px 12px;
    gap: 6px;
  }
  .player-track-info { gap: 10px; }
  .player-thumbnail { width: 44px; height: 44px; }
  .player-title { font-size: 0.85rem; }
  .player-controls { width: 100%; }
  .player-buttons { gap: 10px; }
  .player-btn-main { width: 40px; height: 40px; }
  .player-progress { gap: 6px; }
  .player-extra { display: none; }
  .player-fav-btn { display: none; }
  .player-close-mobile { display: flex; }

  /* Mobile: show the mini bar, hide the full container */
  .player-mini-mobile { display: flex; }
  .player-bar.player-minimized .player-container { display: none; }
  .player-bar.player-minimized { min-height: 0; height: 56px; }
  .player-bar:not(.player-minimized) .player-mini-mobile { display: none; }

  .playlist-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .playlist-hero-cover { width: 100px; height: 100px; }
  .page-title { font-size: 1.4rem; }

  .profile-card { padding: 32px 20px; }
  .profile-stats { gap: 12px; flex-wrap: wrap; }
  .profile-stat-value { font-size: 1.2rem; }

  .history-item { padding: 12px; gap: 10px; }
  .history-thumb { width: 48px; height: 36px; }
  .history-title { font-size: 0.85rem; }

  .modal-overlay { padding: 16px; }
  .modal-body { padding: 16px; }

  .footer { padding: 24px 16px; }
  .footer-links { gap: 16px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-dev { flex-direction: column; gap: 6px; }

  .empty-state { padding: 40px 16px; }
  .empty-icon { font-size: 2rem; }
}

/* Small phones */
@media (max-width: 380px) {
  .hero-line { font-size: 1.6rem; }
  .nav-brand .brand-text { font-size: 1.1rem; }
  .track-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: 1fr; }
}

/* ============================================
   Admin Panel
   ============================================ */
.nav-link-admin span { color: var(--accent-red); }
.nav-link-admin i { color: var(--accent-red); }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.admin-stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}

.admin-stat-value {
  font-family: 'Orbitron', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-blue);
}

.admin-stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.admin-delete-btn:hover {
  color: var(--accent-red) !important;
  background: rgba(239, 68, 68, 0.1);
}

/* Admin Cookie Card */
.admin-cookie-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.cookie-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.cookie-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-primary);
}
.cookie-status {
  font-size: 0.85rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: 600;
}
.cookie-status-active {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}
.cookie-status-missing {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
}
.cookie-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.cookie-info {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}
.cookie-info i {
  margin-right: 0.4rem;
  color: var(--text-muted);
}
.cookie-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}
.cookie-upload-form {
  display: inline-block;
}
.cookie-help {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}
.cookie-help i {
  margin-right: 0.3rem;
}

@media (max-width: 640px) {
  .admin-stats { grid-template-columns: 1fr; }
  .cookie-info { flex-direction: column; gap: 0.5rem; }
}

/* ============================================
   Add to Playlist Modal
   ============================================ */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-header h3 i { color: var(--accent-blue); }

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
}

.modal-create-new {
  display: flex;
  gap: 0.5rem;
}

.modal-create-new .form-input {
  flex: 1;
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
}

.playlist-pick-list {
  display: flex;
  flex-direction: column;
}

.playlist-pick-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  color: var(--text-primary);
  transition: var(--transition);
  text-align: left;
  width: 100%;
}

.playlist-pick-item:hover {
  background: rgba(59, 130, 246, 0.05);
}

.playlist-pick-item i {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: var(--transition);
}

.playlist-pick-item:hover i { color: var(--accent-blue); }

.playlist-pick-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.playlist-pick-name {
  font-weight: 500;
  font-size: 0.95rem;
}

.playlist-pick-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================================
   Error Pages (404 / 500)
   ============================================ */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 3rem 1.5rem;
}

.error-animation {
  margin-bottom: 2rem;
}

/* 404 - Broken vinyl */
.error-vinyl {
  position: relative;
  width: 160px;
  height: 160px;
}

.error-disc {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
  position: relative;
  animation: error-spin 4s linear infinite;
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.1);
}

.error-disc .vinyl-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
}

.vinyl-groove {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.05);
}

.vinyl-groove:first-of-type { top: 15%; left: 15%; right: 15%; bottom: 15%; }
.vinyl-groove-2 { top: 25%; left: 25%; right: 25%; bottom: 25%; }
.vinyl-groove-3 { top: 35%; left: 35%; right: 35%; bottom: 35%; }

.error-needle {
  position: absolute;
  top: 10px;
  right: -20px;
  width: 60px;
  height: 4px;
  background: var(--text-muted);
  transform: rotate(30deg);
  transform-origin: right center;
  border-radius: 2px;
}

.error-needle::after {
  content: '';
  position: absolute;
  left: -3px;
  top: -3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-secondary);
}

@keyframes error-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error-code {
  font-family: 'Orbitron', monospace;
  font-size: 5rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.error-message {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 400px;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.error-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* 500 - Maintenance gears */
.maintenance-icon {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto;
}

.maintenance-gear {
  position: absolute;
  color: var(--text-muted);
  animation: gear-spin 3s linear infinite;
}

.maintenance-gear i { font-size: 4rem; }

.gear-1 {
  top: 0;
  left: 20px;
  color: var(--accent-blue);
  opacity: 0.6;
}

.gear-2 {
  top: 40px;
  left: 70px;
  color: var(--accent-red);
  opacity: 0.6;
  animation-direction: reverse;
}

.gear-2 i { font-size: 3rem; }

.maintenance-wrench {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-secondary);
  font-size: 2rem;
  animation: wrench-swing 2s ease-in-out infinite;
}

@keyframes gear-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes wrench-swing {
  0%, 100% { transform: translateX(-50%) rotate(-15deg); }
  50% { transform: translateX(-50%) rotate(15deg); }
}

.error-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background: rgba(239, 68, 68, 0.05);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-red);
  animation: status-pulse 1.5s ease-in-out infinite;
}

@keyframes status-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* ============================================
   Offline Overlay
   ============================================ */
.offline-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.offline-content {
  text-align: center;
  padding: 2rem;
  max-width: 400px;
}

.offline-animation {
  margin-bottom: 2rem;
  position: relative;
}

/* Sound wave bars */
.offline-wave {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  height: 60px;
  margin-bottom: 1.5rem;
}

.wave-bar {
  width: 6px;
  border-radius: 3px;
  background: var(--accent-blue);
  opacity: 0.3;
  animation: wave-flat 2s ease-in-out infinite;
}

.wave-bar:nth-child(1) { height: 20px; animation-delay: 0s; }
.wave-bar:nth-child(2) { height: 35px; animation-delay: 0.15s; }
.wave-bar:nth-child(3) { height: 50px; animation-delay: 0.3s; }
.wave-bar:nth-child(4) { height: 35px; animation-delay: 0.45s; }
.wave-bar:nth-child(5) { height: 20px; animation-delay: 0.6s; }

@keyframes wave-flat {
  0%, 100% { height: 8px; opacity: 0.2; }
  50% { opacity: 0.4; }
}

/* Wifi icon with slash */
.offline-icon {
  position: relative;
  display: inline-block;
  font-size: 3rem;
  color: var(--accent-red);
  margin-bottom: 0.5rem;
}

.offline-slash {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 110%;
  background: var(--accent-red);
  transform: translate(-50%, -50%) rotate(45deg);
  border-radius: 2px;
}

.offline-title {
  font-family: 'Orbitron', monospace;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.offline-message {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.offline-pulse {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-blue);
  animation: pulse-glow 1.5s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
  50% { opacity: 0.5; box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
}

@media (max-width: 640px) {
  .error-code { font-size: 3.5rem; }
  .error-title { font-size: 1.4rem; }
  .offline-title { font-size: 1.4rem; }
}

/* ============================================
   OPENING INTRO - Official Gaming Loader
   ============================================ */
body.intro-active { overflow: hidden; }

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background:
    radial-gradient(ellipse at center, #0a0a14 0%, #02020a 70%, #000 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: introFadeIn 0.35s ease forwards;
}
.intro-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.015) 0 1px, transparent 1px 3px);
  pointer-events: none;
}
.intro-overlay.intro-hiding {
  animation: introFadeOut 0.5s ease forwards;
}
@keyframes introFadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes introFadeOut { from { opacity: 1; } to { opacity: 0; } }

.game-loader {
  position: relative;
  z-index: 10;
  text-align: center;
  width: min(480px, 88vw);
  animation: loaderFadeUp 0.6s ease 0.1s both;
}
@keyframes loaderFadeUp {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: translateY(0); }
}

.game-logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 5rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.4rem;
  margin-bottom: 0.25rem;
}
.game-logo .gl-a {
  color: #ffffff;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.4);
}
.game-logo .gl-k {
  color: var(--accent-red, #ef4444);
  text-shadow: 0 0 14px rgba(239, 68, 68, 0.6);
}

.game-tagline {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.55rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2.5rem;
  padding-left: 0.55rem;
}
.game-tagline span {
  color: var(--accent-red, #ef4444);
}

.game-progress-wrap {
  width: 100%;
}

.game-progress-track {
  height: 2px;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}
.game-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-red, #ef4444), #fff);
  transition: width 0.18s linear;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.7);
}

.game-progress-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.25rem;
  color: rgba(255, 255, 255, 0.65);
}

.game-loading-label {
  display: inline-flex;
  align-items: center;
}
.load-dots {
  display: inline-flex;
  margin-left: 4px;
  width: 18px;
}
.load-dots i {
  font-style: normal;
  opacity: 0.2;
  animation: dotPulse 1.2s ease-in-out infinite;
}
.load-dots i:nth-child(1) { animation-delay: 0s; }
.load-dots i:nth-child(2) { animation-delay: 0.2s; }
.load-dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.2; }
  40%           { opacity: 1; }
}

.game-progress-pct {
  color: #fff;
  letter-spacing: 0.15rem;
}

.game-footer {
  position: absolute;
  bottom: 34px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.35rem;
  color: rgba(255, 255, 255, 0.45);
  animation: footerBlink 1.6s ease-in-out infinite;
}
@keyframes footerBlink {
  0%, 100% { opacity: 0.9; }
  50%      { opacity: 0.3; }
}

/* Skip button */
.intro-skip {
  position: absolute;
  top: 28px;
  right: 28px;
  z-index: 30;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.8);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2rem;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.intro-skip:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}
.intro-skip i { margin-left: 6px; }

@media (max-width: 640px) {
  .game-logo { font-size: 3.5rem; letter-spacing: 0.25rem; }
  .game-tagline { font-size: 0.7rem; letter-spacing: 0.35rem; margin-bottom: 1.8rem; }
  .game-progress-labels { font-size: 0.6rem; letter-spacing: 0.2rem; }
  .game-footer { bottom: 24px; font-size: 0.6rem; letter-spacing: 0.25rem; }
  .intro-skip { top: 18px; right: 18px; font-size: 0.6rem; padding: 6px 12px; }
}

/* ============================================
   Mobile Mini Player Bar
   ============================================ */
.player-mini-mobile {
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  height: 56px;
  background: var(--bg-card, #0f0f1a);
  border-top: 1px solid var(--border, rgba(255,255,255,0.08));
}

/* Desktop: always hide the mobile mini bar */
@media (min-width: 641px) {
  .player-mini-mobile { display: none !important; }
}
/* Mobile: show flex by default, hide when expanded */
@media (max-width: 640px) {
  .player-mini-mobile { display: flex; }
  .player-bar:not(.player-minimized) .player-mini-mobile { display: none; }
}
.mini-thumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}
.mini-meta {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.mini-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary, #fff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-artist {
  font-size: 0.72rem;
  color: var(--text-muted, #888);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-primary, #fff);
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mini-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Player loading spinner overlay */
.player-loading {
  display: none;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
  z-index: 5;
  pointer-events: none;
}
.spinner-ring {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent-red, #ef4444);
  border-radius: 50%;
  animation: spinnerRotate 0.8s linear infinite;
}
@keyframes spinnerRotate {
  to { transform: rotate(360deg); }
}

/* ============================================
   Global Extraction Indicator
   ============================================ */
.extract-indicator {
  position: fixed;
  right: 20px;
  bottom: 110px;
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 16px;
  min-width: 220px;
  max-width: 320px;
  background: rgba(10, 10, 16, 0.92);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(239, 68, 68, 0.25);
  cursor: pointer;
  animation: extractSlideIn 0.3s ease;
}
@keyframes extractSlideIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
.extract-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(239, 68, 68, 0.25);
  border-top-color: var(--accent-red, #ef4444);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
.extract-meta {
  flex: 1;
  min-width: 0;
}
.extract-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  color: var(--accent-red, #ef4444);
  margin-bottom: 2px;
}
.extract-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.extract-close {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  transition: all 0.2s ease;
}
.extract-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Completed state */
.extract-indicator.extract-done {
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(34, 197, 94, 0.3);
}
.extract-indicator.extract-done .extract-spinner {
  border: 2px solid #22c55e;
  border-top-color: #22c55e;
  animation: none;
  position: relative;
}
.extract-indicator.extract-done .extract-spinner::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: #22c55e;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.75rem;
}
.extract-indicator.extract-done .extract-label { color: #22c55e; }

/* Failed state */
.extract-indicator.extract-failed {
  border-color: rgba(239, 68, 68, 0.6);
}
.extract-indicator.extract-failed .extract-spinner {
  border: 2px solid var(--accent-red, #ef4444);
  border-top-color: var(--accent-red, #ef4444);
  animation: none;
  position: relative;
}
.extract-indicator.extract-failed .extract-spinner::after {
  content: '\f00d';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--accent-red, #ef4444);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.8rem;
}

@media (max-width: 640px) {
  .extract-indicator {
    right: 12px;
    bottom: 84px;
    min-width: 180px;
    max-width: calc(100vw - 24px);
    padding: 10px 12px;
  }
  .extract-title { font-size: 0.78rem; }
}

/* Horizontal track scroller (home "Recently Added") */
.track-scroller {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 2px 20px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}
.track-scroller::-webkit-scrollbar { height: 8px; }
.track-scroller::-webkit-scrollbar-track { background: transparent; }
.track-scroller::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
}
.track-scroller::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }

.track-scroller .track-card {
  flex: 0 0 auto;
  width: 180px;
  scroll-snap-align: start;
}
@media (max-width: 640px) {
  .track-scroller { gap: 12px; padding: 6px 2px 16px; }
  .track-scroller .track-card { width: 140px; }
}

/* Clickable track row */
.track-row { cursor: pointer; }
.track-row:hover { background: rgba(255, 255, 255, 0.03); }
.track-row:active { background: rgba(255, 255, 255, 0.06); }

/* ============================================
   Full-Screen Now Playing
   ============================================ */
.now-playing {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: none;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.now-playing.np-open {
  opacity: 1;
  transform: translateY(0);
}

/* Blurred album art background */
.np-bg {
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center;
  filter: blur(60px) saturate(1.4) brightness(0.55);
  transform: scale(1.15);
  z-index: 0;
}
.np-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.75) 100%);
  z-index: 1;
}

/* Water droplets */
.np-droplets {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}
.np-droplets span {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.6), rgba(255,255,255,0.08) 60%, transparent 75%);
  box-shadow: 0 0 12px rgba(255,255,255,0.25), inset 0 0 6px rgba(255,255,255,0.4);
  backdrop-filter: blur(2px);
  opacity: 0.7;
  animation: dropletFloat 8s ease-in-out infinite;
}
.np-droplets span:nth-child(1)  { top: 8%;  left: 12%; width: 28px; height: 28px; animation-delay: 0s;   }
.np-droplets span:nth-child(2)  { top: 20%; left: 80%; width: 22px; height: 22px; animation-delay: 1.2s; }
.np-droplets span:nth-child(3)  { top: 35%; left: 6%;  width: 36px; height: 36px; animation-delay: 2.4s; }
.np-droplets span:nth-child(4)  { top: 50%; left: 88%; width: 18px; height: 18px; animation-delay: 0.8s; }
.np-droplets span:nth-child(5)  { top: 65%; left: 10%; width: 26px; height: 26px; animation-delay: 3.1s; }
.np-droplets span:nth-child(6)  { top: 75%; left: 82%; width: 32px; height: 32px; animation-delay: 1.8s; }
.np-droplets span:nth-child(7)  { top: 15%; left: 50%; width: 14px; height: 14px; animation-delay: 2.0s; }
.np-droplets span:nth-child(8)  { top: 45%; left: 35%; width: 20px; height: 20px; animation-delay: 0.5s; }
.np-droplets span:nth-child(9)  { top: 60%; left: 55%; width: 24px; height: 24px; animation-delay: 3.5s; }
.np-droplets span:nth-child(10) { top: 85%; left: 40%; width: 16px; height: 16px; animation-delay: 1.5s; }
.np-droplets span:nth-child(11) { top: 28%; left: 28%; width: 12px; height: 12px; animation-delay: 4.0s; }
.np-droplets span:nth-child(12) { top: 70%; left: 65%; width: 30px; height: 30px; animation-delay: 2.8s; }

@keyframes dropletFloat {
  0%, 100% { transform: translate(0, 0) scale(1);   opacity: 0.7; }
  25%      { transform: translate(8px, -12px) scale(1.1); opacity: 0.9; }
  50%      { transform: translate(-6px, -20px) scale(0.95); opacity: 0.5; }
  75%      { transform: translate(10px, -10px) scale(1.05); opacity: 0.8; }
}

/* Top bar */
.np-topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
}
.np-top-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3rem;
  color: rgba(255, 255, 255, 0.7);
}
.np-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.np-icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

/* Main content */
.np-content {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 24px 40px;
  gap: 20px;
  overflow-y: auto;
}

/* Album cover with glow */
.np-cover-wrap {
  position: relative;
  width: min(320px, 72vw);
  aspect-ratio: 1;
  flex-shrink: 0;
}
.np-cover-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  filter: blur(30px);
  animation: coverPulse 4s ease-in-out infinite;
}
@keyframes coverPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 0.8; transform: scale(1.05); }
}
.np-cover {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(255, 255, 255, 0.1);
  animation: coverFloat 6s ease-in-out infinite;
  background: #1a1a2e;
}
.np-cover-upload {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  z-index: 2;
  transition: all 0.2s ease;
}
.np-cover-upload:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.08);
}
@keyframes coverFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

/* Meta */
.np-meta {
  text-align: center;
  max-width: 560px;
}
.np-title {
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90vw;
}
.np-artist {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  font-weight: 400;
}

/* Progress */
.np-progress-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(560px, 90vw);
}
.np-time {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
  font-variant-numeric: tabular-nums;
  min-width: 40px;
  text-align: center;
}
.np-progress-bar {
  position: relative;
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  cursor: pointer;
}
.np-progress-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0.8));
  border-radius: 3px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}
.np-progress-dot {
  position: absolute;
  top: 50%;
  left: 0;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.np-progress-bar:hover .np-progress-dot {
  opacity: 1;
}

/* Controls */
.np-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-top: 6px;
}
.np-ctrl-btn {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.np-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: scale(1.08);
}
.np-ctrl-btn.active { color: var(--accent-red, #ef4444); }
.np-play-btn {
  width: 70px;
  height: 70px;
  background: #fff;
  color: #000;
  font-size: 1.4rem;
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.25);
}
.np-play-btn:hover {
  background: #fff;
  color: #000;
  transform: scale(1.08);
  box-shadow: 0 10px 40px rgba(255, 255, 255, 0.4);
}

/* Bottom actions */
.np-actions {
  display: flex;
  gap: 14px;
  margin-top: 8px;
}
.np-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}
.np-action-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}
.np-action-btn.active {
  color: var(--accent-red, #ef4444);
  border-color: rgba(239, 68, 68, 0.5);
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .np-cover-wrap { width: 78vw; }
  .np-controls { gap: 14px; }
  .np-play-btn { width: 62px; height: 62px; }
  .np-ctrl-btn { width: 42px; height: 42px; font-size: 1rem; }
  .np-topbar { padding: 16px 18px; }
  .np-content { padding: 0 18px 30px; gap: 14px; }
  .np-action-btn { padding: 8px 14px; font-size: 0.78rem; }
}

/* ============================================
   Admin Settings Toggles
   ============================================ */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.settings-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  padding: 12px;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 8px;
  transition: border-color 0.2s ease;
}
.settings-toggle:hover { border-color: rgba(255, 255, 255, 0.2); }
.settings-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.toggle-slider {
  position: relative;
  width: 42px;
  height: 24px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  transition: background 0.2s ease;
  flex-shrink: 0;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s ease;
}
.settings-toggle input:checked + .toggle-slider {
  background: #10b981;
}
.settings-toggle input:checked + .toggle-slider::before {
  transform: translateX(18px);
}
.toggle-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.toggle-label strong {
  font-size: 0.95rem;
  color: var(--text-primary, #fff);
}
.toggle-label strong i { margin-right: 6px; }
.toggle-label small {
  font-size: 0.8rem;
  color: var(--text-muted, #888);
}

/* ============================================
   Donate Button + Modal
   ============================================ */
.donate-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 77, 109, 0.5);
  background: rgba(255, 77, 109, 0.08);
  color: #ff4d6d;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  transition: all 0.25s ease;
  box-shadow: 0 0 12px rgba(255, 77, 109, 0.25);
  animation: donatePulse 2s ease-in-out infinite;
}
.donate-btn:hover {
  background: #ff4d6d;
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(255, 77, 109, 0.7);
}
@keyframes donatePulse {
  0%, 100% { box-shadow: 0 0 8px rgba(255, 77, 109, 0.25); }
  50%      { box-shadow: 0 0 18px rgba(255, 77, 109, 0.55); }
}

.donate-modal .donate-card {
  max-width: 420px;
  width: 100%;
}
.donate-body {
  text-align: center;
  padding: 1rem 1.5rem 1.5rem;
}
.donate-message {
  color: var(--text-secondary, #ccc);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.donate-qr-wrap {
  display: flex;
  justify-content: center;
  padding: 1rem;
  background: #fff;
  border-radius: 12px;
  margin: 0 auto 1.25rem;
  max-width: 280px;
  box-shadow: 0 0 24px rgba(255, 77, 109, 0.35);
}
.donate-qr {
  width: 100%;
  max-width: 240px;
  height: auto;
  display: block;
}
.donate-thanks {
  color: #ff4d6d;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
}
.donate-thanks i {
  animation: heartBeat 1.2s ease-in-out infinite;
  display: inline-block;
}
@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.25); }
}
