:root {
  --bg-void: #080c14;
  --bg-deep: #0d1220;
  --bg-surface: #131929;
  --bg-elevated: #1a2235;
  --bg-hover: #1f2a42;
  --bg-card: #162032;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text-primary: #e8edf5;
  --text-secondary: #8b97b0;
  --text-muted: #4d5c78;
  --accent-teal: #00d4b8;
  --accent-teal-dim: rgba(0, 212, 184, 0.15);
  --accent-teal-glow: rgba(0, 212, 184, 0.3);
  --accent-blue: #3b82f6;
  --accent-red: #ef4444;
  --accent-green: #22c55e;
  --accent-yellow: #eab308;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-teal: 0 0 30px rgba(0, 212, 184, 0.2);
  --font-display: "Syne", sans-serif;
  --font-body: "DM Sans", sans-serif;
}
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body,
#root {
  width: 100%;
  min-height: 100vh;
}
body {
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 2px;
}
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-body);
}
input,
textarea,
select {
  font-family: var(--font-body);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  width: 100%;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 3px var(--accent-teal-dim);
}
input::placeholder {
  color: var(--text-muted);
}
a {
  color: var(--accent-teal);
  text-decoration: none;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideUpSheet {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}
@keyframes recording-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}
@keyframes notif-enter {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes speaking-ring {
  0%,
  100% {
    box-shadow: 0 0 0 0px rgba(0, 212, 184, 0.6);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(0, 212, 184, 0.3);
  }
}
@keyframes float-up {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-80px) scale(1.4);
  }
}

.landing {
  width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-void);
  overflow-y: auto;
}
.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 12, 20, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}
.brand-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}
.btn-ghost:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn-primary {
  background: var(--accent-teal);
  color: var(--bg-void);
  font-weight: 600;
}
.btn-primary:hover {
  background: #00f0d0;
  box-shadow: var(--shadow-teal);
  transform: translateY(-1px);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}
.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}
.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.btn-icon.active {
  background: var(--accent-teal);
  color: var(--bg-void);
}

.landing-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.hero-bg-orb.orb1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 212, 184, 0.08), transparent);
  top: -80px;
  left: -80px;
}
.hero-bg-orb.orb2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08), transparent);
  bottom: -40px;
  right: -40px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-teal-dim);
  border: 1px solid rgba(0, 212, 184, 0.2);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--accent-teal);
  font-weight: 500;
  margin-bottom: 24px;
  animation: fadeIn 0.6s ease;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  animation: fadeIn 0.6s ease 0.1s both;
}
.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: 32px;
  line-height: 1.6;
  animation: fadeIn 0.6s ease 0.2s both;
}
.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeIn 0.6s ease 0.3s both;
  margin-bottom: 40px;
}
.hero-actions .btn {
  padding: 12px 24px;
  font-size: 15px;
}
.meeting-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 100%;
  max-width: 460px;
  animation: fadeIn 0.6s ease 0.4s both;
  box-shadow: var(--shadow-lg);
}
.meeting-card-tabs {
  display: flex;
  background: var(--bg-deep);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 20px;
  gap: 4px;
}
.tab-btn {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.tab-btn.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.lobby {
  width: 100%;
  min-height: 100vh;
  display: flex;
}
.lobby-preview {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-void);
  padding: 32px;
}
.lobby-sidebar {
  width: 360px;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 28px;
  overflow-y: auto;
}
.camera-preview {
  width: 100%;
  max-width: 460px;
  aspect-ratio: 16/9;
  background: var(--bg-deep);
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-subtle);
}
.camera-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}
.camera-preview-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-display);
}
.lobby-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
}
.lobby-sidebar-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}
.lobby-info {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 22px;
}
.lobby-meeting-id {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-family: monospace;
  font-size: 12px;
  color: var(--accent-teal);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 8px;
}
.lobby-field {
  margin-bottom: 14px;
}
.lobby-field label {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 5px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.role-select {
  display: flex;
  gap: 8px;
}
.role-btn {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.role-btn.active {
  border-color: var(--accent-teal);
  background: var(--accent-teal-dim);
  color: var(--accent-teal);
}
.role-btn .role-icon {
  font-size: 18px;
  display: block;
  margin-bottom: 4px;
}
.role-btn .role-label {
  font-size: 12px;
  font-weight: 500;
}

.meeting-room {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-void);
  overflow: hidden;
}
.meeting-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  z-index: 20;
}
.meeting-title-area {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.meeting-id-badge {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-size: 11px;
  color: var(--text-secondary);
  font-family: monospace;
  white-space: nowrap;
  flex-shrink: 0;
}
.recording-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 100px;
  padding: 3px 8px;
  font-size: 11px;
  color: var(--accent-red);
  font-weight: 600;
}
.rec-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-red);
  animation: recording-blink 1.5s infinite;
}
.meeting-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
  position: relative;
}
.video-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 10px;
  gap: 8px;
  min-width: 0;
}
.video-grid {
  flex: 1;
  display: grid;
  gap: 6px;
  min-height: 0;
}
.video-tile {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  transition: border-color 0.2s;
  min-height: 0;
  cursor: pointer;
}
.video-tile.speaking {
  border-color: var(--accent-teal);
  animation: speaking-ring 1s infinite;
}
.video-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-tile-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 90%;
}
.tile-avatar-name {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.tile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 700;
  font-family: var(--font-display);
}
.tile-avatar-img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
}
.profile-pic-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 0 20px;
}
.profile-pic-circle {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 30px;
  font-weight: 700;
  font-family: var(--font-display);
  border: 3px solid var(--border-subtle);
  transition: border-color 0.2s;
}
.profile-pic-circle:hover {
  border-color: var(--accent-teal);
}
.profile-pic-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-pic-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}
.profile-pic-hint {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}
.tile-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.tile-name {
  font-size: 12px;
  font-weight: 600;
  color: white;
}
.tile-badges {
  display: flex;
  gap: 3px;
}
.tile-badge {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
}
.tile-badge.muted {
  background: rgba(239, 68, 68, 0.7);
}
/* ---- Tile manage button (⋮) — top-right, hover-revealed ---- */
.tile-manage-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 14px;
  padding: 2px 8px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 5;
  line-height: 1.5;
  letter-spacing: 1px;
}
.video-tile:hover .tile-manage-btn,
.video-tile:focus-within .tile-manage-btn {
  opacity: 1;
}
@media (hover: none) {
  .tile-manage-btn {
    opacity: 0.75;
  }
}

/* ---- Responsive tile avatar via container queries ---- */
.video-tile {
  container-type: size;
}
/* Small tiles: narrow width (e.g. 2-up on mobile) */
@container (max-width: 180px) {
  .tile-avatar {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }
  .tile-avatar-img {
    width: 44px;
    height: 44px;
  }
  .video-tile-avatar {
    gap: 4px;
  }
  .tile-avatar-name {
    font-size: 10px;
  }
  .tile-name {
    font-size: 10px;
  }
  .tile-info {
    padding: 4px 6px;
  }
  .tile-badge {
    width: 16px;
    height: 16px;
    font-size: 8px;
  }
}
/* Very small tiles: filmstrip thumbnails */
@container (max-height: 110px) {
  .tile-avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
  .tile-avatar-img {
    width: 32px;
    height: 32px;
  }
  .video-tile-avatar {
    gap: 2px;
  }
  .tile-avatar-name {
    font-size: 8px;
  }
  .tile-name {
    font-size: 9px;
  }
  .tile-info {
    padding: 2px 5px;
  }
  .tile-manage-btn {
    font-size: 11px;
    padding: 1px 5px;
    top: 2px;
    right: 2px;
  }
}
/* Medium tiles (e.g. 3-up grid) */
@container (min-width: 181px) and (max-width: 320px) {
  .tile-avatar {
    width: 56px;
    height: 56px;
    font-size: 20px;
  }
  .tile-avatar-img {
    width: 56px;
    height: 56px;
  }
  .video-tile-avatar {
    gap: 5px;
  }
  .tile-avatar-name {
    font-size: 11px;
  }
}

.meeting-sidebar {
  width: 290px;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
  min-height: 0;
  animation: slideInRight 0.25s ease;
}
.sidebar-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
}
.sidebar-tab {
  flex: 1;
  padding: 11px 6px;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.sidebar-tab.active {
  color: var(--accent-teal);
  border-bottom-color: var(--accent-teal);
}
.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.participant-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: var(--radius-md);
  transition: background 0.15s;
}
.participant-item:hover {
  background: var(--bg-elevated);
}
.p-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.p-role-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 100px;
}
.p-role-badge.controller {
  background: rgba(0, 212, 184, 0.15);
  color: var(--accent-teal);
}
.p-role-badge.member {
  background: var(--bg-elevated);
  color: var(--text-muted);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-msg {
  display: flex;
  gap: 8px;
  animation: fadeIn 0.2s ease;
}
.chat-msg-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}
.chat-msg-content {
  flex: 1;
}
.chat-msg-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
}
.chat-msg-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-teal);
}
.chat-msg-time {
  font-size: 10px;
  color: var(--text-muted);
}
.chat-msg-text {
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border-radius: 0 10px 10px 10px;
  padding: 7px 11px;
  display: inline-block;
  word-break: break-word;
  max-width: 100%;
}
.chat-msg.own {
  flex-direction: row-reverse;
}
.chat-msg.own .chat-msg-text {
  background: var(--accent-teal-dim);
  border-radius: 10px 0 10px 10px;
}
.chat-input-area {
  padding: 10px 12px;
  border-top: 1px solid var(--border-subtle);
}
.chat-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.chat-input-row textarea {
  resize: none;
  min-height: 38px;
  max-height: 90px;
  padding: 9px 11px;
  font-size: 13px;
}

.meeting-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 14px;
  background: var(--bg-deep);
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.toolbar-group {
  display: flex;
  align-items: center;
  gap: 4px;
}
.toolbar-divider {
  width: 1px;
  height: 28px;
  background: var(--border-subtle);
  margin: 0 2px;
}
.toolbar-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.15s;
  position: relative;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}
.toolbar-btn:hover {
  background: var(--bg-hover);
}
.toolbar-btn.active {
  background: var(--accent-teal);
  color: var(--bg-void);
  border-color: transparent;
}
.toolbar-btn.active-red {
  background: var(--accent-red);
  color: white;
  border-color: transparent;
}
.toolbar-btn .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 15px;
  height: 15px;
  background: var(--accent-red);
  border-radius: 100px;
  font-size: 8px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  padding: 0 3px;
  border: 2px solid var(--bg-deep);
}
.toolbar-label {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 2px;
}
.toolbar-btn-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.leave-btn {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.25);
  padding: 0 14px;
  height: 44px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.leave-btn:hover {
  background: var(--accent-red);
  color: white;
}

/* FLOATING PARTICIPANT ACTIONS - overlay on full screen */
.participant-actions-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}
.participant-actions-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}
.participant-actions-card {
  position: relative;
  z-index: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 20px;
  min-width: 220px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s ease;
}
.participant-actions-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.participant-action-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.1s;
  color: var(--text-primary);
  border: none;
  background: none;
  font-family: var(--font-body);
  text-align: left;
}
.participant-action-btn:hover {
  background: var(--bg-elevated);
}
.participant-action-btn.danger {
  color: var(--accent-red);
}
.participant-action-btn.danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}
.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px;
  width: 90%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s ease;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-lg {
  max-width: 580px;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 5px;
}
.modal-sub {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 20px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.notif-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.notif-toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-md);
  animation: notif-enter 0.3s ease;
  min-width: 220px;
  max-width: 290px;
  pointer-events: all;
}
.notif-toast.success {
  border-left: 3px solid var(--accent-green);
}
.notif-toast.error {
  border-left: 3px solid var(--accent-red);
}
.notif-toast.info {
  border-left: 3px solid var(--accent-blue);
}
.notif-toast.warning {
  border-left: 3px solid var(--accent-yellow);
}
.notif-icon {
  font-size: 15px;
}
.notif-text {
  flex: 1;
  font-size: 12px;
}
.notif-text strong {
  display: block;
  font-weight: 600;
  margin-bottom: 1px;
}
.notif-text span {
  color: var(--text-secondary);
  font-size: 11px;
}

.raise-hand-indicator {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 18px;
  animation: float 1.5s ease-in-out infinite;
}
.screen-share-notice {
  background: rgba(0, 212, 184, 0.1);
  border: 1px solid rgba(0, 212, 184, 0.2);
  border-radius: var(--radius-md);
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--accent-teal);
}
/* ---- Screen-share layout (Google Meet style) ---- */
.video-area.sharing,
.video-area.pinned-layout {
  flex-direction: row;
  padding: 8px;
  gap: 8px;
  align-items: stretch;
}
.screenshare-main {
  flex: 1;
  min-width: 0;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.screenshare-main video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* VideoTile inside the pinned main pane should fill it */
.screenshare-main .video-tile {
  width: 100%;
  height: 100%;
  border-radius: 0;
}
.screenshare-strip {
  width: 160px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border-subtle) transparent;
}
.screenshare-strip .video-tile {
  width: 100%;
  aspect-ratio: 16/9;
  flex-shrink: 0;
}
.screenshare-strip-label {
  font-size: 10px;
  color: var(--text-secondary);
  text-align: center;
  padding: 2px 0 4px;
  flex-shrink: 0;
}
/* Active-reactions bar inside sharing layout */
.video-area.sharing .active-reactions-bar,
.video-area.pinned-layout .active-reactions-bar {
  left: 8px;
}
/* ---- Mobile: screen-share or pinned — filmstrip at TOP, main below ---- */
@media (max-width: 768px) {
  .video-area.pinned-layout,
  .video-area.sharing {
    flex-direction: column;
    padding: 0;
    gap: 0;
  }
  .video-area.pinned-layout .screenshare-main,
  .video-area.sharing .screenshare-main {
    flex: 1;
    border-radius: 0;
    min-height: 0;
  }
  .video-area.pinned-layout .screenshare-strip,
  .video-area.sharing .screenshare-strip {
    width: 100%;
    height: 96px;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    flex-shrink: 0;
    padding: 6px 8px;
    gap: 6px;
    /* strip moves to TOP via order */
    order: -1;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    scrollbar-width: thin;
  }
  .video-area.pinned-layout .screenshare-strip .video-tile,
  .video-area.sharing .screenshare-strip .video-tile {
    width: auto;
    height: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--radius-md);
  }
  .video-area.pinned-layout .screenshare-strip-label,
  .video-area.sharing .screenshare-strip-label {
    display: none;
  }
  .video-area.pinned-layout .active-reactions-bar,
  .video-area.sharing .active-reactions-bar {
    left: 0;
  }
}

.active-reactions-bar {
  position: fixed;
  bottom: 100px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
  flex-wrap: wrap;
  padding: 0 20px;
  z-index: 500;
}
.floating-reaction {
  font-size: 36px;
  animation: float-up 2.5s ease-out forwards;
}
.emoji-picker {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
}
.emoji-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.1s;
}
.emoji-btn:hover {
  background: var(--bg-hover);
}

.settings-page {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  background: var(--bg-void);
}
.settings-nav {
  width: 190px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-shrink: 0;
}
.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.settings-nav-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.settings-nav-item.active {
  background: var(--accent-teal-dim);
  color: var(--accent-teal);
}
.settings-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
}
/* Settings as an in-call popup */
.settings-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s ease;
  padding: 16px;
}
.settings-modal-wrap {
  position: relative;
  width: 100%;
  max-width: 860px;
  height: 88vh;
  max-height: 88vh;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(0, 212, 184, 0.45);
  overflow: hidden;
  animation: slideUp 0.2s ease;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 0 0 1px rgba(0, 212, 184, 0.12),
    var(--shadow-lg);
}
.settings-modal-wrap .settings-page {
  min-height: 0;
  flex: 1;
  overflow: hidden;
}
.settings-modal-wrap .settings-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.settings-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}
.settings-modal-close:hover {
  background: var(--danger);
  color: #fff;
  border-color: transparent;
}
/* Mobile header shown only on small screens */
.settings-mobile-header {
  display: none;
}
/* Mobile tab bar shown only on small screens */
.settings-mobile-tabs {
  display: none;
}
@media (max-width: 600px) {
  .settings-page {
    flex-direction: column;
  }
  /* Hide desktop sidebar */
  .settings-nav {
    display: none;
  }
  /* Show mobile header */
  .settings-mobile-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
  }
  .settings-mobile-header .brand {
    font-size: 14px;
  }
  /* Show scrollable icon tab bar */
  .settings-mobile-tabs {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    gap: 4px;
    padding: 10px 12px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
  }
  .settings-mobile-tabs::-webkit-scrollbar {
    display: none;
  }
  .settings-mobile-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 11px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
  }
  .settings-mobile-tab .tab-icon {
    font-size: 18px;
  }
  .settings-mobile-tab:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
  }
  .settings-mobile-tab.active {
    background: var(--accent-teal-dim);
    color: var(--accent-teal);
  }
  .settings-content {
    padding: 20px 16px;
  }
}
.settings-section-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 5px;
}
.settings-section-sub {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 22px;
}
.settings-group {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
}
.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-subtle);
  gap: 16px;
}
.settings-item:last-child {
  border-bottom: none;
}
.settings-item-info {
  flex: 1;
}
.settings-item-label {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
}
.settings-item-desc {
  font-size: 12px;
  color: var(--text-secondary);
}
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-hover);
  border-radius: 100px;
  cursor: pointer;
  transition: 0.2s;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.2s;
}
.toggle input:checked + .toggle-slider {
  background: var(--accent-teal);
}
.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.breakout-room-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 10px;
}
.schedule-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 10px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.schedule-date-badge {
  background: var(--accent-teal-dim);
  border: 1px solid rgba(0, 212, 184, 0.2);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  text-align: center;
  flex-shrink: 0;
  min-width: 56px;
}
.schedule-date-badge .day {
  font-size: 20px;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--accent-teal);
}
.schedule-date-badge .month {
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
}
/* schedule page header row */
.schedule-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: nowrap;
}
.schedule-header-titles {
  flex: 1;
  min-width: 0;
}
.schedule-heading {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.schedule-sub {
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 2px;
}
@media (max-width: 480px) {
  .schedule-heading {
    font-size: 15px;
  }
  .schedule-card {
    padding: 12px;
    gap: 10px;
  }
  .schedule-date-badge {
    padding: 6px 8px;
    min-width: 46px;
  }
  .schedule-date-badge .day {
    font-size: 16px;
  }
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 32px 0;
  max-width: 860px;
  width: 100%;
  animation: fadeIn 0.6s ease 0.5s both;
}
.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: all 0.2s;
}
.feature-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.feature-icon {
  font-size: 24px;
  margin-bottom: 8px;
}
.feature-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 3px;
}
.feature-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

.divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 18px 0;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
}
.tag-teal {
  background: var(--accent-teal-dim);
  color: var(--accent-teal);
}
.tag-red {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
}
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 16px;
  color: var(--text-muted);
  text-align: center;
  gap: 8px;
}
.empty-state .empty-icon {
  font-size: 30px;
}
.empty-state .empty-text {
  font-size: 13px;
}
.loader {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-subtle);
  border-top-color: var(--accent-teal);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
.kbd {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 3px 7px;
  font-family: monospace;
  font-size: 12px;
}
.vol-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.vol-bar-track {
  flex: 1;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}
.vol-bar-fill {
  height: 100%;
  background: var(--accent-teal);
  border-radius: 2px;
  transition: width 0.1s;
}
.approval-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 8px;
  animation: slideUp 0.2s ease;
}
.admin-section {
  margin-bottom: 20px;
}
.admin-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}
.permission-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.permission-row:last-child {
  border-bottom: none;
}

/* mobile bottom sheet */
.mobile-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1300;
  animation: fadeIn 0.2s ease;
}
.mobile-sidebar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1400;
  background: var(--bg-surface);
  border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--border-subtle);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
  animation: slideUpSheet 0.25s ease;
  max-height: 72vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.mobile-sidebar-handle {
  width: 36px;
  height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
  margin: 10px auto 6px;
}

@media (max-width: 768px) {
  .landing-nav {
    padding: 12px 16px;
  }
  .nav-actions .btn {
    padding: 7px 10px;
    font-size: 12px;
  }
}
/* Icon-only nav on very small screens */
@media (max-width: 480px) {
  .brand {
    font-size: 14px;
    gap: 6px;
  }
  .brand-icon {
    width: 26px;
    height: 26px;
    font-size: 13px;
    border-radius: 7px;
  }
  .nav-actions {
    gap: 4px;
  }
  .nav-actions .btn {
    width: 38px;
    height: 38px;
    padding: 0;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 17px;
  }
  .nav-label {
    display: none;
  }
  .nav-user-name {
    display: none;
  }
  .landing-hero {
    padding: 36px 16px;
  }
  .hero-sub {
    font-size: 15px;
  }
  .meeting-card {
    padding: 20px;
  }
  .lobby {
    flex-direction: column;
    overflow-y: auto;
  }
  .lobby-preview {
    padding: 20px 16px;
    flex: none;
  }
  .lobby-sidebar {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border-subtle);
    padding: 20px 16px;
    flex: none;
  }
  .camera-preview {
    max-width: 100%;
  }
  .lobby-sidebar-title {
    font-size: 18px;
  }
  .meeting-header {
    padding: 7px 10px;
  }
  .meeting-id-badge {
    display: none;
  }
  .meeting-body {
    flex-direction: column;
  }
  .meeting-sidebar {
    display: none !important;
  }
  .meeting-toolbar {
    padding: 6px 8px;
    gap: 3px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    background: rgba(13, 18, 32, 0.97);
    backdrop-filter: blur(8px);
  }
  .toolbar-btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  .toolbar-label {
    font-size: 8px;
  }
  .leave-btn {
    padding: 0 10px;
    height: 40px;
    font-size: 11px;
  }
  .toolbar-divider {
    height: 24px;
  }
  .video-area {
    padding: 6px;
    padding-bottom: 64px;
  }
  /* Last tile alone in its row (odd count) — center it */
  .video-tile:last-child:nth-child(odd):not(:first-child) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 3px);
  }
}
@media (max-width: 480px) {
  .toolbar-btn {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }
  .leave-btn {
    padding: 0 8px;
    font-size: 10px;
  }
  .toolbar-group {
    gap: 2px;
  }
}
