/* ======================================================
   RSX CONCEPT — Design System
   Premium event/DJ aesthetic: deep night + neon blue + red accent
   ====================================================== */

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

:root {
  /* Palette */
  --bg-0: #04060e;
  --bg-1: #08101e;
  --bg-2: #0d182d;
  --surface: rgba(15, 25, 45, 0.6);
  --surface-strong: rgba(20, 32, 58, 0.85);
  --border: rgba(80, 140, 255, 0.18);
  --border-strong: rgba(80, 140, 255, 0.45);

  --neon-blue: #2b7bff;
  --neon-blue-bright: #4d9bff;
  --neon-red: #ff2e4d;
  --neon-red-bright: #ff5870;
  --neon-cyan: #25e0ff;
  --neon-violet: #7b6cff;

  --text: #eaf2ff;
  --text-dim: #8a9bbd;
  --text-faint: #4f5d7a;

  --success: #2bd97a;
  --warning: #ffb547;
  --danger: #ff2e4d;

  /* Typo */
  --font-display: 'Bebas Neue', 'Impact', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Effets */
  --glow-blue: 0 0 24px rgba(43, 123, 255, 0.55), 0 0 48px rgba(43, 123, 255, 0.25);
  --glow-red: 0 0 24px rgba(255, 46, 77, 0.55), 0 0 48px rgba(255, 46, 77, 0.25);
  --glow-soft: 0 0 32px rgba(43, 123, 255, 0.2);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
}

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

html, body {
  height: 100%;
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(43, 123, 255, 0.18), transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(255, 46, 77, 0.1), transparent 60%),
    radial-gradient(ellipse 60% 40% at 10% 90%, rgba(43, 123, 255, 0.08), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0));
  min-height: 100vh;
  position: relative;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(80, 140, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 140, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1), rgba(0,0,0,0) 80%);
}

body::after {
  content: '';
  position: fixed; inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
  mix-blend-mode: overlay;
}

/* Layout helpers */
.app { position: relative; z-index: 1; min-height: 100vh; }
.container { max-width: 1400px; margin: 0 auto; padding: 24px; }

/* Typography */
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.02em; line-height: 1; }
h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.text-dim { color: var(--text-dim); }
.text-mono { font-family: var(--font-mono); }

/* Cards */
.card {
  background: linear-gradient(180deg, var(--surface), var(--surface-strong));
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, rgba(80, 140, 255, 0.4), transparent 30%, transparent 70%, rgba(255, 46, 77, 0.3));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.6;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: rgba(43, 123, 255, 0.08);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  background: rgba(43, 123, 255, 0.18);
  border-color: var(--neon-blue);
  box-shadow: var(--glow-blue);
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon-blue), #1a5cd9);
  border-color: var(--neon-blue);
  box-shadow: var(--glow-blue);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--neon-blue-bright), var(--neon-blue)); }

.btn-danger {
  background: linear-gradient(135deg, var(--neon-red), #d11636);
  border-color: var(--neon-red);
  box-shadow: var(--glow-red);
}
.btn-danger:hover { background: linear-gradient(135deg, var(--neon-red-bright), var(--neon-red)); }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
}
.btn-ghost:hover { background: rgba(80, 140, 255, 0.08); }

.btn-lg { padding: 16px 28px; font-size: 1rem; }
.btn-sm { padding: 8px 14px; font-size: 0.8rem; }
.btn-icon { padding: 10px; aspect-ratio: 1; }
.btn-block { display: flex; width: 100%; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

/* Inputs */
.input, .select, .textarea {
  width: 100%;
  padding: 12px 14px;
  background: rgba(8, 16, 32, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all 0.2s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 3px rgba(43, 123, 255, 0.15);
}
.textarea { min-height: 100px; resize: vertical; font-family: inherit; }
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 6px;
}

/* Toggle switch */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.switch input { display: none; }
.switch-track {
  width: 44px; height: 24px;
  background: rgba(80, 140, 255, 0.12);
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative;
  transition: 0.2s;
}
.switch-track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: var(--text-dim);
  border-radius: 50%;
  transition: 0.2s;
}
.switch input:checked + .switch-track {
  background: rgba(43, 123, 255, 0.3);
  border-color: var(--neon-blue);
  box-shadow: var(--glow-blue);
}
.switch input:checked + .switch-track::after {
  left: 22px;
  background: var(--neon-blue-bright);
}

/* Pills / Badges */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(43, 123, 255, 0.12);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--neon-blue-bright);
}
.pill-red { background: rgba(255, 46, 77, 0.12); border-color: rgba(255, 46, 77, 0.3); color: var(--neon-red-bright); }
.pill-green { background: rgba(43, 217, 122, 0.12); border-color: rgba(43, 217, 122, 0.3); color: var(--success); }
.pill-dim { background: rgba(255,255,255,0.04); border-color: var(--border); color: var(--text-dim); }

.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--neon-blue);
  box-shadow: 0 0 10px currentColor;
  display: inline-block;
}
.dot-red { background: var(--neon-red); }
.dot-green { background: var(--success); }
.dot-pulse { animation: pulse 1.4s ease-in-out infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* Avatar */
.avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-violet));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: white;
  border: 2px solid rgba(255,255,255,0.1);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 80px; height: 80px; font-size: 2rem; }
.avatar-xl { width: 140px; height: 140px; font-size: 3.5rem; border-width: 3px; }
.avatar-glow { box-shadow: var(--glow-blue); }

/* Grids */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.flex { display: flex; gap: 12px; }
.flex-col { display: flex; flex-direction: column; gap: 12px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.flex-center { display: flex; justify-content: center; align-items: center; gap: 12px; }

/* Glow text */
.neon-text {
  color: var(--neon-blue-bright);
  text-shadow: 0 0 16px rgba(43, 123, 255, 0.7), 0 0 32px rgba(43, 123, 255, 0.4);
}
.neon-text-red {
  color: var(--neon-red-bright);
  text-shadow: 0 0 16px rgba(255, 46, 77, 0.7), 0 0 32px rgba(255, 46, 77, 0.4);
}

/* Toast */
.toast-container {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  padding: 14px 18px;
  background: var(--surface-strong);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  box-shadow: var(--glow-soft);
  animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
  min-width: 240px;
  font-size: 0.9rem;
}
.toast.success { border-color: var(--success); box-shadow: 0 0 20px rgba(43, 217, 122, 0.4); }
.toast.error { border-color: var(--danger); box-shadow: var(--glow-red); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
  to { opacity: 0; transform: translateX(20px); }
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-overlay.active { display: flex; animation: fadeIn 0.2s ease; }
.modal {
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 540px;
  width: 100%;
  margin: 40px auto;
  max-height: 80vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(43,123,255,0.3) transparent;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), var(--glow-blue);
  animation: modalIn 0.3s ease;
}
.modal::-webkit-scrollbar { width: 6px; }
.modal::-webkit-scrollbar-track { background: transparent; }
.modal::-webkit-scrollbar-thumb { background: rgba(43,123,255,0.3); border-radius: 3px; }
@keyframes modalIn {
  from { transform: scale(0.9) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Logo */
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand-logo img { height: 48px; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.1em;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
::-webkit-scrollbar-thumb { background: rgba(80, 140, 255, 0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(80, 140, 255, 0.5); }

/* Equalizer animation */
.eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 24px;
}
.eq span {
  width: 3px;
  background: linear-gradient(180deg, var(--neon-blue-bright), var(--neon-blue));
  border-radius: 2px;
  animation: eqBar 0.8s ease-in-out infinite;
}
.eq span:nth-child(1) { animation-delay: 0s; }
.eq span:nth-child(2) { animation-delay: 0.15s; }
.eq span:nth-child(3) { animation-delay: 0.3s; }
.eq span:nth-child(4) { animation-delay: 0.1s; }
.eq span:nth-child(5) { animation-delay: 0.25s; }

@keyframes eqBar {
  0%, 100% { height: 30%; }
  50% { height: 100%; }
}

/* Utility */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }
.w-full { width: 100%; }

@media (max-width: 768px) {
  .container { padding: 16px; }
  .card { padding: 18px; }
  h1 { font-size: 2.2rem; }
}
