/* === CSS Variables - Neon Theme === */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-tertiary: #1a1a24;
  --bg-card: linear-gradient(135deg, rgba(20, 20, 30, 0.95) 0%, rgba(30, 30, 45, 0.9) 100%);
  --text-primary: #ffffff;
  --text-secondary: #b8b8d1;
  --text-muted: #7a7a95;
  --accent: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --accent-cyan: #00f5ff;
  --accent-purple: #a855f7;
  --accent-pink: #ec4899;
  --accent-hover: linear-gradient(135deg, #5568d3 0%, #614091 100%);
  --accent-light: rgba(102, 126, 234, 0.15);
  --danger: #ff3366;
  --danger-hover: #e6003d;
  --success: #00ff88;
  --warning: #ffaa00;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --glow: 0 0 20px rgba(102, 126, 234, 0.5);
  --glow-cyan: 0 0 20px rgba(0, 245, 255, 0.6), 0 0 40px rgba(0, 245, 255, 0.3);
  --glow-purple: 0 0 20px rgba(168, 85, 247, 0.6), 0 0 40px rgba(168, 85, 247, 0.3);
  --glow-pink: 0 0 20px rgba(236, 72, 153, 0.6), 0 0 40px rgba(236, 72, 153, 0.3);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 6px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset & Base === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 40% 10%, rgba(0, 245, 255, 0.1) 0%, transparent 50%);
  animation: gradientShift 20s ease infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes gradientShift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-10%, -10%); }
}

.view {
  position: relative;
  z-index: 1;
}

/* === Views === */
.view {
  display: none;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.view.active {
  display: flex;
  flex-direction: column;
}

/* === Buttons - Neon Style === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: var(--glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--glow), 0 0 30px rgba(102, 126, 234, 0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-danger {
  background: var(--danger);
  color: white;
  box-shadow: 0 0 20px rgba(255, 51, 102, 0.5);
}

.btn-danger:hover {
  background: var(--danger-hover);
  box-shadow: 0 0 30px rgba(255, 51, 102, 0.6), 0 0 40px rgba(255, 51, 102, 0.3);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: var(--radius);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-icon-sm {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.btn-icon-sm:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-icon-sm.active {
  background: var(--accent);
}

.btn-icon {
  font-size: 18px;
}

/* === Input === */
.input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition);
}

.input:focus {
  border-color: var(--accent);
}

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

/* === LOBBY === */
.lobby-header {
  padding: 20px 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  font-size: 28px;
}

.logo h1 {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.user-info {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: white;
}

.lobby-actions {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.join-form {
  display: flex;
  gap: 8px;
}

.join-form .input {
  flex: 1;
}

.rooms-section {
  flex: 1;
  padding: 12px 16px;
  overflow-y: auto;
}

.rooms-section h2 {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.rooms-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.room-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--border);
}

.room-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.room-card-info {
  flex: 1;
}

.room-card-name {
  font-weight: 600;
  font-size: 15px;
}

.room-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  gap: 10px;
}

.room-card-role {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--accent-light);
  color: var(--accent);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* === MODAL === */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  width: 100%;
  max-width: 420px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 18px;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-body label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* === CONFERENCE === */
.conf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  z-index: 10;
  flex-shrink: 0;
}

.conf-info {
  display: flex;
  flex-direction: column;
}

.conf-name {
  font-weight: 600;
  font-size: 15px;
}

.conf-count {
  font-size: 12px;
  color: var(--text-muted);
}

.conf-header-actions {
  display: flex;
  gap: 6px;
}

/* === Video Grid === */
.video-grid {
  flex: 1;
  display: grid;
  gap: 8px;
  padding: 8px;
  overflow: hidden;
  background: transparent;
}

/* Dynamic grid layouts */
.video-grid[data-count="1"] { grid-template-columns: 1fr; }
.video-grid[data-count="2"] { grid-template-columns: 1fr 1fr; }
.video-grid[data-count="3"],
.video-grid[data-count="4"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.video-grid[data-count="5"],
.video-grid[data-count="6"] { grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.video-grid[data-count="7"],
.video-grid[data-count="8"],
.video-grid[data-count="9"] { grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr 1fr; }

.video-container {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 0;
  border: 1px solid rgba(102, 126, 234, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(102, 126, 234, 0.05);
  transition: all var(--transition);
}

.video-container:hover {
  border-color: rgba(102, 126, 234, 0.4);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.3), inset 0 0 30px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-container.local video {
  transform: scaleX(-1);
}

.video-container.no-video {
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-container.no-video video {
  display: none;
}

.video-container.no-video::before {
  content: attr(data-initials);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-secondary);
  width: 64px;
  height: 64px;
  background: var(--bg-tertiary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.video-name {
  font-size: 12px;
  font-weight: 500;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.video-indicators {
  display: flex;
  gap: 4px;
  font-size: 12px;
}

.indicator-muted {
  color: var(--danger);
}

.indicator-hand {
  animation: pulse 1s infinite;
}

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

/* === Video controls === */
.video-mute-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  color: white;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.2s;
  z-index: 2;
}

.video-container:hover .video-mute-btn {
  opacity: 1;
}

.video-mute-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

.video-mute-btn.muted {
  background: rgba(220, 38, 38, 0.8);
}

/* Mic indicator on video label */
.mic-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

.mic-indicator.muted {
  color: var(--danger);
}

.mic-indicator.speaking {
  animation: speaking 0.3s ease-in-out;
}

@keyframes speaking {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.audio-level {
  width: 20px;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  overflow: hidden;
  margin-left: 4px;
}

.audio-level-bar {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #10b981);
  width: 0%;
  transition: width 0.1s;
  border-radius: 2px;
}

/* === Screen Share === */
.screen-share-view {
  position: absolute;
  top: 50px;
  left: 0;
  right: 0;
  bottom: 80px;
  z-index: 5;
  background: #000;
  display: flex;
  flex-direction: column;
}

.screen-share-view video {
  flex: 1;
  width: 100%;
  object-fit: contain;
}

.screen-share-label {
  padding: 8px 12px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

/* === Controls Bar === */
.controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(17, 17, 24, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(102, 126, 234, 0.2);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  z-index: 10;
}

.controls-left, .controls-center, .controls-right {
  display: flex;
  gap: 8px;
}

.ctrl-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(26, 26, 36, 0.8);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition);
  min-width: 60px;
  position: relative;
  overflow: hidden;
}

.ctrl-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0%;
  height: 2px;
  background: var(--accent-cyan);
  transition: width var(--transition);
}

.ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(102, 126, 234, 0.4);
  transform: translateY(-2px);
}

.ctrl-btn:hover::after {
  width: 80%;
}

.ctrl-btn.active {
  background: var(--accent);
  border-color: var(--accent-purple);
  color: white;
  box-shadow: var(--glow);
}

.ctrl-btn.active::after {
  width: 100%;
  background: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
}

.ctrl-btn.danger {
  background: linear-gradient(135deg, #ff3366 0%, #e6003d 100%);
  border-color: var(--danger);
  color: white;
  box-shadow: 0 0 20px rgba(255, 51, 102, 0.4);
}

.ctrl-btn.danger:hover {
  background: linear-gradient(135deg, #e6003d 0%, #cc0033 100%);
  box-shadow: 0 0 30px rgba(255, 51, 102, 0.6), 0 0 40px rgba(255, 51, 102, 0.3);
  transform: translateY(-2px);
}

.ctrl-btn.warning {
  background: linear-gradient(135deg, #ffaa00 0%, #ff8800 100%);
  border-color: var(--warning);
  color: white;
  box-shadow: 0 0 20px rgba(255, 170, 0, 0.4);
}

.ctrl-icon {
  font-size: 20px;
}

.ctrl-label {
  font-size: 10px;
  font-weight: 500;
}

/* === Reaction Picker === */
.reaction-picker {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 8px;
  display: flex;
  gap: 4px;
  box-shadow: var(--shadow);
  z-index: 20;
}

.reaction-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  font-size: 22px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.reaction-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* === Reactions Overlay === */
.reactions-overlay {
  position: absolute;
  top: 50px;
  left: 0;
  right: 0;
  bottom: 80px;
  pointer-events: none;
  z-index: 15;
  overflow: hidden;
}

.floating-reaction {
  position: absolute;
  font-size: 32px;
  animation: floatUp 2s ease-out forwards;
  pointer-events: none;
}

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

/* === Side Panel === */
.side-panel {
  position: absolute;
  top: 50px;
  right: 0;
  bottom: 80px;
  width: 320px;
  max-width: 85vw;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 20;
  transform: translateX(0);
  transition: transform 0.25s ease;
}

.side-panel.hidden {
  transform: translateX(100%);
  pointer-events: none;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.panel-header h3 {
  font-size: 16px;
}

.panel-close {
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* === Chat === */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chat-msg {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  max-width: 85%;
}

.chat-msg.incoming {
  background: var(--bg-card);
  align-self: flex-start;
}

.chat-msg.outgoing {
  background: var(--accent);
  color: white;
  align-self: flex-end;
}

.chat-msg.system {
  background: none;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
  align-self: center;
  font-style: italic;
}

.chat-msg-author {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 2px;
}

.chat-msg.outgoing .chat-msg-author {
  color: rgba(255, 255, 255, 0.8);
}

.chat-msg-text {
  font-size: 14px;
  word-break: break-word;
}

.chat-msg-time {
  font-size: 10px;
  color: var(--text-muted);
  text-align: right;
  margin-top: 2px;
}

.chat-msg.outgoing .chat-msg-time {
  color: rgba(255, 255, 255, 0.6);
}

.chat-input-area {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
}

.chat-input-area .input {
  flex: 1;
  padding: 10px 14px;
}

/* === Participants List === */
.participants-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.participant-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.participant-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.participant-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.participant-info {
  flex: 1;
  min-width: 0;
}

.participant-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.participant-role {
  font-size: 11px;
  color: var(--text-muted);
}

.participant-role.admin { color: var(--warning); }
.participant-role.helper { color: var(--accent); }

.participant-actions {
  display: flex;
  gap: 4px;
}

.participant-action-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.participant-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.participant-action-btn.danger:hover {
  background: rgba(231, 76, 60, 0.2);
  color: var(--danger);
}

/* === Settings === */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-tertiary);
  border-radius: 12px;
  transition: var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: var(--transition);
}

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

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.admin-section {
  margin-top: 16px;
}

.admin-section h3 {
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.admin-users-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
}

.admin-user-info {
  flex: 1;
}

.admin-user-name {
  font-size: 14px;
  font-weight: 500;
}

.admin-user-role {
  font-size: 12px;
  color: var(--text-muted);
}

.admin-user-actions {
  display: flex;
  gap: 4px;
}

.admin-user-actions select {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 4px 8px;
  font-size: 12px;
}

/* === Toast === */
.toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: white;
  box-shadow: var(--shadow);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s;
  pointer-events: auto;
}

.toast.info { background: var(--accent); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }

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

@keyframes toastOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* === Hidden === */
.hidden:not(.side-panel) {
  display: none !important;
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 4px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 2px;
}

/* === Mobile Responsive === */
@media (max-width: 600px) {
  .ctrl-label {
    display: none;
  }

  .ctrl-btn {
    padding: 8px;
    min-width: 44px;
  }

  .side-panel {
    width: 100%;
    max-width: 100vw;
  }

  .video-grid[data-count="3"],
  .video-grid[data-count="4"] {
    grid-template-columns: 1fr 1fr;
  }

  .video-grid[data-count="5"],
  .video-grid[data-count="6"],
  .video-grid[data-count="7"],
  .video-grid[data-count="8"],
  .video-grid[data-count="9"] {
    grid-template-columns: 1fr 1fr;
  }

  .lobby-header {
    padding: 16px 12px 8px;
  }

  .logo h1 {
    font-size: 18px;
  }

  .conf-header {
    padding: 6px 8px;
  }

  .controls-bar {
    padding: 6px 8px;
  }

  .reaction-picker {
    bottom: 70px;
  }
}

/* === Landscape mobile === */
@media (max-height: 500px) and (orientation: landscape) {
  .controls-bar {
    padding: 4px 8px;
  }

  .ctrl-btn {
    padding: 4px 8px;
  }

  .conf-header {
    padding: 4px 8px;
  }

  .video-grid {
    gap: 2px;
    padding: 2px;
  }
}

/* === Animations === */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.view.active {
  animation: fadeIn 0.2s ease;
}
