.expand-volume-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.25rem 0.5rem;
  background: rgba(18,21,31,0.15);
  border-radius: var(--radius-md);
}
#expand-volume-slider {
  width: 120px;
  accent-color: #007cf0;
}
#expand-mute-btn {
  padding: 0.2rem 0.5rem;
  font-size: 1.1rem;
  border: none;
  background: none;
  cursor: pointer;
}
#expand-mute-icon {
  font-size: 1.2rem;
}
.watch-volume-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.25rem 0.5rem;
  background: rgba(18,21,31,0.15);
  border-radius: var(--radius-md);
}
#watch-volume-slider {
  width: 120px;
  accent-color: #00e5a0;
}
#watch-mute-btn {
  padding: 0.2rem 0.5rem;
  font-size: 1.1rem;
  border: none;
  background: none;
  cursor: pointer;
}
#watch-mute-icon {
  font-size: 1.2rem;
}
/* ========== RESET & BASE ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-deepest: #080a12;
  --bg-deep: #0d0f17;
  --bg-dark: #12151f;
  --bg-mid: #1a1e2e;
  --bg-light: #242940;
  --bg-hover: #2c3252;

  --accent: #00e5a0;
  --accent-glow: rgba(0, 229, 160, 0.25);
  --accent-dim: #00b37d;
  --accent-blue: #007cf0;
  --accent-blue-glow: rgba(0, 124, 240, 0.2);

  --danger: #ff4757;
  --danger-glow: rgba(255, 71, 87, 0.25);
  --warning: #ffa502;

  --text-primary: #e8eaed;
  --text-secondary: #8b92a8;
  --text-dim: #5a6177;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 50%;

  --font-main: 'Outfit', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px var(--accent-glow);
}

html, body {
  height: 100%;
  font-family: var(--font-main);
  background: var(--bg-deepest);
  color: var(--text-primary);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

body {
  overscroll-behavior: none;
}

/* ========== ANIMATED BACKGROUND ========== */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
  animation: float 20s ease-in-out infinite;
}

.bg-glow-1 {
  width: 600px; height: 600px;
  top: -200px; left: -100px;
  background: radial-gradient(circle, rgba(0, 229, 160, 0.08), transparent 70%);
  animation-delay: 0s;
}

.bg-glow-2 {
  width: 500px; height: 500px;
  bottom: -150px; right: -100px;
  background: radial-gradient(circle, rgba(0, 124, 240, 0.06), transparent 70%);
  animation-delay: -7s;
}

.bg-glow-3 {
  width: 400px; height: 400px;
  top: 40%; left: 50%;
  background: radial-gradient(circle, rgba(0, 229, 160, 0.04), transparent 70%);
  animation-delay: -14s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.05); }
  66% { transform: translate(-20px, 30px) scale(0.95); }
}

/* ========== SCREENS ========== */
.screen {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1;
}

.screen.active {
  display: flex;
  animation: fadeIn 0.5s ease;
}

#landing-screen {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

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

/* ========== MIC PERMISSION SCREEN ========== */
.mic-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  max-width: 400px;
  animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.mic-icon-large {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.mic-icon-large svg {
  width: 44px;
  height: 44px;
  color: var(--bg-deepest);
}

.mic-ring {
  position: absolute;
  inset: -8px;
  border-radius: var(--radius-full);
  border: 2px solid var(--accent);
  opacity: 0;
  animation: micRing 3s ease-out infinite;
}

.mic-ring-2 { animation-delay: 0.6s; }
.mic-ring-3 { animation-delay: 1.2s; }

@keyframes micRing {
  0% { inset: 0; opacity: 0.6; }
  100% { inset: -30px; opacity: 0; }
}

.mic-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.mic-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.mic-error {
  color: var(--danger);
  font-size: 0.85rem;
  background: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.2);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  animation: shake 0.5s ease;
}

/* ========== LANDING SCREEN ========== */
.landing-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 2rem;
  gap: 2.5rem;
}

.landing-main {
  width: 100%;
  max-width: 980px;
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  justify-content: center;
}

.logo-section {
  text-align: center;
  animation: slideDown 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.logo-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  animation: pulse-glow 3s ease-in-out infinite;
}

.logo-icon svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 20px var(--accent-glow));
}

@keyframes pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 20px var(--accent-glow)); }
  50% { filter: drop-shadow(0 0 40px var(--accent-glow)) drop-shadow(0 0 60px rgba(0, 124, 240, 0.15)); }
}

.eye-dot {
  animation: blink 4s ease-in-out infinite;
}

@keyframes blink {
  0%, 45%, 55%, 100% { r: 3; }
  50% { r: 0.5; }
}

.logo-title {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -2px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-highlight {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.tagline {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 300;
  margin-top: 0.5rem;
  letter-spacing: 0.5px;
}

/* ========== LANDING CARD ========== */
.landing-card {
  background: rgba(18, 21, 31, 0.8);
  backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.04);
  animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.servers-card {
  max-width: 360px;
}

/* ========== PROFILE SETUP ========== */
.profile-setup {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.avatar-picker {
  flex-shrink: 0;
}

.avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 3px solid rgba(255, 255, 255, 0.08);
}

.avatar-preview:hover {
  border-color: var(--accent);
  transform: scale(1.05);
}

.avatar-initial {
  font-size: 2rem;
  font-weight: 800;
  color: var(--bg-deepest);
  pointer-events: none;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.25s ease;
  color: white;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.avatar-preview:hover .avatar-overlay {
  opacity: 1;
}

.profile-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.avatar-color-row label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  display: block;
  margin-bottom: 0.4rem;
}

.color-swatches {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.swatch {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.swatch:hover {
  transform: scale(1.2);
}

.swatch.active {
  border-color: white;
  box-shadow: 0 0 10px rgba(255,255,255,0.3);
  transform: scale(1.15);
}

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

/* ========== INPUT STYLES ========== */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.input-group label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
}

.input-group input {
  background: var(--bg-deep);
  border: 1.5px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.25s ease;
  outline: none;
}

.input-group input::placeholder {
  color: var(--text-dim);
  font-weight: 400;
}

.input-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.code-input {
  font-family: var(--font-mono) !important;
  font-size: 1.2rem !important;
  letter-spacing: 4px;
  text-align: center;
  text-transform: uppercase;
}

/* ========== BUTTONS ========== */
.action-buttons {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dim) 100%);
  color: var(--bg-deepest);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--accent-glow), var(--shadow-glow);
}

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

.btn-secondary {
  background: var(--bg-light);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.btn-danger {
  background: rgba(255, 71, 87, 0.15);
  color: var(--danger);
  border: 1px solid rgba(255, 71, 87, 0.2);
}

.btn-danger:hover {
  background: rgba(255, 71, 87, 0.25);
  box-shadow: 0 4px 16px var(--danger-glow);
}

.btn-accent {
  background: rgba(0, 229, 160, 0.1);
  color: var(--accent);
  border: 1px solid rgba(0, 229, 160, 0.2);
}

.btn-accent:hover {
  background: rgba(0, 229, 160, 0.2);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.3rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.btn-icon:hover {
  color: var(--accent);
  background: var(--accent-glow);
}

/* ========== DIVIDER ========== */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 500;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
}

/* ========== JOIN SECTION ========== */
.join-section {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.lobby-visibility-row label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  display: block;
  margin-bottom: 0.4rem;
}

.visibility-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.visibility-btn {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--bg-deep);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.visibility-btn.active {
  color: var(--bg-deepest);
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  border-color: transparent;
}

.public-lobbies-box {
  margin-top: 0;
  background: rgba(13, 15, 23, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 0.65rem;
}

.public-lobbies-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--text-dim);
  font-weight: 700;
}

.public-lobbies-list {
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.public-lobby-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.public-lobby-main {
  min-width: 0;
}

.public-lobby-name {
  font-size: 0.86rem;
  color: var(--text-primary);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.public-lobby-code {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  margin-left: 4px;
}

.public-lobby-empty {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-align: center;
  padding: 0.8rem 0.3rem;
}

/* ========== ERROR MESSAGE ========== */
.error-msg {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.2);
  border-radius: var(--radius-md);
  color: var(--danger);
  font-size: 0.85rem;
  text-align: center;
  animation: shake 0.5s ease;
}

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

.hidden {
  display: none !important;
}

/* ========== LOBBY SCREEN ========== */
.lobby-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

/* ========== HEADER ========== */
.lobby-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: rgba(13, 15, 23, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  z-index: 10;
}

.header-left {
  display: flex;
  align-items: center;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.header-center {
  display: flex;
  align-items: center;
}

.lobby-code-display {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-dark);
  padding: 0.4rem 0.75rem 0.4rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.code-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
}

.code-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent-glow);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-count {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ========== VOICE CHANNEL ========== */
.lobby-main {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.channel-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.channel-header svg {
  color: var(--accent);
}

.connection-status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: pulse 2s ease-in-out infinite;
}

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

.status-text {
  color: var(--accent);
}

/* ========== USERS GRID ========== */
.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.user-card {
  background: var(--bg-dark);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  animation: cardIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

@keyframes cardIn {
  from { opacity: 0; transform: scale(0.9) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.user-card:hover {
  background: var(--bg-mid);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.user-card.speaking {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow), inset 0 0 20px rgba(0, 229, 160, 0.03);
}

.user-card.speaking .user-avatar {
  box-shadow: 0 0 0 3px var(--accent), 0 0 20px var(--accent-glow);
}

.user-card.speaking .voice-waves {
  opacity: 1;
}

.user-avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bg-deepest);
  position: relative;
  transition: all 0.3s ease;
  overflow: hidden;
}

.user-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  border-radius: var(--radius-full);
}

/* ========== VOICE WAVE VISUALIZER ========== */
.voice-waves {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 24px;
  opacity: 0;
  transition: opacity 0.2s ease;
  margin-top: -4px;
}

.voice-wave-bar {
  width: 4px;
  border-radius: 2px;
  background: var(--accent);
  animation: waveBar 0.6s ease-in-out infinite alternate;
  box-shadow: 0 0 6px var(--accent-glow);
}

.voice-wave-bar:nth-child(1) { height: 8px; animation-delay: 0s; }
.voice-wave-bar:nth-child(2) { height: 16px; animation-delay: 0.1s; }
.voice-wave-bar:nth-child(3) { height: 24px; animation-delay: 0.2s; }
.voice-wave-bar:nth-child(4) { height: 16px; animation-delay: 0.3s; }
.voice-wave-bar:nth-child(5) { height: 8px; animation-delay: 0.4s; }

@keyframes waveBar {
  0% { transform: scaleY(0.3); opacity: 0.5; }
  100% { transform: scaleY(1); opacity: 1; }
}

.user-avatar.color-1 { background: linear-gradient(135deg, #00e5a0, #00b37d); }
.user-avatar.color-2 { background: linear-gradient(135deg, #007cf0, #005bb5); }
.user-avatar.color-3 { background: linear-gradient(135deg, #ff6b6b, #ee5a24); }
.user-avatar.color-4 { background: linear-gradient(135deg, #a29bfe, #6c5ce7); }
.user-avatar.color-5 { background: linear-gradient(135deg, #fdcb6e, #f39c12); }
.user-avatar.color-6 { background: linear-gradient(135deg, #fd79a8, #e84393); }
.user-avatar.color-7 { background: linear-gradient(135deg, #55efc4, #00b894); }
.user-avatar.color-8 { background: linear-gradient(135deg, #74b9ff, #0984e3); }

.user-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-badges {
  display: flex;
  gap: 0.4rem;
}

.badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
}

.badge svg {
  width: 14px;
  height: 14px;
}

.badge.muted {
  color: var(--danger);
  background: var(--danger-glow);
}

.badge.deafened {
  color: var(--danger);
  background: var(--danger-glow);
}

.user-card.is-you::after {
  content: 'YOU';
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent);
  background: rgba(0, 229, 160, 0.1);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

/* ========== BOTTOM CONTROLS ========== */
.lobby-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: rgba(13, 15, 23, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.controls-left {
  display: flex;
  align-items: center;
}

.self-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.self-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--bg-deepest);
  overflow: hidden;
  position: relative;
}

.self-avatar-letter {
  pointer-events: none;
}

.self-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.self-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.controls-center {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.control-btn {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--bg-mid);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  position: relative;
}

.control-btn svg {
  width: 22px;
  height: 22px;
}

.control-btn:hover {
  background: var(--bg-light);
  transform: scale(1.05);
}

.control-btn.active {
  background: var(--danger);
  color: white;
  box-shadow: 0 4px 16px var(--danger-glow);
}

.control-btn.active:hover {
  background: #ff6b81;
}

.controls-right {
  display: flex;
  align-items: center;
}

/* ========== TOAST ========== */
.toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-mid);
  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 100;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 6px;
}

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

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

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

/* ========== VIDEO IN USER CARDS ========== */
.user-video-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-video {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--bg-deepest);
}

.user-card.has-video .user-avatar {
  position: absolute;
  bottom: 6px;
  left: 6px;
  width: 28px;
  height: 28px;
  font-size: 0.75rem;
  border: 2px solid var(--bg-dark);
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.user-card.has-video .user-avatar-img {
  border-radius: var(--radius-full);
}

.user-card.is-streaming {
  grid-column: span 2;
}

.user-card.is-streaming .user-video {
  aspect-ratio: 16/9;
}

.control-btn.active-on {
  background: var(--accent);
  color: var(--bg-deepest);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.control-btn.active-on:hover {
  background: var(--accent-dim);
}

.badge.camera-badge {
  color: var(--accent);
  background: var(--accent-glow);
}

.badge.screen-badge {
  color: var(--accent-blue);
  background: var(--accent-blue-glow);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .landing-main {
    flex-direction: column;
    align-items: center;
    max-width: 560px;
  }

  .logo-title {
    font-size: 2.2rem;
  }

  .landing-container {
    padding: 1rem;
    gap: 1.5rem;
    justify-content: flex-start;
  }

  .landing-card {
    width: 100%;
    max-width: 560px;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
  }

  .servers-card {
    max-width: 560px;
  }

  .profile-fields {
    width: 100%;
  }

  .public-lobbies-list {
    max-height: min(240px, 40vh);
  }

  .profile-setup {
    flex-direction: column;
    align-items: center;
  }

  .avatar-preview {
    width: 72px;
    height: 72px;
  }

  .lobby-header {
    padding: 0.5rem 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .header-left, .header-right {
    order: 1;
  }

  .header-center {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .lobby-code-display {
    width: 100%;
    justify-content: center;
  }

  .code-value {
    font-size: 1rem;
    letter-spacing: 2px;
  }

  .header-right {
    width: 100%;
    justify-content: space-between;
  }

  .lobby-main {
    padding: 0.9rem;
  }

  .channel-header {
    margin-bottom: 1rem;
  }

  .users-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
  }

  .user-card {
    padding: 1rem 0.75rem;
  }

  .lobby-controls {
    padding: 0.55rem 0.75rem calc(0.55rem + env(safe-area-inset-bottom));
    flex-wrap: wrap;
    gap: 0.6rem;
  }

  .controls-left {
    order: 1;
    flex: 1 1 auto;
  }

  .controls-right {
    order: 2;
    margin-left: auto;
  }

  .controls-center {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .control-btn {
    width: 44px;
    height: 44px;
  }

  .self-name {
    display: none;
  }

  .video-expand-overlay {
    width: calc(100vw - 0.5rem);
    max-width: calc(100vw - 0.5rem);
    max-height: calc(100vh - 1rem);
    min-width: 0;
    border-radius: var(--radius-md);
  }

  .video-expand-overlay.shrunk {
    width: min(360px, calc(100vw - 1rem)) !important;
    bottom: calc(72px + env(safe-area-inset-bottom)) !important;
    right: 0.5rem !important;
  }

  .watch-card {
    max-height: calc(100vh - 1rem - env(safe-area-inset-bottom));
  }

  .watch-header,
  .watch-body {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .context-menu-card {
    min-width: 200px;
  }
}

@media (max-width: 480px) {
  html, body {
    overflow: auto;
  }

  .landing-container {
    padding: 0.75rem;
    gap: 1rem;
  }

  .logo-icon {
    width: 64px;
    height: 64px;
  }

  .logo-title {
    font-size: 1.8rem;
  }

  .tagline {
    font-size: 0.9rem;
  }

  .landing-card {
    padding: 1rem;
  }

  .action-buttons {
    margin-top: 1rem;
    gap: 0.8rem;
  }

  .code-input {
    font-size: 1rem !important;
    letter-spacing: 2px;
  }

  .btn {
    min-height: 44px;
  }

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

  .user-name {
    font-size: 0.82rem;
  }

  .lobby-main {
    padding: 0.75rem;
  }

  .chat-panel {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .chat-header {
    padding: 0.65rem 0.75rem;
  }

  .chat-messages {
    padding: 0.6rem;
  }

  .chat-input-area {
    padding: 0.45rem 0.6rem 0.6rem;
  }

  .watch-panel {
    padding: 0.5rem;
  }

  .watch-card {
    width: 100%;
    border-radius: var(--radius-lg);
  }

  .watch-header {
    gap: 0.6rem;
  }

  .watch-subtitle {
    font-size: 0.76rem;
  }

  .code-label {
    display: none;
  }
}

/* ========== PING DISPLAY ========== */
.ping-display {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--accent);
  cursor: default;
}

.ping-display.ping-good { color: var(--accent); }
.ping-display.ping-ok { color: var(--warning); }
.ping-display.ping-bad { color: var(--danger); }

/* ========== EXPANDED VIDEO OVERLAY ========== */
.video-expand-overlay {
  position: fixed;
  z-index: 200;
  background: var(--bg-deepest);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 320px;
  min-height: 200px;
  /* default position/size set by JS */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60vw;
  height: auto;
  max-width: 90vw;
  max-height: 90vh;
  resize: both;
  animation: fadeIn 0.25s ease;
}

.video-expand-overlay.shrunk {
  width: 320px !important;
  height: auto !important;
  top: auto !important;
  bottom: 80px !important;
  right: 16px !important;
  left: auto !important;
  transform: none !important;
}

.expand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: rgba(13, 15, 23, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.expand-username {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.expand-controls {
  display: flex;
  gap: 0.25rem;
}

.expand-video {
  width: 100%;
  flex: 1;
  object-fit: contain;
  background: #000;
}

.expand-resize-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
}

/* ========== PROFILE EDIT PANEL ========== */
.profile-edit-panel {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.profile-edit-card {
  background: var(--bg-dark);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.profile-edit-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.profile-edit-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.profile-edit-body .avatar-picker {
  margin-bottom: 0.5rem;
}

/* ========== VOTE BAN MODAL ========== */
.vote-ban-modal {
  position: fixed;
  inset: 0;
  z-index: 160;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.vote-ban-card {
  background: var(--bg-dark);
  border: 1px solid rgba(255, 71, 87, 0.2);
  border-radius: var(--radius-xl);
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg), 0 0 40px var(--danger-glow);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.vote-ban-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.vote-ban-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--danger);
}

.vote-ban-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.vote-ban-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.vote-ban-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.vote-ban-bar {
  height: 8px;
  background: var(--bg-light);
  border-radius: 4px;
  overflow: hidden;
}

.vote-ban-yes-fill {
  height: 100%;
  background: var(--danger);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.vote-ban-counts {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
}

.vote-yes { color: var(--danger); }
.vote-no { color: var(--accent); }

.vote-ban-actions {
  display: flex;
  gap: 0.75rem;
}

.vote-ban-actions .btn {
  flex: 1;
}

.vote-ban-status {
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
}

/* ========== USER CONTEXT MENU ========== */
.user-context-menu {
  position: fixed;
  z-index: 170;
  animation: fadeIn 0.15s ease;
}

.context-menu-card {
  background: var(--bg-dark);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  overflow: hidden;
}

.context-menu-header {
  padding: 0.75rem 1rem;
  background: var(--bg-mid);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.context-menu-body {
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.context-volume-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
}

.context-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-light);
  outline: none;
  cursor: pointer;
}

.context-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 6px var(--accent-glow);
}

.context-volume-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}

.context-volume-value {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
}

.context-full-btn {
  width: 100%;
  justify-content: center;
}

/* ========== USER CARD CLICK HINT ========== */
.user-card .user-video-wrap {
  cursor: pointer;
}

.user-card.has-video .user-video-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  background: rgba(0,0,0,0);
  transition: background 0.2s ease;
  pointer-events: none;
}

.user-card.has-video .user-video-wrap:hover::after {
  background: rgba(0,0,0,0.2);
}

.user-card .expand-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.2s ease;
  color: white;
  pointer-events: none;
  z-index: 3;
}

.user-card.has-video .user-video-wrap:hover .expand-hint {
  opacity: 1;
}

/* ========== USER CARD RIGHT-CLICK INDICATOR ========== */
.user-card:not(.is-you) {
  cursor: context-menu;
}

/* ========== LOBBY CONTENT AREA ========== */
.lobby-content-area {
  display: flex;
  flex: 1;
  min-height: 0;
  gap: 0;
}

.lobby-content-area .users-grid {
  flex: 1;
  min-width: 0;
}

/* ========== CHAT PANEL ========== */
.chat-panel {
  width: 360px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-dark);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  animation: chatSlideIn 0.25s ease;
}

@keyframes chatSlideIn {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

.chat-header svg {
  color: var(--accent);
}

.chat-header .btn-icon {
  margin-left: auto;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chat-msg {
  display: flex;
  gap: 0.6rem;
  padding: 0.3rem 0;
  animation: fadeIn 0.2s ease;
}

.chat-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--bg-deepest);
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.chat-msg-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.chat-msg-body {
  flex: 1;
  min-width: 0;
}

.chat-msg-header {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.15rem;
}

.chat-msg-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.chat-msg-time {
  font-size: 0.65rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.chat-msg-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
  word-break: break-word;
}

.chat-msg-image {
  max-width: 100%;
  max-height: 250px;
  border-radius: var(--radius-md);
  margin-top: 0.3rem;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.chat-msg-image:hover {
  opacity: 0.85;
}

.chat-input-area {
  padding: 0.5rem 0.75rem 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-image-preview {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem;
  margin-bottom: 0.4rem;
  background: var(--bg-mid);
  border-radius: var(--radius-md);
}

.chat-image-preview img {
  max-height: 60px;
  max-width: 120px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.chat-input-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-deep);
  border: 1.5px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 0.25rem 0.5rem;
  transition: border-color 0.2s ease;
}

.chat-input-row:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.chat-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.85rem;
  padding: 0.4rem 0;
}

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

.chat-unread-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: var(--danger);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  pointer-events: none;
}

#chat-toggle-btn {
  position: relative;
}

@media (max-width: 768px) {
  .chat-panel {
    position: fixed;
    inset: 0;
    width: 100%;
    z-index: 50;
    border-left: none;
  }
}

/* ========== NOISE SUPPRESSION ========== */
.control-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 0.25rem;
}

#noise-btn svg {
  width: 20px;
  height: 20px;
}

#noise-btn.active-on .icon-ns-on { display: block; }
#noise-btn.active-on .icon-ns-off { display: none; }
#noise-btn:not(.active-on) .icon-ns-on { display: none; }
#noise-btn:not(.active-on) .icon-ns-off { display: block; }

.noise-level-label {
  position: absolute;
  bottom: -4px;
  right: -4px;
  min-width: 22px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--bg-dark);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
}

.watch-panel {
  position: fixed;
  inset: 0;
  z-index: 155;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.watch-card {
  width: min(900px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  background: var(--bg-dark);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.watch-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.watch-header h3 {
  font-size: 1rem;
  font-weight: 800;
}

.watch-subtitle {
  margin-top: 0.2rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.watch-body {
  padding: 1rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.watch-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.watch-title-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.watch-meta-label {
  font-size: 0.68rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
}

.watch-video-title {
  font-size: 0.88rem;
  color: var(--text-primary);
  font-weight: 600;
  max-width: 460px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.watch-meta-actions {
  display: flex;
  gap: 0.45rem;
}

.watch-host-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.watch-host-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.watch-speed-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.watch-speed-row label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 700;
}

.watch-speed-select {
  background: var(--bg-deep);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.82rem;
  padding: 0.35rem 0.55rem;
}

.watch-sync-status {
  font-size: 0.78rem;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  padding: 0.45rem 0.6rem;
}

.watch-player-shell {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

.watch-empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  background: linear-gradient(180deg, rgba(18, 21, 31, 0.3), rgba(8, 10, 18, 0.8));
  z-index: 1;
}

#watch-player {
  width: 100%;
  height: 100%;
}

#watch-player iframe {
  width: 100%;
  height: 100%;
}

.host-only.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .watch-card {
    width: calc(100vw - 1rem);
  }

  .watch-host-actions {
    flex-direction: column;
  }

  .watch-meta-actions {
    width: 100%;
  }

  .watch-meta-actions .btn {
    flex: 1;
  }

  .watch-video-title {
    max-width: 100%;
  }

  .watch-speed-row {
    width: 100%;
    justify-content: space-between;
  }
}
