/* ==========================================================================
   STATE-OF-THE-ART BOT-PROOF WEBINAR PORTAL DESIGN SYSTEM
   ========================================================================== */

:root {
  --bg-dark: #070a12;
  --bg-surface: #0c111e;
  --bg-card: rgba(14, 20, 36, 0.82);
  --bg-card-hover: rgba(22, 31, 56, 0.9);
  --bg-input: rgba(10, 15, 28, 0.7);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(56, 189, 248, 0.35);
  --border-glow: rgba(99, 102, 241, 0.3);
  
  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-dim: #64748b;
  --text-accent: #38bdf8;

  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --shadow-glow: 0 0 35px rgba(56, 189, 248, 0.12);
  --shadow-card: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

body.pre-gate-active {
  background-color: #ffffff !important;
  color: #0f172a;
  overflow: hidden;
}

/* ==========================================================================
   PLAIN WHITE PRE-GATE SCREEN STYLES
   ========================================================================== */
.pre-gate-screen {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: var(--font-sans);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.pre-gate-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
  width: 100%;
  max-width: 450px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pre-gate-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pre-gate-shield-icon {
  width: 36px;
  height: 36px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
}

.pre-gate-security-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #2563eb;
}

.pre-gate-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 4px;
}

.pre-gate-subtitle {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.45;
  margin-top: 4px;
}

.pre-gate-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 2px 0;
}

.pre-gate-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pre-gate-instruction {
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
}

.pre-gate-captcha-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pre-gate-canvas-frame {
  position: relative;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  overflow: hidden;
  width: 260px;
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
}

.canvas-scanline-light {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.7), transparent);
  animation: scanline-sweep 2.4s ease-in-out infinite;
  pointer-events: none;
}

.pre-gate-refresh-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  color: #475569;
  padding: 10px 14px;
  height: 65px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.pre-gate-refresh-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #2563eb;
}

.pre-gate-input-group input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.35em;
  text-align: center;
  text-transform: uppercase;
  color: #0f172a;
  outline: none;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pre-gate-input-group input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.pre-gate-submit-btn {
  background: #2563eb;
  border: none;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 13px 20px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.pre-gate-submit-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.pre-gate-submit-btn:active {
  transform: translateY(0);
}

.pre-gate-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 0.8rem;
  padding: 10px 14px;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
  animation: shake 0.4s ease;
}

.pre-gate-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
  text-align: center;
}

/* Ambient glow blobs */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}
.glow-1 {
  top: -100px;
  right: -80px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.3) 0%, rgba(99, 102, 241, 0.1) 70%, transparent 100%);
}
.glow-2 {
  bottom: 50px;
  left: -150px;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(59, 130, 246, 0.1) 70%, transparent 100%);
}

/* ==========================================================================
   HEADER NAVIGATION
   ========================================================================== */
.webinar-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 10, 18, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 24px;
}

.header-container {
  max-width: 1700px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(99, 102, 241, 0.2));
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: linear-gradient(90deg, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
}

.brand-badge {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
}

.broadcast-status-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fb7185;
}

.live-indicator-dot {
  width: 8px;
  height: 8px;
  background-color: #f43f5e;
  border-radius: 50%;
  box-shadow: 0 0 8px #f43f5e;
  animation: pulse-dot 1.5s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.2); }
}

.meta-pill, .security-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 6px 13px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

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

.security-pill {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
  color: var(--text-main);
}
.security-pill strong {
  color: var(--accent-emerald);
}

/* ==========================================================================
   MAIN LAYOUT GRID
   ========================================================================== */
.webinar-layout {
  position: relative;
  z-index: 10;
  max-width: 1700px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 24px 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 24px;
  flex: 1;
}

/* ==========================================================================
   VIDEO STAGE & GATE CARD
   ========================================================================== */
.video-stage-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stage-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 480px;
  background-color: #03050a;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Gated Overlay State */
.gate-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.preview-backdrop {
  position: absolute;
  inset: -10px;
  background-size: cover;
  background-position: center;
  filter: blur(14px) brightness(0.28);
  transform: scale(1.05);
}

.backdrop-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(12, 17, 30, 0.7) 0%, rgba(7, 10, 18, 0.95) 85%);
}

.gate-card {
  position: relative;
  z-index: 25;
  width: 100%;
  max-width: 620px;
  background: var(--bg-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.8), 0 0 40px rgba(56, 189, 248, 0.1);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.gate-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.shield-badge-wrapper {
  position: relative;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shield-badge-radar {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
  opacity: 0.6;
  animation: radar-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes radar-ping {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

.shield-icon-box {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(16, 185, 129, 0.2));
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: var(--radius-md);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gate-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.gate-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.gate-notice-box {
  background: rgba(56, 189, 248, 0.05);
  border-left: 3px solid var(--accent-cyan);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.gate-notice-box strong {
  color: var(--accent-cyan);
}

/* Pipeline steps */
.verification-pipeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.35);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.pipeline-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 500;
}

.pipeline-step.active {
  color: var(--accent-cyan);
}
.pipeline-step.completed {
  color: var(--accent-emerald);
}

.step-indicator {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
}

.pipeline-step.completed .step-indicator {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.pipeline-step.active .step-indicator {
  background: rgba(56, 189, 248, 0.2);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.pipeline-connector {
  flex: 1;
  height: 2px;
  background: var(--border-subtle);
  margin: 0 10px;
  transition: background 0.3s;
}

.pipeline-connector.active {
  background: linear-gradient(90deg, var(--accent-emerald), var(--accent-cyan));
}

/* ==========================================================================
   DYNAMIC LOGISTICS-STYLE VERIFICATION CODE & CAPTCHA STYLING
   ========================================================================== */
.captcha-card-box {
  background: rgba(8, 13, 25, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.5);
}

.captcha-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.captcha-instruction {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-main);
}

.captcha-badge-tag {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
}

.captcha-display-container {
  display: flex;
  align-items: center;
  gap: 14px;
}

.captcha-canvas-frame {
  position: relative;
  background: #03060f;
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.9), 0 0 15px rgba(56, 189, 248, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 280px;
  height: 70px;
}

#security-canvas {
  display: block;
}

.canvas-scanline {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.8), transparent);
  animation: scanline-sweep 2.4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes scanline-sweep {
  0% { top: 0%; opacity: 0.8; }
  50% { top: 96%; opacity: 0.8; }
  100% { top: 0%; opacity: 0.8; }
}

.refresh-code-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  transition: all 0.2s;
  height: 70px;
  justify-content: center;
}

.refresh-code-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-cyan);
  color: #fff;
  transform: translateY(-1px);
}

.refresh-code-btn:hover svg {
  transform: rotate(180deg);
  transition: transform 0.4s ease;
}

.captcha-input-container {
  display: flex;
  gap: 10px;
}

.code-input-wrapper {
  flex: 1;
}

#verification-input {
  width: 100%;
  background: rgba(6, 10, 20, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-align: center;
  color: #fff;
  outline: none;
  transition: all 0.2s ease;
}

#verification-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.3);
  background: rgba(9, 14, 28, 0.95);
}

#verification-input::placeholder {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 500;
}

.verify-submit-btn {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  border: none;
  color: #030712;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.verify-submit-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.5);
}

.verify-submit-btn:active {
  transform: translateY(0);
}

.gate-error-message {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  font-size: 0.78rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 500;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.spinner-tiny {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(56, 189, 248, 0.3);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Diagnostic Terminal */
.security-terminal {
  background: #050811;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.terminal-bar {
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.term-dots {
  display: flex;
  gap: 5px;
}
.term-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.term-title {
  color: var(--text-dim);
}

.term-badge {
  color: var(--accent-cyan);
  font-size: 0.65rem;
}

.terminal-body {
  padding: 10px 12px;
  max-height: 85px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.term-line {
  color: #94a3b8;
  line-height: 1.35;
}
.term-line.info { color: #38bdf8; }
.term-line.success { color: #34d399; font-weight: 600; }
.term-line.warn { color: #fbbf24; }
.term-line.error { color: #f87171; }
.term-line.pending { color: #a5b4fc; }

.gate-footer {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
}

.gate-security-spec {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.gate-security-spec .bullet {
  color: var(--accent-cyan);
}

/* ==========================================================================
   UNLOCKED VIDEO PLAYER & CUSTOM CONTROLS
   ========================================================================== */
.video-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#webinar-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-watermark {
  position: absolute;
  top: 18px;
  right: 20px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.6);
  pointer-events: none;
  z-index: 15;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  padding: 20px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 16;
}

.video-container:hover .custom-video-controls {
  opacity: 1;
}

.progress-bar-container {
  width: 100%;
  height: 6px;
  cursor: pointer;
  padding: 4px 0;
}

.progress-bar-bg {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  border-radius: 2px;
  transition: width 0.1s linear;
}

.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.controls-left, .controls-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ctrl-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s, transform 0.15s;
}

.ctrl-btn:hover {
  color: var(--accent-cyan);
  transform: scale(1.08);
}

.live-sync-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-emerald);
  cursor: pointer;
}

.live-dot-pulse {
  width: 6px;
  height: 6px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent-emerald);
}

.volume-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vol-range {
  width: 65px;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

.time-display {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.quality-tag {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-subtle);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-main);
}

/* ==========================================================================
   STAGE INFO & SPEAKER PROFILE
   ========================================================================== */
.stage-info-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.stage-title-group {
  flex: 1;
}

.topic-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  margin-bottom: 6px;
}

.webinar-headline {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.webinar-subtext {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 6px;
}

.speaker-profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  min-width: 290px;
}

.speaker-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.speaker-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}

.speaker-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.speaker-company {
  font-size: 0.7rem;
  color: var(--accent-cyan);
  font-weight: 500;
}

/* ==========================================================================
   SIDEBAR & INTERACTIVE TABS
   ========================================================================== */
.sidebar-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 820px;
  box-shadow: var(--shadow-card);
}

.sidebar-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border-subtle);
  padding: 6px 8px;
  gap: 4px;
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  color: #fff;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.tab-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 0.65rem;
}

.tab-content {
  display: none;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.tab-content.active {
  display: flex;
}

/* Tab 1: Live Chat */
.chat-pinned-message {
  background: rgba(56, 189, 248, 0.08);
  border-bottom: 1px solid rgba(56, 189, 248, 0.15);
  padding: 8px 14px;
  font-size: 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-main);
}

.pinned-icon {
  font-size: 0.85rem;
}

.chat-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-message-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  animation: fadeSlideUp 0.3s ease-out;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-sender-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-sender-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #e2e8f0;
}

.chat-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.chat-badge.moderator {
  background: rgba(244, 63, 94, 0.2);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.4);
}
.chat-badge.vip {
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
}
.chat-badge.verified {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.chat-timestamp {
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-left: auto;
}

.chat-bubble {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 12px;
  border-radius: 4px 12px 12px 12px;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text-main);
  word-break: break-word;
}

.chat-bubble.user-sent {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
  align-self: flex-end;
}

.chat-input-wrapper {
  padding: 12px 16px;
  background: rgba(7, 10, 18, 0.7);
  border-top: 1px solid var(--border-subtle);
}

.chat-form {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  transition: border-color 0.2s;
}

.chat-form:focus-within {
  border-color: var(--accent-cyan);
}

.chat-form input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  outline: none;
}

.send-btn {
  background: var(--accent-cyan);
  border: none;
  color: #030712;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, background-color 0.2s;
}

.send-btn:hover {
  background: #38bdf8;
  transform: scale(1.05);
}

/* Tab 2: Q&A */
.qa-form-box {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qa-form-box input {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.82rem;
  color: #fff;
  outline: none;
}
.qa-form-box input:focus {
  border-color: var(--accent-cyan);
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  border: none;
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity 0.2s;
}
.primary-btn:hover { opacity: 0.9; }
.sm-btn {
  padding: 7px 12px;
  font-size: 0.78rem;
  align-self: flex-end;
}

.qa-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qa-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  gap: 12px;
}
.qa-card.featured {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.04);
}

.upvote-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.2s;
}
.upvote-btn.voted {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.qa-author {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.qa-author .dim { color: var(--text-dim); }

.qa-text {
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text-main);
}

.qa-reply-badge {
  display: inline-block;
  margin-top: 6px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Tab 3: Poll */
.poll-wrapper {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.poll-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-amber);
  letter-spacing: 0.08em;
}

.poll-question {
  font-size: 0.95rem;
  line-height: 1.4;
  font-weight: 600;
}

.poll-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.poll-option-btn {
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  transition: border-color 0.2s;
}

.poll-option-btn:hover {
  border-color: var(--accent-cyan);
}

.poll-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  background: rgba(56, 189, 248, 0.15);
  transition: width 0.5s ease;
  pointer-events: none;
}

.poll-label {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-main);
}

.poll-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-align: center;
}

/* Tab 4: Handouts */
.resources-list {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.resource-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.resource-icon {
  font-size: 1.5rem;
}

.resource-details {
  flex: 1;
}

.resource-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}

.resource-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.resource-dl-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--accent-cyan);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.resource-dl-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-cyan);
}

/* ==========================================================================
   THEATER MODE & RESPONSIVENESS
   ========================================================================== */
body.theater-mode .webinar-layout {
  grid-template-columns: 1fr;
}
body.theater-mode .sidebar-panel {
  display: none;
}

@media (max-width: 1200px) {
  .webinar-layout {
    grid-template-columns: 1fr;
  }
  .sidebar-panel {
    height: 500px;
  }
}

@media (max-width: 768px) {
  .stage-info-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .speaker-profile-card {
    width: 100%;
  }
  .gate-card {
    padding: 20px 16px;
  }
  .verification-pipeline {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
  .pipeline-connector {
    display: none;
  }
}
