/* ════════════════════════════════════════════
   VIRTUAL DJ — Design System
   ════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;900&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Palette */
  --bg-base:        #07070f;
  --bg-surface:     #0e0e1c;
  --bg-card:        rgba(255,255,255,0.04);
  --bg-card-hover:  rgba(255,255,255,0.07);
  --bg-input:       rgba(255,255,255,0.06);

  --purple-300: #d8b4fe;
  --purple-400: #c084fc;
  --purple-500: #a855f7;
  --purple-600: #9333ea;
  --purple-700: #7c3aed;
  --cyan-400:   #22d3ee;
  --cyan-500:   #06b6d4;
  --pink-400:   #f472b6;
  --pink-500:   #ec4899;
  --green-400:  #4ade80;
  --amber-400:  #fbbf24;
  --red-400:    #f87171;

  --text-primary:   #f0f0f8;
  --text-secondary: #8888a8;
  --text-muted:     #4a4a6a;

  --border:        rgba(255,255,255,0.07);
  --border-active: rgba(168,85,247,0.5);
  --border-cyan:   rgba(6,182,212,0.4);

  --grad-primary:  linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
  --grad-purple:   linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  --grad-surface:  linear-gradient(180deg, rgba(124,58,237,0.06) 0%, transparent 100%);
  --grad-shine:    linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);

  --glow-purple: 0 0 40px rgba(168,85,247,0.35);
  --glow-cyan:   0 0 40px rgba(6,182,212,0.3);
  --shadow-card: 0 8px 40px rgba(0,0,0,0.5);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --blur:      blur(24px);
  --blur-sm:   blur(12px);
  --transition: all 0.28s cubic-bezier(0.4,0,0.2,1);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Ambient background blobs */
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 15% 10%, rgba(124,58,237,0.13) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 85% 85%, rgba(6,182,212,0.09) 0%, transparent 55%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(236,72,153,0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── TYPOGRAPHY ── */
h1,h2,h3,h4 { font-family:'Outfit',sans-serif; font-weight:700; line-height:1.2; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.2rem; }

/* ── LAYOUT ── */
.page { position: relative; z-index: 1; min-height: 100vh; }

.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--wide {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── NAVBAR ── */
.navbar {
  position: sticky; top: 0; z-index: 200;
  background: rgba(7,7,15,0.85);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 1.5rem;
}

.navbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto;
}

.logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 900; font-size: 1.35rem;
  background: var(--grad-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none; letter-spacing: -0.5px;
}

.logo span { opacity: 0.7; }

.nav-links { display: flex; gap: 0.25rem; }

.nav-link {
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem; font-weight: 500;
  transition: var(--transition);
}

.nav-link:hover  { color: var(--text-primary); background: var(--bg-card); }
.nav-link.active { color: var(--purple-400); background: rgba(168,85,247,0.1); }

/* ── GLASS CARD ── */
.glass {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.glass--glow:hover { border-color: rgba(168,85,247,0.25); box-shadow: var(--glow-purple), var(--shadow-card); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  border: none; cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem; font-weight: 600;
  transition: var(--transition);
  text-decoration: none; user-select: none;
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(124,58,237,0.6); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-card-hover); color: var(--text-primary); border-color: rgba(168,85,247,0.3); }

.btn-danger {
  background: rgba(239,68,68,0.12);
  color: var(--red-400);
  border: 1px solid rgba(239,68,68,0.25);
}
.btn-danger:hover { background: rgba(239,68,68,0.22); border-color: rgba(239,68,68,0.5); }

.btn-censure {
  background: rgba(251,191,36,0.1);
  color: var(--amber-400);
  border: 1px solid rgba(251,191,36,0.25);
}
.btn-censure:hover { background: rgba(251,191,36,0.2); }

.btn-sm  { padding: 0.4rem 0.85rem; font-size: 0.78rem; border-radius: 6px; }
.btn-xs  { padding: 0.28rem 0.65rem; font-size: 0.72rem; border-radius: 5px; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 50%; }
.btn-icon-sm { width: 32px; height: 32px; padding: 0; border-radius: 50%; }

/* ── VOTE BUTTON ── */
.vote-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer; font-size: 0.82rem; font-weight: 600;
  transition: var(--transition); user-select: none;
}
.vote-btn:hover { border-color: var(--purple-500); color: var(--purple-400); background: rgba(168,85,247,0.08); }
.vote-btn.voted { border-color: var(--purple-500); color: var(--purple-400); background: rgba(168,85,247,0.15); }

/* ── BADGES ── */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.22rem 0.65rem;
  border-radius: 20px;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.6px;
  text-transform: uppercase;
}

.badge-live    { background: rgba(239,68,68,0.18);  color: var(--red-400);   border: 1px solid rgba(239,68,68,0.35);  animation: pulse-badge 2s infinite; }
.badge-request { background: rgba(168,85,247,0.18); color: var(--purple-400); border: 1px solid rgba(168,85,247,0.4); }
.badge-library { background: rgba(6,182,212,0.13);  color: var(--cyan-400);  border: 1px solid rgba(6,182,212,0.3);  }
.badge-queued  { background: rgba(251,191,36,0.13); color: var(--amber-400); border: 1px solid rgba(251,191,36,0.3); }
.badge-playing { background: rgba(74,222,128,0.13); color: var(--green-400); border: 1px solid rgba(74,222,128,0.3); animation: pulse-badge 2s infinite; }
.badge-err     { background: rgba(239,68,68,0.12);  color: var(--red-400);   border: 1px solid rgba(239,68,68,0.3);  }

.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ── INPUT ── */
.input-group { display: flex; gap: 0.75rem; }

.input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.2rem;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif; font-size: 0.95rem;
  outline: none; transition: var(--transition);
}
.input::placeholder { color: var(--text-muted); }
.input:focus {
  border-color: var(--purple-500);
  background: rgba(168,85,247,0.06);
  box-shadow: 0 0 0 3px rgba(168,85,247,0.12);
}

/* ── PROGRESS BAR ── */
.progress-wrap {
  height: 4px; background: rgba(255,255,255,0.07);
  border-radius: 2px; overflow: hidden; cursor: pointer;
  position: relative;
}
.progress-fill {
  height: 100%; border-radius: 2px;
  background: var(--grad-primary);
  transition: width 0.6s linear;
}
.progress-wrap:hover .progress-fill { filter: brightness(1.2); }

/* ── SECTION HEADER ── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem;
}
.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-muted);
}

/* ── ANIMATIONS ── */
@keyframes pulse-badge {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.65; }
}

@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

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

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

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

@keyframes progress-stripe {
  0%   { background-position: 0 0; }
  100% { background-position: 40px 0; }
}

.anim-fade-in-up { animation: fadeInUp 0.4s ease both; }

/* ── TOAST ── */
.toast-container {
  position: fixed; bottom: 2rem; right: 2rem;
  z-index: 9999; display: flex; flex-direction: column-reverse; gap: 0.75rem;
}

.toast {
  padding: 0.85rem 1.2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  animation: slideInRight 0.3s ease;
  box-shadow: var(--shadow-card);
  max-width: 340px; min-width: 220px;
  display: flex; align-items: center; gap: 0.6rem;
}
.toast-success { border-color: rgba(74,222,128,0.4); }
.toast-error   { border-color: rgba(239,68,68,0.4); }
.toast-info    { border-color: rgba(168,85,247,0.4); }
.toast-icon    { font-size: 1.1rem; flex-shrink: 0; }

/* ── SPINNER ── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--purple-500);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block; flex-shrink: 0;
}
.spinner-sm { width: 14px; height: 14px; }

/* ── DIVIDER ── */
.divider {
  border: none; border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center; padding: 3rem 1.5rem;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state p    { font-size: 0.9rem; line-height: 1.6; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar       { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(168,85,247,0.4); }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  .container, .container--wide { padding: 0 1rem; }
  .nav-links .nav-link { padding: 0.4rem 0.7rem; font-size: 0.8rem; }
}
