/* ── Reset & base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --text: #e0e0e0;
  --muted: #555;
  --orb-offline: radial-gradient(circle, #3a3a3a 0%, #1a1a1a 60%, transparent 100%);
  --orb-live: radial-gradient(circle, #00ff88 0%, #00cc66 40%, #004422 80%, transparent 100%);
  --glow-live: 0 0 80px 20px rgba(0, 255, 136, 0.25), 0 0 200px 60px rgba(0, 255, 136, 0.10);
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

/* ── Main card ────────────────────────────────────────────────────────── */
.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 3rem 2rem;
  text-align: center;
  max-width: 480px;
  width: 100%;
}

/* ── Orb ──────────────────────────────────────────────────────────────── */
.orb-wrap {
  width: 160px;
  height: 160px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orb {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--orb-offline);
  animation: pulse-offline 3s ease-in-out infinite;
  transition: background 0.6s ease, box-shadow 0.6s ease;
}

@keyframes pulse-offline {
  0%, 100% { transform: scale(1);   opacity: 0.6; }
  50%       { transform: scale(1.08); opacity: 0.9; }
}

@keyframes pulse-live {
  0%, 100% { transform: scale(1);    box-shadow: var(--glow-live); }
  50%       { transform: scale(1.12); box-shadow: 0 0 120px 40px rgba(0,255,136,0.4),
                                                   0 0 260px 80px rgba(0,255,136,0.15); }
}

body.live .orb {
  background: var(--orb-live);
  animation: pulse-live 2s ease-in-out infinite;
}

body.live {
  background: radial-gradient(ellipse at 50% 40%, #001a0d 0%, #0a0a0a 70%);
}

/* ── Status badge ─────────────────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--muted);
  display: inline-block;
  transition: background 0.4s;
}

body.live .dot { background: #00ff88; box-shadow: 0 0 8px #00ff88; }

.status-text { transition: color 0.4s; }
body.live .status-text { color: #00ff88; }

/* ── Sub-heading ──────────────────────────────────────────────────────── */
.subtitle { font-size: 0.95rem; color: var(--muted); line-height: 1.6; }

/* ── Instructor panel ─────────────────────────────────────────────────── */
#instructor-panel {
  display: none;
  width: 100%;
  flex-direction: column;
  gap: 0.6rem;
}

body.live #instructor-panel { display: flex; }

.instructor-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.instructor-cards { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }

.instructor-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(0,255,136,0.06);
  border: 1px solid rgba(0,255,136,0.18);
  border-radius: 10px;
  padding: 0.55rem 0.9rem;
}

.instructor-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: #222;
}

.instructor-avatar-placeholder {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #00ff88;
  font-weight: 700;
  flex-shrink: 0;
}

.instructor-info { text-align: left; }
.instructor-name { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.instructor-specialty { font-size: 0.75rem; color: var(--muted); }

/* ── Join button ──────────────────────────────────────────────────────── */
.join-btn {
  display: none;
  padding: 0.85rem 2.2rem;
  border-radius: 999px;
  border: none;
  background: #00ff88;
  color: #001a0d;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 0 24px rgba(0,255,136,0.4);
}

.join-btn:hover { transform: scale(1.04); box-shadow: 0 0 40px rgba(0,255,136,0.6); }
body.live .join-btn { display: inline-block; }

/* ── Divider ──────────────────────────────────────────────────────────── */
.divider { width: 100%; border: none; border-top: 1px solid #222; }

/* ── Notify button ────────────────────────────────────────────────────── */
.notify-section { width: 100%; display: flex; flex-direction: column; gap: 0.75rem; }

.notify-label { font-size: 0.85rem; color: var(--muted); }

.notify-btn {
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  border: 1px solid #2a2a2a;
  background: #1a1a1a;
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  width: 100%;
}
.notify-btn:hover { background: #252525; border-color: #444; }

/* ── Modal overlay ────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid #222;
  border-radius: 14px;
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal h2 { font-size: 1rem; font-weight: 600; }
.modal p  { font-size: 0.82rem; color: var(--muted); line-height: 1.5; }

.modal-field { display: flex; flex-direction: column; gap: 0.3rem; }
.modal-field label { font-size: 0.78rem; color: var(--muted); }

.modal-input {
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  border: 1px solid #2a2a2a;
  background: var(--bg);
  color: var(--text);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.modal-input:focus { border-color: #00ff88; }

.modal-footer { display: flex; gap: 0.5rem; }
.modal-submit {
  flex: 1;
  padding: 0.7rem;
  border-radius: 8px;
  border: none;
  background: #00ff88;
  color: #001a0d;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}
.modal-submit:disabled { opacity: 0.5; cursor: default; }
.modal-cancel {
  padding: 0.7rem 1rem;
  border-radius: 8px;
  border: 1px solid #2a2a2a;
  background: #1a1a1a;
  color: var(--text);
  font-size: 0.92rem;
  cursor: pointer;
}

.modal-msg { font-size: 0.82rem; min-height: 1.2em; }
.modal-msg.success { color: #00ff88; }
.modal-msg.error   { color: #ff4444; }

/* ── Poll indicator ───────────────────────────────────────────────────── */
.poll-info { font-size: 0.75rem; color: #333; margin-top: 0.5rem; }
