/* ═══════════════════════════════════════════════════════
   PRESENTIFY — Premium Design System
   Dark-mode glassmorphic theme with vibrant gradients
   ═══════════════════════════════════════════════════════ */

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

/* ─── CSS Variables (Design Tokens) ─────────────── */
:root {
  /* Colors */
  --bg-primary: #06060b;
  --bg-secondary: #0d0d15;
  --bg-card: rgba(15, 15, 25, 0.7);
  --bg-card-hover: rgba(20, 20, 35, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-hover: rgba(255, 255, 255, 0.06);
  --bg-input: rgba(255, 255, 255, 0.04);
  --bg-input-focus: rgba(255, 255, 255, 0.07);

  --text-primary: #e8e8ed;
  --text-secondary: #8888a0;
  --text-tertiary: #555570;
  --text-muted: #3a3a50;

  --accent-primary: #667eea;
  --accent-secondary: #764ba2;
  --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --accent-gradient-hover: linear-gradient(135deg, #7b91f0 0%, #8a5fb5 100%);
  --accent-glow: rgba(102, 126, 234, 0.15);

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.1);
  --info: #3b82f6;
  --info-bg: rgba(59, 130, 246, 0.1);

  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(102, 126, 234, 0.3);

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px var(--accent-glow);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle background grid */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(102, 126, 234, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(118, 75, 162, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--accent-secondary);
}

img, video {
  max-width: 100%;
  height: auto;
}

/* ─── Scrollbar ─────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* ─── Typography ────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: 2.5rem; letter-spacing: -0.03em; }
h2 { font-size: 1.875rem; letter-spacing: -0.02em; }
h3 { font-size: 1.5rem; letter-spacing: -0.01em; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-tertiary); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-center { text-align: center; }
.font-mono { font-family: var(--font-mono); }

/* ─── Layout ────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.375rem; }
}

.w-full { width: 100%; }
.h-full { height: 100%; }

/* ─── Cards ─────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all var(--duration-normal) var(--ease-out);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-compact {
  padding: var(--space-lg);
}

.card-glass {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
}

.card-accent {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
}

/* ─── Buttons ───────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.625rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  white-space: nowrap;
  user-select: none;
  outline: none;
  text-decoration: none;
  line-height: 1.4;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 2px 12px var(--accent-glow);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-gradient-hover);
  box-shadow: 0 4px 20px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-glass-hover);
  border-color: var(--border-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

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

.btn-danger {
  background: var(--error-bg);
  color: var(--error);
  border-color: rgba(239, 68, 68, 0.2);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

.btn-success {
  background: var(--success-bg);
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.2);
}

.btn-success:hover:not(:disabled) {
  background: rgba(16, 185, 129, 0.2);
}

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

.btn-icon {
  padding: 0.5rem;
  width: 36px;
  height: 36px;
}

/* ─── Inputs ────────────────────────────────────── */
.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.input-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.password-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  padding-right: 2.75rem !important;
}

.password-toggle-btn {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--duration-fast);
  user-select: none;
  z-index: 2;
}

.password-toggle-btn:hover {
  color: var(--text-primary);
}

.input, input[type="text"], input[type="email"], input[type="password"],
input[type="url"], input[type="number"], textarea, select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: all var(--duration-fast) var(--ease-out);
}

.input:focus, input:focus, textarea:focus, select:focus {
  background: var(--bg-input-focus);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.input::placeholder, input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

select option {
  background-color: #131320;
  color: #e8e8ed;
  padding: 8px;
}

select option:hover, select option:focus, select option:checked {
  background-color: #667eea;
  color: #ffffff;
}

/* ─── Toggle Switch ─────────────────────────────── */
.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
}

.toggle input {
  display: none;
}

.toggle-slider {
  width: 44px;
  height: 24px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  position: relative;
  transition: all var(--duration-normal) var(--ease-out);
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: all var(--duration-normal) var(--ease-bounce);
}

.toggle input:checked + .toggle-slider {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.toggle input:checked + .toggle-slider::after {
  transform: translateX(20px);
  background: #fff;
}

/* ─── Badges ────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
}

.badge-active {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-inactive {
  background: var(--bg-glass);
  color: var(--text-tertiary);
  border: 1px solid var(--border);
}

.badge-accent {
  background: var(--accent-glow);
  color: var(--accent-primary);
  border: 1px solid var(--border-accent);
}

/* ─── Navbar ────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 6, 11, 0.8);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0 var(--space-lg);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* ─── Stat Cards ────────────────────────────────── */
.stat-card {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-top: var(--space-sm);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── Tables ────────────────────────────────────── */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-glass);
}

tr:hover td {
  background: var(--bg-glass);
}

tr:last-child td {
  border-bottom: none;
}

/* ─── Modal ─────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-normal) var(--ease-out);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  max-width: 560px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  transition: transform var(--duration-normal) var(--ease-bounce);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color var(--duration-fast);
}

.modal-close:hover {
  color: var(--text-primary);
}

/* ─── Toast Notifications ───────────────────────── */
.toast-container {
  position: fixed;
  top: var(--space-lg);
  right: var(--space-lg);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  backdrop-filter: blur(20px);
  border: 1px solid;
  animation: toast-slide-in 0.3s var(--ease-bounce),
             toast-fade-out 0.3s var(--ease-out) 2.7s forwards;
  max-width: 400px;
}

.toast-success {
  background: var(--success-bg);
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.3);
}

.toast-error {
  background: var(--error-bg);
  color: var(--error);
  border-color: rgba(239, 68, 68, 0.3);
}

.toast-info {
  background: var(--info-bg);
  color: var(--info);
  border-color: rgba(59, 130, 246, 0.3);
}

.toast-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: rgba(245, 158, 11, 0.3);
}

@keyframes toast-slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes toast-fade-out {
  from { opacity: 1; }
  to { opacity: 0; transform: translateX(50px); }
}

/* ─── Loader ────────────────────────────────────── */
.loader {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ─── Empty State ───────────────────────────────── */
.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.empty-state h3 {
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

.empty-state p {
  color: var(--text-tertiary);
  font-size: 0.9rem;
  margin-bottom: var(--space-lg);
}

/* ─── Drop Zone ─────────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  text-align: center;
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
}

.drop-zone:hover, .drop-zone.active {
  border-color: var(--accent-primary);
  background: var(--accent-glow);
}

.drop-zone-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
  opacity: 0.6;
}

/* ─── Progress Bar ──────────────────────────────── */
.progress {
  width: 100%;
  height: 6px;
  background: var(--bg-glass);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  transition: width var(--duration-slow) var(--ease-out);
}

/* ─── Tabs ──────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-glass);
  border-radius: var(--radius-md);
  padding: 3px;
  border: 1px solid var(--border);
}

.tab {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.tab:hover {
  color: var(--text-primary);
}

.tab.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* ─── QR Code Display ──────────────────────────── */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-xl);
  background: white;
  border-radius: var(--radius-lg);
  max-width: 250px;
  margin: 0 auto;
}

.qr-container img {
  width: 200px;
  height: 200px;
}

/* ─── Slide Preview (for controller) ────────────── */
.slide-preview {
  aspect-ratio: 16 / 9;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}

.slide-preview iframe {
  width: 100%;
  height: 100%;
  border: none;
  pointer-events: none;
}

.slide-preview-number {
  position: absolute;
  bottom: var(--space-sm);
  right: var(--space-sm);
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.7);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
}

/* ─── Speaker Notes ─────────────────────────────── */
.speaker-notes {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-height: 200px;
  overflow-y: auto;
}

.speaker-notes:empty::after {
  content: 'No speaker notes for this slide.';
  color: var(--text-muted);
  font-style: italic;
}

/* ─── Poll Results Bars ─────────────────────────── */
.poll-option {
  margin-bottom: var(--space-md);
}

.poll-option-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-xs);
  font-size: 0.9rem;
}

.poll-option-bar {
  height: 36px;
  background: var(--bg-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: border-color var(--duration-fast);
}

.poll-option-bar:hover {
  border-color: var(--border-hover);
}

.poll-option-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: var(--radius-md);
  transition: width 0.6s var(--ease-out);
  display: flex;
  align-items: center;
  padding: 0 var(--space-md);
  min-width: fit-content;
}

.poll-option-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
}

.poll-option-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ─── Animations ────────────────────────────────── */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { box-shadow: 0 0 20px 5px var(--accent-glow); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.animate-fade-in { animation: fade-in 0.5s var(--ease-out); }
.animate-slide-up { animation: slide-up 0.5s var(--ease-out); }
.animate-slide-in { animation: slide-in-right 0.5s var(--ease-out); }
.animate-pulse { animation: pulse-glow 2s infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }

/* Stagger children animations */
.stagger-children > * {
  animation: slide-up 0.5s var(--ease-out) both;
}
.stagger-children > *:nth-child(1) { animation-delay: 0s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.35s; }

/* ─── Utilities ─────────────────────────────────── */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; clip: rect(0,0,0,0); overflow: hidden; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pointer { cursor: pointer; }
.relative { position: relative; }

/* ─── Presentation Specific ─────────────────────── */
.presentation-fullscreen {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #000;
  position: relative;
}

.presentation-fullscreen .slide-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.presentation-fullscreen .slide-content {
  width: 100%;
  height: 100%;
}

/* Laser pointer */
.laser-pointer {
  position: fixed;
  width: 12px;
  height: 12px;
  background: #ff4444;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 0 10px #ff4444, 0 0 20px #ff444488;
  transition: opacity 0.15s;
  transform: translate(-50%, -50%);
}

/* Annotations overlay */
.annotations-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
}

.annotations-overlay canvas {
  width: 100%;
  height: 100%;
}

/* Reaction bubbles */
.reaction-bubble {
  position: fixed;
  font-size: 2rem;
  pointer-events: none;
  animation: reaction-float 2s var(--ease-out) forwards;
  z-index: 9997;
}

@keyframes reaction-float {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-100px) scale(1.5); }
}

/* Slide transitions */
.slide-transition-fade {
  animation: fade-in var(--duration-slow) var(--ease-out);
}

.slide-transition-slide-left {
  animation: slide-left-in var(--duration-slow) var(--ease-out);
}

.slide-transition-slide-right {
  animation: slide-right-in var(--duration-slow) var(--ease-out);
}

@keyframes slide-left-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slide-right-in {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ─── Mobile Controller Specific ────────────────── */
@media (max-width: 768px) {
  .controller-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
  }

  .controller-preview {
    flex: 0 0 30%;
    padding: var(--space-sm);
  }

  .controller-notes {
    flex: 1;
    padding: var(--space-md);
    overflow-y: auto;
  }

  .controller-controls {
    flex: 0 0 auto;
    padding: var(--space-md);
    border-top: 1px solid var(--border);
    display: flex;
    gap: var(--space-md);
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
  }

  .controller-nav-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* ─── Survey Form Styles ────────────────────────── */
.survey-container {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-xl);
}

.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
  transition: border-color var(--duration-normal);
}

.question-card:focus-within {
  border-color: var(--border-accent);
}

.question-text {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: var(--space-md);
}

.question-required {
  color: var(--error);
  margin-left: 2px;
}

.radio-group, .checkbox-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.radio-option, .checkbox-option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--duration-fast);
}

.radio-option:hover, .checkbox-option:hover {
  background: var(--bg-glass);
}

.radio-option input, .checkbox-option input {
  accent-color: var(--accent-primary);
  width: 18px;
  height: 18px;
}

/* Rating stars */
.rating-group {
  display: flex;
  gap: var(--space-xs);
}

.rating-star {
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--duration-fast), transform var(--duration-fast);
}

.rating-star:hover, .rating-star.active {
  color: var(--warning);
  transform: scale(1.15);
}

/* Scale slider */
.scale-group {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.scale-input {
  flex: 1;
  accent-color: var(--accent-primary);
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: var(--space-xs);
}
