@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;500;600;700&display=swap');

/* ─── Design Tokens ─── */
:root {
  /* Backgrounds */
  --cream: #0d0d1a;
  --cream-dark: #13132a;
  --cream-darker: #1e1e3a;

  /* Accent */
  --mint: #39ff8f;
  --mint-dark: #00cc66;
  --mint-light: rgba(57,255,143,0.12);

  /* Text */
  --ink: #f0eeff;
  --ink-soft: #b8b4d8;
  --ink-muted: #6e6a90;

  /* Status */
  --red: #ff4d6d;
  --gold: #f5c842;
  --white: #161628;

  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow: 0 2px 16px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 28px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);
  --transition: all 0.2s cubic-bezier(0.4,0,0.2,1);

  /* Purple accents */
  --purple: #7c3aed;
  --purple-light: rgba(124,58,237,0.15);
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Subtle noise/grid overlay for depth */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 15% 50%, rgba(124,58,237,0.13) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 15%, rgba(57,255,143,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 90%, rgba(124,58,237,0.06) 0%, transparent 45%);
  pointer-events: none;
  z-index: 0;
}

/* ─── Typography ─── */
h1, h2, h3, h4 { font-family: 'Bebas Neue', sans-serif; line-height: 1.1; letter-spacing: 0.04em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 400; }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 400; }
h3 { font-size: 1.4rem; font-weight: 400; }
p { color: var(--ink-soft); }
a { color: inherit; text-decoration: none; }

/* ─── Layout ─── */
.container { max-width: 900px; margin: 0 auto; padding: 0 1.25rem; position: relative; z-index: 1; }
.container-sm { max-width: 520px; margin: 0 auto; padding: 0 1.25rem; position: relative; z-index: 1; }

/* ─── Navbar ─── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,26,0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(57,255,143,0.12);
  padding: 0.85rem 0;
}
.navbar .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.navbar .logo {
  display: flex;
  align-items: center;
  opacity: 1;
  transition: opacity 0.2s;
}
.navbar .logo:hover { opacity: 0.8; }
.navbar-actions { display: flex; gap: 0.75rem; align-items: center; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1;
  letter-spacing: 0.02em;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary {
  background: var(--mint);
  color: #0d0d1a;
  box-shadow: 0 0 0 0 rgba(57,255,143,0);
  transition: var(--transition), box-shadow 0.2s ease;
}
.btn-primary:hover:not(:disabled) {
  background: #55ffaa;
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(57,255,143,0.45), 0 0 0 0 rgba(57,255,143,0);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); box-shadow: 0 2px 12px rgba(57,255,143,0.3); }
.btn-mint {
  background: var(--mint);
  color: #0d0d1a;
}
.btn-mint:hover:not(:disabled) { background: #55ffaa; transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--cream-darker);
}
.btn-outline:hover:not(:disabled) {
  border-color: var(--mint);
  color: var(--mint);
  background: var(--mint-light);
  box-shadow: 0 0 12px rgba(57,255,143,0.1);
}
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
}
.btn-ghost:hover:not(:disabled) { background: var(--cream-darker); color: var(--ink); }
.btn-danger {
  background: transparent;
  color: var(--red);
  border: 1.5px solid transparent;
}
.btn-danger:hover:not(:disabled) { background: rgba(255,77,109,0.1); border-color: var(--red); }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.78rem; }
.btn-lg { padding: 0.9rem 1.8rem; font-size: 1rem; }

/* ─── Cards ─── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--cream-darker);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.04); }
.card-body { padding: 1.5rem; }
.card-header {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--cream-darker);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* ─── Forms ─── */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.form-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--cream-darker);
  border-radius: var(--radius-sm);
  background: var(--cream-dark);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: var(--transition);
}
.form-input::placeholder { color: var(--ink-muted); }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--mint);
  background: var(--cream-dark);
  box-shadow: 0 0 0 3px rgba(57,255,143,0.15), 0 0 16px rgba(57,255,143,0.08);
}
.form-textarea { resize: vertical; min-height: 80px; }

/* ─── Badges ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-active { background: rgba(57,255,143,0.15); color: var(--mint); border: 1px solid rgba(57,255,143,0.3); }
.badge-closed { background: var(--cream-darker); color: var(--ink-muted); }
.badge-pending { background: rgba(245,200,66,0.12); color: var(--gold); border: 1px solid rgba(245,200,66,0.25); }
.badge-accepted { background: rgba(57,255,143,0.12); color: var(--mint-dark); border: 1px solid rgba(57,255,143,0.2); }
.badge-played { background: var(--cream-darker); color: var(--ink-muted); }
.badge-ignored { background: rgba(255,77,109,0.1); color: var(--red); border: 1px solid rgba(255,77,109,0.2); }

/* ─── Alerts ─── */
.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 1rem;
}
.alert-error { background: rgba(255,77,109,0.1); color: #ff8099; border: 1px solid rgba(255,77,109,0.25); }
.alert-success { background: var(--mint-light); color: var(--mint); border: 1px solid rgba(57,255,143,0.25); }
.alert-info { background: rgba(124,58,237,0.1); color: #b48cff; border: 1px solid rgba(124,58,237,0.25); }

/* ─── Vote Button ─── */
.vote-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--cream-darker);
  border: 1.5px solid rgba(255,255,255,0.06);
  cursor: pointer;
  transition: var(--transition);
  min-width: 52px;
  font-family: 'Inter', sans-serif;
}
.vote-btn .vote-count {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
.vote-btn .vote-label {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.vote-btn:hover:not(.voted):not(:disabled) {
  background: var(--mint-light);
  border-color: var(--mint);
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(57,255,143,0.2);
}
.vote-btn:active:not(.voted):not(:disabled) { transform: scale(0.95); }
.vote-btn.voted {
  background: var(--mint-light);
  border-color: var(--mint);
  cursor: default;
  box-shadow: 0 0 10px rgba(57,255,143,0.2);
}
.vote-btn.voted .vote-count { color: var(--mint); }
.vote-btn.voted .vote-label { color: var(--mint-dark); }

/* ─── Request Card ─── */
.request-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--cream-darker);
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  transition: var(--transition);
}
.request-card:hover {
  border-color: rgba(57,255,143,0.25);
  border-left-color: var(--mint);
  box-shadow: 0 4px 20px rgba(57,255,143,0.08);
  transform: translateX(2px);
}
.request-card .song-info { flex: 1; min-width: 0; }
.request-card .song-title {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}
.request-card .song-artist {
  font-size: 0.83rem;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.request-card .song-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.request-card .song-time { font-size: 0.75rem; color: var(--ink-muted); }

/* ─── Empty State ─── */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--ink-muted);
}
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.empty-state p { font-size: 0.9rem; }

/* ─── Modal ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--cream-darker);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.2s cubic-bezier(0.4,0,0.2,1);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--cream-darker);
}
.modal-body { padding: 1.5rem; }
.modal-footer {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--cream-darker);
}

/* ─── Loading ─── */
.spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2.5px solid var(--cream-darker);
  border-top-color: var(--mint);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Divider ─── */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--ink-muted);
  font-size: 0.8rem;
  margin: 1.25rem 0;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--cream-darker);
}

/* ─── Utility ─── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.text-muted { color: var(--ink-muted); }
.text-sm { font-size: 0.85rem; }
.font-semibold { font-weight: 600; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ─── Page Header ─── */
.page-header {
  padding: 2.5rem 0 1.5rem;
}
.page-header .breadcrumb {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
}
.page-header .breadcrumb a { color: var(--mint); }
.page-header .breadcrumb a:hover { text-decoration: underline; }

/* ─── Tip Section ─── */
.tip-section {
  background: linear-gradient(135deg, var(--cream-dark), rgba(124,58,237,0.15));
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}
.tip-section h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.tip-section p { font-size: 0.82rem; color: var(--ink-soft); margin-bottom: 1rem; }

/* ─── QR Section ─── */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
}
.qr-container img {
  border-radius: var(--radius);
  border: 3px solid var(--cream-darker);
  max-width: 200px;
  width: 100%;
}

/* ─── Request Queue Status Tabs ─── */
.status-tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--cream-dark);
  border-radius: var(--radius-sm);
  padding: 0.3rem;
  margin-bottom: 1.25rem;
}
.status-tab {
  flex: 1;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
  text-align: center;
  letter-spacing: 0.02em;
}
.status-tab.active {
  background: var(--cream-darker);
  color: var(--mint);
  box-shadow: var(--shadow);
}

/* ─── DJ Request Card (manage view) ─── */
.dj-request-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--cream-darker);
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  margin-bottom: 0.6rem;
  transition: var(--transition);
}
.dj-request-card:hover {
  border-color: rgba(57,255,143,0.2);
  border-left-color: var(--mint);
  box-shadow: 0 4px 20px rgba(57,255,143,0.08);
}
.dj-request-card .vote-pill {
  background: var(--cream-darker);
  border-radius: 100px;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.dj-request-card .actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.dj-request-card .song-info { flex: 1; }

/* ─── Responsive ─── */
@media (max-width: 600px) {
  .dj-request-card { flex-direction: column; }
  .dj-request-card .actions { width: 100%; }
  .dj-request-card .actions .btn { flex: 1; }
  .modal-footer { flex-direction: column; }
  .modal-footer .btn { width: 100%; }
}

/* ─── Light Mode ─── */
body.light-mode {
  --cream: #f0f0f8;
  --cream-dark: #ffffff;
  --cream-darker: #dcdce8;
  --ink: #1a1a2e;
  --ink-soft: #3a3a5c;
  --ink-muted: #7070a0;
  --white: #ffffff;
}
body.light-mode .navbar .logo img { filter: invert(1); }

body.light-mode .navbar {
  background: rgba(240,240,248,0.92);
  border-bottom-color: rgba(57,255,143,0.2);
}
body.light-mode .card {
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
body.light-mode .form-input,
body.light-mode .form-select,
body.light-mode .form-textarea {
  background: #ffffff;
  border-color: #c8c8dc;
  color: var(--ink);
}
body.light-mode .form-input::placeholder { color: #a0a0c0; }
body.light-mode .modal { background: #ffffff; }
body.light-mode .status-tab { color: #7070a0; }
body.light-mode .status-tab.active { background: #ffffff; color: var(--mint-dark); }
body.light-mode .dj-request-card,
body.light-mode .request-card { background: #ffffff; border-color: #dcdce8; }
body.light-mode .vote-btn { background: #f0f0f8; border-color: #dcdce8; }
body.light-mode body::before {
  background-image:
    radial-gradient(ellipse at 15% 50%, rgba(124,58,237,0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 15%, rgba(57,255,143,0.05) 0%, transparent 50%);
}
