:root {
  --primary: #8b7ec8;
  --primary-dark: #6f60b8;
  --accent: #c9a84c;
  --accent-silver: #b0b8c8;
  --bg-dark: #060610;
  --bg-card: rgba(12, 12, 28, 0.85);
  --bg-input: rgba(18, 18, 40, 0.9);
  --text: #d8d4e8;
  --text-muted: #7a7498;
  --danger: #d45c5c;
  --success: #5cb87a;
  --warning: #c9a84c;
  --border: rgba(180, 160, 220, 0.12);
  --gold: #c9a84c;
  --silver: #b0b8c8;
  --gold-glow: rgba(201, 168, 76, 0.3);
  --silver-glow: rgba(176, 184, 200, 0.2);
}

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

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* ========================================
   STARFIELD BACKGROUND
   ======================================== */
.starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.starfield canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Ensure content floats above stars */
body > *:not(.starfield):not(.toast-container) {
  position: relative;
  z-index: 1;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--gold); }

/* ========================================
   NAV
   ======================================== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(6, 6, 16, 0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
}

.navbar .logo i { color: var(--gold); font-size: 1rem; }

.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s;
  font-size: 0.9rem;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ========================================
   BUTTONS — gold-silver outline theme
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  border: 1.5px solid transparent;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  background: transparent;
  color: var(--text);
}

.btn-primary {
  background: rgba(139, 126, 200, 0.12);
  border-color: var(--gold);
  color: var(--gold);
}
.btn-primary:hover {
  background: rgba(201, 168, 76, 0.15);
  box-shadow: 0 0 12px var(--gold-glow);
  transform: translateY(-1px);
}

.btn-accent {
  background: rgba(176, 184, 200, 0.08);
  border-color: var(--silver);
  color: var(--silver);
}
.btn-accent:hover {
  background: rgba(176, 184, 200, 0.15);
  box-shadow: 0 0 12px var(--silver-glow);
}

.btn-danger {
  background: rgba(212, 92, 92, 0.12);
  border-color: var(--danger);
  color: var(--danger);
}
.btn-danger:hover {
  background: rgba(212, 92, 92, 0.2);
  box-shadow: 0 0 10px rgba(212, 92, 92, 0.25);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.btn-send {
  background: rgba(92, 184, 122, 0.12);
  border-color: var(--success);
  color: var(--success);
  font-weight: 700;
}
.btn-send:hover { background: rgba(92, 184, 122, 0.2); box-shadow: 0 0 10px rgba(92, 184, 122, 0.25); transform: translateY(-1px); }
.btn-send:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-sm { padding: 0.4rem 1rem; font-size: 0.82rem; }
.btn-lg { padding: 0.8rem 2rem; font-size: 1.05rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ========================================
   CARDS
   ======================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  backdrop-filter: blur(8px);
}

/* ========================================
   FORMS
   ======================================== */
.form-group { margin-bottom: 1.2rem; }
.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 8px var(--gold-glow);
}

/* ========================================
   BADGES
   ======================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.7rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-online { background: rgba(92, 184, 122, 0.12); color: var(--success); }
.badge-offline { background: rgba(122, 116, 152, 0.12); color: var(--text-muted); }
.badge-live { background: rgba(212, 92, 92, 0.12); color: var(--danger); animation: pulse 2s infinite; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

/* ========================================
   LAYOUT
   ======================================== */
.container { max-width: 1100px; margin: 0 auto; padding: 2rem; }
.page-header { margin-bottom: 2rem; }
.page-header h1 { font-size: 1.8rem; font-weight: 800; }
.page-header p { color: var(--text-muted); margin-top: 0.3rem; }

/* Grid */
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

/* ========================================
   CLIENT CARD
   ======================================== */
.client-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem;
  transition: all 0.25s;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.client-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--gold-glow);
}
.client-card .client-name { font-weight: 700; font-size: 1.05rem; margin-bottom: 0.3rem; }
.client-card .client-meta { color: var(--text-muted); font-size: 0.85rem; }

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

.toast {
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  animation: slideIn 0.3s ease;
  max-width: 350px;
  border: 1px solid transparent;
}

.toast-success { background: rgba(92, 184, 122, 0.15); color: var(--success); border-color: rgba(92, 184, 122, 0.3); }
.toast-error { background: rgba(212, 92, 92, 0.15); color: var(--danger); border-color: rgba(212, 92, 92, 0.3); }
.toast-info { background: rgba(139, 126, 200, 0.15); color: var(--primary); border-color: rgba(139, 126, 200, 0.3); }

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

/* ========================================
   SLIDER
   ======================================== */
.slider-group { margin-bottom: 1rem; }
.slider-group label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  font-weight: 600;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(18, 18, 40, 0.9);
  border-radius: 3px;
  outline: none;
  border: 1px solid var(--border);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, var(--gold), var(--silver));
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

/* ========================================
   HERO
   ======================================== */
.hero {
  text-align: center;
  padding: 6rem 2rem 4rem;
  background: transparent;
  position: relative;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 2rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.hero h1 .gold { color: var(--gold); }
.hero h1 .silver { color: var(--silver); }

.hero p { font-size: 1.1rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 2rem; }

/* Features (removed but keep class for backward compat) */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 3rem auto 0;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: left;
  backdrop-filter: blur(8px);
}

.feature-card i { font-size: 2rem; color: var(--gold); margin-bottom: 0.8rem; display: block; }
.feature-card h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.feature-card p { font-size: 0.9rem; color: var(--text-muted); }

/* ========================================
   SESSION PANEL
   ======================================== */
.session-panel {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.5rem;
  min-height: calc(100vh - 140px);
}

.control-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 80px;
  backdrop-filter: blur(8px);
}

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.04);
}

.upload-zone i { font-size: 2.5rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.upload-zone p { color: var(--text-muted); font-size: 0.9rem; }

/* Text overlay input */
.text-overlay-input {
  width: 100%;
  min-height: 80px;
  padding: 0.8rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  resize: vertical;
  font-family: inherit;
}

.text-overlay-input:focus { outline: none; border-color: var(--gold); }

/* ========================================
   QUEUE
   ======================================== */
.queue-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  backdrop-filter: blur(8px);
}

.queue-timer {
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Guest name tag — removed (no more accounts) */
.guest-tag {
  display: none;
}

/* ========================================
   SETUP PAGE
   ======================================== */
.setup-steps { display: grid; gap: 1.5rem; max-width: 800px; margin: 0 auto; }
.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  backdrop-filter: blur(8px);
}
.step-num {
  background: linear-gradient(135deg, var(--gold), var(--silver));
  color: #0a0a18;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.step-card h3 { font-size: 1.1rem; margin-bottom: 0.3rem; }
.step-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }
.code-block {
  background: rgba(6, 6, 16, 0.9);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.85rem;
  color: var(--gold);
  margin-top: 0.5rem;
  overflow-x: auto;
  position: relative;
}
.code-block .copy-btn {
  position: absolute;
  right: 0.5rem;
  top: 0.5rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.2rem 0.6rem;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.75rem;
}
.code-block .copy-btn:hover { color: var(--gold); border-color: var(--gold); }

.req-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
  margin-top: 0.8rem;
}
.req-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.8rem;
  background: rgba(201, 168, 76, 0.05);
  border: 1px solid rgba(201, 168, 76, 0.12);
  border-radius: 8px;
  font-size: 0.85rem;
}
.req-item i { color: var(--gold); }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .session-panel { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  .navbar { padding: 0.8rem 1rem; }
  .container { padding: 1rem; }
  .nav-links { gap: 0.8rem; font-size: 0.85rem; }
  .step-card { flex-direction: column; align-items: center; text-align: center; }
}
