/* ============================================================
   StreamLink — Main Stylesheet
   Aesthetic: Dark Luxury / Editorial Broadcast
   ============================================================ */

:root {
  --bg-void: #050507;
  --bg-base: #0a0a0f;
  --bg-surface: #111118;
  --bg-elevated: #18181f;
  --bg-hover: #1e1e28;

  --border-subtle: rgba(255,255,255,0.06);
  --border-default: rgba(255,255,255,0.1);
  --border-strong: rgba(255,255,255,0.18);

  --gold: #c9a84c;
  --gold-light: #e8c97a;
  --gold-dim: rgba(201,168,76,0.15);
  --gold-glow: rgba(201,168,76,0.08);

  --red: #e05252;
  --red-dim: rgba(224,82,82,0.15);
  --green: #52c47a;
  --green-dim: rgba(82,196,122,0.15);
  --blue: #5295e0;
  --blue-dim: rgba(82,149,224,0.15);

  --text-primary: #f0ede8;
  --text-secondary: #8a8799;
  --text-muted: #4a4858;
  --text-gold: var(--gold);

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);
  --shadow-gold: 0 0 32px rgba(201,168,76,0.12);

  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-void);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#app { min-height: 100vh; }

/* ── Typography ── */
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { line-height: 1.65; color: var(--text-secondary); }
a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }

/* ── Layout ── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.page { min-height: 100vh; }

/* ── Nav ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: 64px;
  background: rgba(5,5,7,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 10px;
}
.nav-logo-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
  animation: pulse-gold 2s ease-in-out infinite;
}
@keyframes pulse-gold {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.nav-actions { display: flex; gap: 12px; align-items: center; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 20px;
  border: none; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.875rem; font-weight: 500;
  cursor: pointer; transition: all var(--transition);
  white-space: nowrap; letter-spacing: 0.01em;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
  background: var(--gold);
  color: #0a0808;
}
.btn-primary:hover:not(:disabled) {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(201,168,76,0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}
.btn-secondary:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: var(--bg-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover:not(:disabled) { color: var(--text-primary); background: var(--bg-hover); }

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(224,82,82,0.2);
}
.btn-danger:hover:not(:disabled) { background: rgba(224,82,82,0.25); }

.btn-success {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(82,196,122,0.2);
}
.btn-success:hover:not(:disabled) { background: rgba(82,196,122,0.25); }

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }
.btn-full { width: 100%; }

/* ── Forms ── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-secondary);
}
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body); font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
.form-input::placeholder { color: var(--text-muted); }
.form-select { cursor: pointer; appearance: none; }
.form-textarea { resize: vertical; min-height: 80px; }
.form-error { font-size: 0.8rem; color: var(--red); }
.form-hint { font-size: 0.78rem; color: var(--text-muted); }

/* ── Cards ── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--transition);
}
.card:hover { border-color: var(--border-default); }
.card-gold {
  border-color: rgba(201,168,76,0.2);
  box-shadow: var(--shadow-gold);
}

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-gold { background: var(--gold-dim); color: var(--gold); border: 1px solid rgba(201,168,76,0.25); }
.badge-green { background: var(--green-dim); color: var(--green); border: 1px solid rgba(82,196,122,0.25); }
.badge-red { background: var(--red-dim); color: var(--red); border: 1px solid rgba(224,82,82,0.25); }
.badge-blue { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(82,149,224,0.25); }
.badge-muted { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid var(--border-subtle); }
.badge-dot::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; display: inline-block;
}

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

/* ── Toast ── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999; display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  min-width: 280px; max-width: 400px;
  pointer-events: all;
  animation: toast-in 0.3s ease;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
.toast.fade-out { animation: toast-out 0.3s ease forwards; }
@keyframes toast-out {
  to { opacity: 0; transform: translateX(20px); }
}
.toast-success { border-left: 3px solid var(--green); }
.toast-error { border-left: 3px solid var(--red); }
.toast-info { border-left: 3px solid var(--gold); }
.toast-icon { font-size: 1.1rem; }

/* ── Modal ── */
#modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fade-in 0.2s ease;
}
#modal-overlay.hidden { display: none; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
#modal-content {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 520px; width: 100%;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-title {
  font-family: var(--font-display);
  font-size: 1.5rem; margin-bottom: 8px;
}
.modal-subtitle { color: var(--text-secondary); margin-bottom: 24px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }

/* ── Status Indicator ── */
.status-indicator {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.85rem; font-weight: 500;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.status-available .status-dot {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse-status 2s ease infinite;
}
.status-busy .status-dot { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.status-offline .status-dot { background: var(--text-muted); }
@keyframes pulse-status {
  0%, 100% { box-shadow: 0 0 8px var(--green); }
  50% { box-shadow: 0 0 20px var(--green), 0 0 40px rgba(82,196,122,0.3); }
}

/* ── Avatar ── */
.avatar {
  border-radius: 50%; object-fit: cover;
  background: var(--bg-hover); border: 2px solid var(--border-default);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); color: var(--gold);
  flex-shrink: 0;
}
.avatar-sm { width: 32px; height: 32px; font-size: 0.85rem; }
.avatar-md { width: 44px; height: 44px; font-size: 1.1rem; }
.avatar-lg { width: 60px; height: 60px; font-size: 1.5rem; }
.avatar-xl { width: 80px; height: 80px; font-size: 2rem; }

/* ── Tabs ── */
.tabs { display: flex; gap: 4px; background: var(--bg-surface); border-radius: var(--radius-md); padding: 4px; }
.tab {
  flex: 1; padding: 8px 16px;
  background: none; border: none;
  color: var(--text-secondary); font-family: var(--font-body);
  font-size: 0.875rem; font-weight: 500; cursor: pointer;
  border-radius: calc(var(--radius-md) - 2px);
  transition: all var(--transition);
}
.tab.active { background: var(--bg-elevated); color: var(--text-primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Utility ── */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.font-display { font-family: var(--font-display); }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.grid { display: grid; }
.relative { position: relative; }
.absolute { position: absolute; }
.overflow-hidden { overflow: hidden; }

/* Loading spinner */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border-default);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-full {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 100vh; gap: 16px;
}
.loading-full .spinner { width: 40px; height: 40px; border-width: 3px; }

/* ============================================================
   LANDING PAGE
   ============================================================ */
.landing-page {
  background: var(--bg-void);
  min-height: 100vh;
}
.landing-hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 80px 24px 40px;
  position: relative;
  overflow: hidden;
}
.landing-hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 50% 60%, rgba(201,168,76,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 20% 20%, rgba(82,149,224,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 80% 80%, rgba(82,196,122,0.03) 0%, transparent 60%);
  pointer-events: none;
}
.landing-grid-bg {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.4;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black, transparent);
}
.landing-hero-content { position: relative; max-width: 800px; }
.landing-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--gold-dim); border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--radius-full); padding: 6px 16px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gold);
  margin-bottom: 28px;
}
.landing-title { margin-bottom: 20px; color: var(--text-primary); }
.landing-title em { font-style: italic; color: var(--gold); }
.landing-subtitle { font-size: 1.1rem; max-width: 560px; margin: 0 auto 40px; }
.landing-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.landing-features {
  padding: 80px 24px;
  max-width: 1100px; margin: 0 auto;
}
.landing-features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px; margin-top: 48px;
}
.feature-card {
  padding: 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: all var(--transition-slow);
}
.feature-card:hover {
  border-color: rgba(201,168,76,0.2);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3), var(--shadow-gold);
}
.feature-icon {
  width: 48px; height: 48px; border-radius: var(--radius-md);
  background: var(--gold-dim); border: 1px solid rgba(201,168,76,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: 16px;
}
.feature-title { font-size: 1rem; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }
.feature-desc { font-size: 0.875rem; line-height: 1.6; }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 80px 24px 40px;
  position: relative;
}
.auth-page::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 50% 60% at 50% 0%, rgba(201,168,76,0.05) 0%, transparent 70%);
}
.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%; max-width: 460px;
  position: relative; z-index: 1;
  box-shadow: var(--shadow-lg);
}
.auth-card-wide { max-width: 600px; }
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo-text {
  font-family: var(--font-display); font-size: 1.8rem;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-switch { text-align: center; font-size: 0.875rem; color: var(--text-muted); margin-top: 20px; }

/* ============================================================
   DASHBOARD — HOST
   ============================================================ */
.dashboard {
  display: flex; min-height: 100vh;
  padding-top: 64px;
}
.sidebar {
  width: 260px; flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex; flex-direction: column;
  padding: 24px 0;
  position: fixed; top: 64px; left: 0; bottom: 0;
  overflow-y: auto;
}
.sidebar-section { padding: 0 16px; margin-bottom: 8px; }
.sidebar-label {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-muted);
  padding: 0 8px; margin-bottom: 6px;
}
.sidebar-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 0.875rem; font-weight: 500;
  cursor: pointer; border: none; background: none; width: 100%;
  text-align: left; transition: all var(--transition);
}
.sidebar-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.sidebar-item.active { background: var(--gold-dim); color: var(--gold); }
.sidebar-item-icon { font-size: 1rem; width: 20px; text-align: center; }
.sidebar-badge {
  margin-left: auto;
  background: var(--gold);
  color: #0a0808; border-radius: var(--radius-full);
  font-size: 0.7rem; font-weight: 700;
  min-width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
}

.main-content {
  margin-left: 260px; flex: 1;
  padding: 32px;
  min-height: calc(100vh - 64px);
}
.page-header { margin-bottom: 32px; }
.page-title { font-size: 1.8rem; margin-bottom: 6px; }
.page-subtitle { color: var(--text-secondary); font-size: 0.9rem; }

/* Stats grid */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}
.stat-label { font-size: 0.78rem; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.stat-value { font-family: var(--font-display); font-size: 2rem; color: var(--text-primary); }
.stat-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }

/* Schedule grid */
.schedule-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 4px; margin-top: 16px;
}
.schedule-day-header {
  text-align: center; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-muted); padding: 8px 0;
}
.schedule-slot {
  height: 28px; border-radius: 4px; cursor: pointer;
  background: var(--bg-hover); border: 1px solid transparent;
  transition: all var(--transition); font-size: 0.65rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.schedule-slot:hover { border-color: var(--border-default); }
.schedule-slot.blocked { background: var(--red-dim); border-color: rgba(224,82,82,0.2); color: var(--red); }
.schedule-slot.selected { background: var(--gold-dim); border-color: rgba(201,168,76,0.3); color: var(--gold); }

/* Request list */
.request-list { display: flex; flex-direction: column; gap: 12px; }
.request-item {
  display: flex; align-items: center; gap: 16px;
  padding: 16px; background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: border-color var(--transition);
}
.request-item:hover { border-color: var(--border-default); }
.request-info { flex: 1; }
.request-name { font-weight: 500; margin-bottom: 2px; }
.request-time { font-size: 0.78rem; color: var(--text-muted); }
.request-actions { display: flex; gap: 8px; }

/* ============================================================
   SESSION PAGE
   ============================================================ */
.session-page {
  background: var(--bg-void);
  min-height: 100vh;
  display: flex; flex-direction: column;
  padding-top: 64px;
}
.session-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  flex: 1;
  height: calc(100vh - 64px);
}
.session-main {
  display: flex; flex-direction: column;
  border-right: 1px solid var(--border-subtle);
  overflow: hidden;
}
.video-grid {
  flex: 1; padding: 20px;
  display: grid;
  gap: 12px;
  overflow: hidden;
}
.video-grid.grid-1 { grid-template-columns: 1fr; }
.video-grid.grid-2 { grid-template-columns: repeat(2, 1fr); }
.video-grid.grid-3 { grid-template-columns: repeat(3, 1fr); }
.video-grid.grid-4 { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); }
.video-grid.grid-5, .video-grid.grid-6 { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); }

.video-tile {
  position: relative; border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  aspect-ratio: 16/9;
}
.video-tile video {
  width: 100%; height: 100%; object-fit: cover;
}
.video-tile-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px 12px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.8rem; font-weight: 500;
}
.video-tile-name { display: flex; align-items: center; gap: 6px; }
.video-tile-indicators { display: flex; gap: 6px; }
.video-no-stream {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; color: var(--text-muted);
}
.video-no-stream-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--bg-hover);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.5rem; color: var(--gold);
}
.video-tile-host { border-color: rgba(201,168,76,0.3); }

.session-controls {
  padding: 16px 20px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.ctrl-btn {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; cursor: pointer; border: none;
  transition: all var(--transition);
}
.ctrl-btn-default { background: var(--bg-elevated); color: var(--text-primary); border: 1px solid var(--border-default); }
.ctrl-btn-default:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.ctrl-btn-active { background: var(--gold-dim); color: var(--gold); border: 1px solid rgba(201,168,76,0.3); }
.ctrl-btn-end { background: var(--red-dim); color: var(--red); border: 1px solid rgba(224,82,82,0.25); }
.ctrl-btn-end:hover { background: rgba(224,82,82,0.25); }
.ctrl-label { font-size: 0.65rem; color: var(--text-muted); margin-top: 4px; text-align: center; }
.ctrl-group { display: flex; flex-direction: column; align-items: center; }

/* Session sidebar */
.session-sidebar {
  display: flex; flex-direction: column;
  background: var(--bg-surface);
  overflow: hidden;
}
.session-sidebar-tabs {
  display: flex; border-bottom: 1px solid var(--border-subtle);
}
.session-tab {
  flex: 1; padding: 14px 8px;
  background: none; border: none;
  color: var(--text-secondary); font-family: var(--font-body);
  font-size: 0.8rem; font-weight: 500; cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}
.session-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}
.session-panel { flex: 1; overflow-y: auto; }

/* DM Chat */
.dm-chat { display: flex; flex-direction: column; height: 100%; }
.dm-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.dm-message { max-width: 80%; }
.dm-message-host { align-self: flex-end; }
.dm-message-participant { align-self: flex-start; }
.dm-bubble {
  padding: 10px 14px; border-radius: 16px;
  font-size: 0.875rem; line-height: 1.4;
}
.dm-message-host .dm-bubble {
  background: var(--gold-dim); color: var(--text-primary);
  border-radius: 16px 4px 16px 16px;
}
.dm-message-participant .dm-bubble {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 4px 16px 16px 16px;
}
.dm-sender { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 4px; padding: 0 4px; }
.dm-input-area {
  padding: 12px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex; gap: 8px; align-items: flex-end;
}
.dm-input {
  flex: 1; padding: 10px 14px;
  background: var(--bg-elevated); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); color: var(--text-primary);
  font-family: var(--font-body); font-size: 0.875rem;
  resize: none; outline: none; max-height: 120px;
  transition: border-color var(--transition);
}
.dm-input:focus { border-color: var(--gold); }

/* Participants list in session */
.participant-list { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.participant-entry {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; background: var(--bg-elevated);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
}
.participant-entry-info { flex: 1; }
.participant-entry-name { font-size: 0.875rem; font-weight: 500; }
.participant-entry-tokens { font-size: 0.75rem; color: var(--text-muted); }
.participant-entry-actions { display: flex; gap: 6px; }

/* Token meter */
.token-meter {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: var(--bg-elevated); border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
}
.token-meter-bar { flex: 1; height: 4px; background: var(--bg-hover); border-radius: 2px; overflow: hidden; }
.token-meter-fill { height: 100%; background: var(--gold); border-radius: 2px; transition: width 1s linear; }
.token-count { color: var(--gold); font-weight: 600; font-size: 0.85rem; }

/* ============================================================
   PARTICIPANT DASHBOARD
   ============================================================ */
.host-discovery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.host-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-slow);
  cursor: pointer;
}
.host-card:hover {
  border-color: rgba(201,168,76,0.2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md), var(--shadow-gold);
}
.host-card-cover {
  height: 100px;
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-hover));
  position: relative;
}
.host-card-avatar {
  position: absolute; bottom: -28px; left: 20px;
  width: 56px; height: 56px; border-radius: 50%;
  border: 3px solid var(--bg-surface);
  background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.4rem; color: var(--gold);
}
.host-card-body { padding: 36px 20px 20px; }
.host-card-name { font-weight: 600; margin-bottom: 4px; }
.host-card-rate { font-size: 0.8rem; color: var(--gold); margin-bottom: 8px; }
.host-card-queue { font-size: 0.78rem; color: var(--text-muted); }
.host-card-actions { padding: 0 20px 20px; display: flex; gap: 8px; }

/* Token purchase */
.token-packages {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px; margin-top: 16px;
}
.token-package {
  padding: 20px; background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md); text-align: center; cursor: pointer;
  transition: all var(--transition);
}
.token-package:hover { border-color: rgba(201,168,76,0.3); }
.token-package.selected { border-color: var(--gold); background: var(--gold-dim); }
.token-package-amount { font-family: var(--font-display); font-size: 2rem; color: var(--gold); }
.token-package-label { font-size: 0.78rem; color: var(--text-muted); margin: 4px 0; }
.token-package-price { font-weight: 600; }

/* ============================================================
   ADMIN PAGE
   ============================================================ */
.admin-layout { display: flex; min-height: 100vh; padding-top: 64px; }
.admin-main { flex: 1; margin-left: 260px; padding: 32px; }
.admin-table {
  width: 100%; border-collapse: collapse;
  background: var(--bg-surface); border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}
.admin-table th {
  text-align: left; padding: 14px 20px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
}
.admin-table td {
  padding: 14px 20px; font-size: 0.875rem;
  border-bottom: 1px solid var(--border-subtle);
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg-hover); }

/* ============================================================
   WAITING ROOM / QUEUE
   ============================================================ */
.queue-display {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px;
  background: var(--bg-elevated); border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}
.queue-number {
  font-family: var(--font-display); font-size: 2.5rem;
  color: var(--gold); line-height: 1;
}
.queue-info { flex: 1; }
.queue-label { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 2px; }
.queue-position { font-weight: 600; }

/* Availability toggle */
.availability-toggle {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}
.toggle-switch {
  position: relative; width: 52px; height: 28px; cursor: pointer;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--bg-hover); border-radius: 14px;
  transition: all var(--transition);
  border: 1px solid var(--border-default);
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 20px; height: 20px; left: 3px; bottom: 3px;
  background: var(--text-muted); border-radius: 50%;
  transition: all var(--transition);
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--green-dim); border-color: rgba(82,196,122,0.3);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(24px); background: var(--green);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .session-layout { grid-template-columns: 1fr; }
  .session-sidebar { height: 300px; border-right: none; border-top: 1px solid var(--border-subtle); }

  /* On mobile, hide the sidebar and give main content full width */
  .sidebar {
    display: none;
  }
  .main-content {
    margin-left: 0;
    padding: 20px 16px;
    width: 100%;
  }
  .dashboard {
    flex-direction: column;
  }

  /* Mobile nav — show a bottom tab bar instead of sidebar */
  .mobile-tab-bar {
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    padding: 8px 0 env(safe-area-inset-bottom, 8px);
  }
  .mobile-tab-btn {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    gap: 3px; padding: 6px 4px;
    background: none; border: none; cursor: pointer;
    font-family: var(--font-body); font-size: 0.65rem; color: var(--text-muted);
    transition: color var(--transition);
  }
  .mobile-tab-btn.active { color: var(--gold); }
  .mobile-tab-btn-icon { font-size: 1.2rem; }

  /* Add bottom padding so content isn't hidden behind tab bar */
  .main-content { padding-bottom: 80px; }
}

@media (min-width: 901px) {
  .mobile-tab-bar { display: none; }
}

@media (max-width: 600px) {
  .auth-card { padding: 28px 20px; }
  .video-grid.grid-3,
  .video-grid.grid-5,
  .video-grid.grid-6 { grid-template-columns: repeat(2, 1fr); }
  .page-title { font-size: 1.4rem; }
  .modal-title { font-size: 1.3rem; }
  #modal-content { padding: 24px 20px; }
}
