/* ============================================
   Film Gecesi — Global Stil Sistemi
   ============================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ---------- Design Tokens ---------- */
:root {
  /* Colors — Background */
  --color-bg-primary: #08080e;
  --color-bg-secondary: #0f0f1a;
  --color-bg-card: #151525;
  --color-bg-elevated: #1c1c30;
  --color-bg-input: #12121f;
  --color-bg-overlay: rgba(8, 8, 14, 0.85);

  /* Colors — Accent */
  --color-accent: #7c5cfc;
  --color-accent-hover: #9179ff;
  --color-accent-glow: rgba(124, 92, 252, 0.25);
  --color-accent-subtle: rgba(124, 92, 252, 0.08);

  /* Colors — Text */
  --color-text-primary: #eaeaf2;
  --color-text-secondary: #8080a0;
  --color-text-muted: #55556e;
  --color-text-accent: #b0a0ff;

  /* Colors — Borders */
  --color-border: rgba(255, 255, 255, 0.06);
  --color-border-hover: rgba(255, 255, 255, 0.12);
  --color-border-accent: rgba(124, 92, 252, 0.3);

  /* Colors — Status */
  --color-success: #34d399;
  --color-warning: #fbbf24;
  --color-danger: #f87171;
  --color-online: #34d399;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs: 0.7rem;
  --font-size-sm: 0.8rem;
  --font-size-base: 0.925rem;
  --font-size-md: 1.05rem;
  --font-size-lg: 1.3rem;
  --font-size-xl: 1.75rem;
  --font-size-2xl: 2.5rem;
  --font-size-3xl: 3.25rem;

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

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

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

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Z-Index */
  --z-dropdown: 100;
  --z-modal-backdrop: 200;
  --z-modal: 300;
  --z-toast: 400;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

img, video {
  max-width: 100%;
  display: block;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

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

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

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

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

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

.container--narrow {
  max-width: 640px;
}

.container--wide {
  max-width: 1440px;
}

.flex {
  display: flex;
}

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

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

.flex--col {
  display: flex;
  flex-direction: column;
}

.gap-sm {
  gap: var(--space-sm);
}

.gap-md {
  gap: var(--space-md);
}

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

/* ---------- Typography ---------- */
.text-gradient {
  background: linear-gradient(135deg, var(--color-accent), #c084fc, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.heading-xl {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.heading-lg {
  font-size: var(--font-size-xl);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.heading-md {
  font-size: var(--font-size-lg);
  font-weight: 600;
  line-height: 1.3;
}

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

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

.text-sm {
  font-size: var(--font-size-sm);
}

.text-center {
  text-align: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.7rem 1.5rem;
  font-size: var(--font-size-sm);
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  user-select: none;
  outline: none;
  text-decoration: none;
  line-height: 1;
}

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

.btn--primary {
  background: linear-gradient(135deg, var(--color-accent), #6346e0);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

.btn--primary:hover {
  background: linear-gradient(135deg, var(--color-accent-hover), #7356f0);
  box-shadow: 0 0 30px var(--color-accent-glow);
  transform: translateY(-1px);
}

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

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

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

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

.btn--ghost:hover {
  color: var(--color-text-primary);
  background: var(--color-accent-subtle);
}

.btn--danger {
  background: rgba(248, 113, 113, 0.1);
  color: var(--color-danger);
  border-color: rgba(248, 113, 113, 0.2);
}

.btn--danger:hover {
  background: rgba(248, 113, 113, 0.2);
  border-color: rgba(248, 113, 113, 0.3);
}

.btn--sm {
  padding: 0.45rem 0.9rem;
  font-size: var(--font-size-xs);
}

.btn--lg {
  padding: 0.9rem 2rem;
  font-size: var(--font-size-base);
}

.btn--full {
  width: 100%;
}

.btn--icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn--icon-sm {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
}

/* ---------- Cards ---------- */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-base);
}

.card--glass {
  background: rgba(21, 21, 37, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.card--hover:hover {
  border-color: var(--color-border-accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.card--interactive {
  cursor: pointer;
}

/* ---------- Forms ---------- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-label {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
}

.form-input {
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--color-bg-input);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  transition: all var(--transition-fast);
  outline: none;
}

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

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

.form-input--error {
  border-color: var(--color-danger);
}

.form-hint {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.form-error {
  font-size: var(--font-size-xs);
  color: var(--color-danger);
}

.form-select {
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--color-bg-input);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  transition: all var(--transition-fast);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238080a0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

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

.form-select option {
  background: var(--color-bg-secondary);
  color: var(--color-text-primary);
}

/* Toggle Switch */
.toggle-group {
  display: flex;
  background: var(--color-bg-input);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.toggle-option {
  flex: 1;
  padding: 0.6rem 1rem;
  text-align: center;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  background: transparent;
}

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

.toggle-option.active {
  background: var(--color-accent);
  color: #fff;
}

/* ---------- Badge ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  font-size: var(--font-size-xs);
  font-weight: 500;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge--accent {
  background: var(--color-accent-subtle);
  color: var(--color-text-accent);
  border: 1px solid rgba(124, 92, 252, 0.15);
}

.badge--success {
  background: rgba(52, 211, 153, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(52, 211, 153, 0.15);
}

.badge--public {
  background: rgba(52, 211, 153, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(52, 211, 153, 0.15);
}

.badge--private {
  background: rgba(251, 191, 36, 0.1);
  color: var(--color-warning);
  border: 1px solid rgba(251, 191, 36, 0.15);
}

/* ---------- Dot Indicator ---------- */
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dot--online {
  background: var(--color-online);
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.5);
}

.dot--offline {
  background: var(--color-text-muted);
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-bg-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal-backdrop);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  padding: var(--space-md);
}

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

.modal {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  width: 100%;
  max-width: 480px;
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition-base);
  box-shadow: var(--shadow-lg);
}

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

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

.modal__title {
  font-size: var(--font-size-md);
  font-weight: 600;
}

.modal__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.modal__footer {
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
  margin-top: var(--space-lg);
}

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

.toast {
  padding: 0.7rem 1.2rem;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  box-shadow: var(--shadow-md);
  animation: slideInRight var(--transition-base) ease forwards;
  max-width: 320px;
}

.toast--success {
  border-left: 3px solid var(--color-success);
}

.toast--error {
  border-left: 3px solid var(--color-danger);
}

.toast--info {
  border-left: 3px solid var(--color-accent);
}

/* ============================================
   Landing Page
   ============================================ */

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--color-accent-glow), transparent 70%);
  pointer-events: none;
  opacity: 0.6;
}

.hero__logo {
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin-bottom: var(--space-xl);
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.hero__logo-icon {
  font-size: 1.6rem;
}

.hero__title {
  margin-bottom: var(--space-md);
  position: relative;
}

.hero__subtitle {
  font-size: var(--font-size-md);
  color: var(--color-text-secondary);
  max-width: 520px;
  margin-bottom: var(--space-2xl);
  position: relative;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: var(--space-md);
  position: relative;
  flex-wrap: wrap;
  justify-content: center;
}

/* Feature Cards */
.features {
  padding: var(--space-3xl) 0;
  position: relative;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.feature-card {
  text-align: center;
  padding: var(--space-xl);
}

.feature-card__icon {
  font-size: 2rem;
  margin-bottom: var(--space-md);
  display: block;
}

.feature-card__title {
  font-size: var(--font-size-md);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.feature-card__desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* Sections */
.section {
  padding: var(--space-3xl) 0;
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section__title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.section__desc {
  color: var(--color-text-secondary);
  font-size: var(--font-size-base);
}

/* Create/Join Forms */
.action-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  max-width: 900px;
  margin: 0 auto;
}

.action-panel__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* Public Room List */
.room-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}

.room-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  cursor: pointer;
}

.room-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.room-card__name {
  font-weight: 600;
  font-size: var(--font-size-base);
}

.room-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}

.room-card__meta-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.room-card__action {
  margin-top: var(--space-sm);
}

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

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

.empty-state__text {
  font-size: var(--font-size-sm);
}

/* ============================================
   Room Page
   ============================================ */

/* Room Layout */
.room-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  grid-template-rows: auto 1fr;
  height: 100vh;
  overflow: hidden;
}

.room-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-lg);
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
  min-height: 52px;
}

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

.room-header__logo {
  font-weight: 700;
  font-size: var(--font-size-base);
  color: var(--color-text-accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.room-header__info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.room-header__name {
  font-weight: 600;
  font-size: var(--font-size-sm);
}

.room-header__right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Video Section */
.video-section {
  display: flex;
  flex-direction: column;
  background: #000;
  overflow: hidden;
  position: relative;
}

.video-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 0;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
  inset: 0;
}

.youtube-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  position: absolute;
  inset: 0;
}

.youtube-wrapper iframe,
.youtube-wrapper #youtube-player-target {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* İzleyici Bilgilendirme Rozeti (Tıklamaları asla engellemez) */
.guest-video-overlay {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 10;
  pointer-events: none !important; /* Tıklamaları asla engellemez */
  user-select: none;
}

.guest-video-overlay.hidden {
  display: none !important;
}

.guest-video-overlay__badge {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--color-text-primary);
  font-size: var(--font-size-xs);
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  pointer-events: none;
  opacity: 0.85;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: all var(--transition-fast);
}

.guest-video-overlay:hover .guest-video-overlay__badge {
  opacity: 1;
  color: #fff;
  border-color: var(--color-accent);
  transform: translateY(-1px);
}

/* Özel Tam Ekran Butonu */
.btn-fullscreen {
  position: absolute;
  bottom: 14px;
  right: 14px;
  z-index: 25; /* Kilit katmanının üzerinde kalır */
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.15rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-fullscreen:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  transform: scale(1.08);
}

.btn-fullscreen svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-fullscreen .fullscreen-collapse,
.btn-fullscreen.is-active .fullscreen-expand {
  display: none;
}

.btn-fullscreen.is-active .fullscreen-collapse {
  display: block;
}

/* Fullscreen Modu */
.video-container:fullscreen,
.video-container:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  max-height: none !important;
  background: #000 !important;
}

.video-container:fullscreen .youtube-wrapper,
.video-container:-webkit-full-screen .youtube-wrapper,
.video-container:fullscreen video,
.video-container:-webkit-full-screen video {
  width: 100vw;
  height: 100vh;
}

.video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  color: var(--color-text-muted);
  padding: var(--space-xl);
  text-align: center;
}

.video-placeholder__icon {
  font-size: 4rem;
  opacity: 0.3;
}

.video-placeholder__text {
  font-size: var(--font-size-sm);
}

/* Connection Status Bar */
.connection-bar {
  padding: 0.3rem var(--space-md);
  font-size: var(--font-size-xs);
  text-align: center;
  display: none;
}

.connection-bar.disconnected {
  display: block;
  background: rgba(248, 113, 113, 0.15);
  color: var(--color-danger);
}

.connection-bar.reconnecting {
  display: block;
  background: rgba(251, 191, 36, 0.15);
  color: var(--color-warning);
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  background: var(--color-bg-secondary);
  border-left: 1px solid var(--color-border);
  overflow: hidden;
}

/* Sidebar Tabs */
.sidebar__tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.sidebar__tab {
  flex: 1;
  padding: 0.7rem;
  text-align: center;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all var(--transition-fast);
  position: relative;
}

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

.sidebar__tab.active {
  color: var(--color-accent);
}

.sidebar__tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent);
}

.sidebar__tab-badge {
  background: var(--color-accent);
  color: #fff;
  font-size: 0.6rem;
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-full);
  margin-left: 0.3rem;
  font-weight: 600;
}

/* Sidebar Content Panels */
.sidebar__panel {
  flex: 1;
  overflow: hidden;
  display: none;
  flex-direction: column;
}

.sidebar__panel.active {
  display: flex;
}

/* Chat Panel */
.chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat__messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.chat__message {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  animation: fadeSlideIn var(--transition-base) ease forwards;
}

.chat__message.no-animate {
  animation: none;
}

/* Message Header (avatar + name + time) */
.chat__message-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 3px;
}

.chat__message-avatar {
  --avatar-hue: 260;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: hsl(var(--avatar-hue), 60%, 25%);
  color: hsl(var(--avatar-hue), 80%, 75%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 700;
  flex-shrink: 0;
}

.chat__message--user .chat__message-author {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-text-accent);
}

.chat__message--user .chat__message-time {
  font-size: 0.6rem;
  color: var(--color-text-muted);
  margin-left: auto;
}

.chat__message--user .chat__message-text {
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  word-break: break-word;
  line-height: 1.5;
  padding-left: 24px;
}

.chat__message--self {
  background: var(--color-accent-subtle);
  border: 1px solid rgba(124, 92, 252, 0.1);
}

.chat__message--system {
  text-align: center;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  padding: var(--space-xs) var(--space-md);
  font-style: italic;
}

/* Chat Input */
.chat__input-area {
  padding: var(--space-sm) var(--space-md);
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
  align-items: center;
  position: relative;
}

.chat__input {
  flex: 1;
  padding: 0.55rem 0.8rem;
  background: var(--color-bg-input);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  outline: none;
  transition: border-color var(--transition-fast);
  min-width: 0;
}

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

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

.chat__send-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  font-size: var(--font-size-sm);
}

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

/* Emoji Button */
.chat__emoji-btn {
  flex-shrink: 0;
  font-size: 1.1rem;
  padding: 0;
  width: 32px;
  height: 32px;
}

/* Emoji Picker */
.emoji-picker {
  position: absolute;
  bottom: calc(100% + 8px);
  left: var(--space-md);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition-fast);
  z-index: var(--z-dropdown);
  max-width: 300px;
}

.emoji-picker.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.emoji-picker__item {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.emoji-picker__item:hover {
  background: var(--color-bg-elevated);
}

/* Typing Indicator */
.chat__typing {
  padding: 0.3rem var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  flex-shrink: 0;
  border-top: 1px solid var(--color-border);
}

.chat__typing.hidden {
  display: none;
}

.chat__typing-dots {
  display: flex;
  gap: 3px;
  align-items: center;
}

.chat__typing-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-text-muted);
  animation: typingBounce 1.4s ease-in-out infinite;
}

.chat__typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.chat__typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

.chat__typing-text {
  font-style: italic;
}

@keyframes typingBounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

/* Users Panel */
.users-panel {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md);
}

.users-panel__header {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.user-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-xs);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.user-item:hover {
  background: var(--color-accent-subtle);
}

.user-item__avatar {
  --avatar-hue: 260;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: hsl(var(--avatar-hue), 60%, 22%);
  color: hsl(var(--avatar-hue), 80%, 72%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-sm);
  font-weight: 700;
  flex-shrink: 0;
}

.user-item__info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.user-item__name {
  font-size: var(--font-size-sm);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-item__status {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.user-item__role {
  margin-left: auto;
  font-size: var(--font-size-base);
  flex-shrink: 0;
}

/* Copy Link */
.copy-link-group {
  display: flex;
  gap: var(--space-sm);
}

.copy-link-group .form-input {
  flex: 1;
  font-size: var(--font-size-xs);
  user-select: all;
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeSlideIn {
  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 pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

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

.animate-fade-in {
  animation: fadeSlideIn var(--transition-slow) ease forwards;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Stagger children animation */
.stagger-children > * {
  opacity: 0;
  animation: fadeSlideIn var(--transition-slow) ease forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0ms; }
.stagger-children > *:nth-child(2) { animation-delay: 80ms; }
.stagger-children > *:nth-child(3) { animation-delay: 160ms; }
.stagger-children > *:nth-child(4) { animation-delay: 240ms; }
.stagger-children > *:nth-child(5) { animation-delay: 320ms; }

/* ============================================
   Responsive — Tablet
   ============================================ */

@media (max-width: 900px) {
  .room-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 50vh 1fr;
  }

  .sidebar {
    border-left: none;
    border-top: 1px solid var(--color-border);
  }

  .action-panels {
    grid-template-columns: 1fr;
  }

  .features__grid {
    grid-template-columns: 1fr 1fr;
  }

  .emoji-picker {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* ============================================
   Responsive — Mobile (Modern Ergonomic Design)
   ============================================ */

@media (max-width: 600px) {
  :root {
    --font-size-3xl: 2rem;
    --font-size-2xl: 1.5rem;
    --font-size-xl: 1.25rem;
    --font-size-base: 0.9rem;
  }

  .container {
    padding: 0 var(--space-md);
  }

  .hero {
    padding: var(--space-2xl) var(--space-md);
    min-height: 80vh;
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
  }

  .hero__actions .btn {
    width: 100%;
    padding: 0.85rem 1.5rem;
  }

  .features__grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  /* Mobil Room Düzeni - Üstte 16:9 Video, Altta Sohbet */
  .room-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height */
    overflow: hidden;
  }

  .room-header {
    padding: 0.4rem var(--space-sm);
    min-height: 46px;
    flex-shrink: 0;
    gap: var(--space-xs);
  }

  .room-header__left {
    gap: var(--space-xs);
    min-width: 0;
    flex: 1;
  }

  .room-header__logo {
    font-size: var(--font-size-sm);
  }

  .room-header__logo span {
    display: none;
  }

  .room-header__name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--font-size-xs);
  }

  .room-header__info {
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .room-header__info::-webkit-scrollbar {
    display: none;
  }

  .room-header__info .badge {
    padding: 0.15rem 0.4rem;
    font-size: 0.65rem;
  }

  .room-header__right {
    gap: 4px;
    flex-shrink: 0;
  }

  .room-header__right .btn {
    padding: 0.35rem 0.6rem;
    font-size: var(--font-size-xs);
  }

  /* Video Alanı Mobilde Tam 16:9 */
  .video-section {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 40vh;
    flex-shrink: 0;
    position: relative;
    background: #000;
  }

  /* Sidebar (Sohbet ve Kişiler) */
  .sidebar {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-left: none;
    border-top: 1px solid var(--color-border);
  }

  .sidebar__tab {
    padding: 0.55rem;
    font-size: var(--font-size-xs);
  }

  .chat__messages {
    padding: var(--space-sm);
    gap: var(--space-xs);
  }

  .chat__message {
    padding: 0.4rem 0.6rem;
  }

  .chat__message-text {
    font-size: 0.85rem;
    padding-left: 20px;
  }

  .chat__input-area {
    padding: 0.4rem var(--space-sm);
    background: var(--color-bg-secondary);
  }

  .chat__input {
    font-size: 16px; /* iOS otomatik zoom yapmasın */
    padding: 0.6rem 0.8rem;
  }

  .chat__send-btn,
  .chat__emoji-btn {
    width: 40px;
    height: 40px;
  }

  .emoji-picker {
    left: var(--space-xs);
    right: var(--space-xs);
    max-width: none;
    grid-template-columns: repeat(8, 1fr);
    bottom: calc(100% + 4px);
  }

  .emoji-picker__item {
    font-size: 1.3rem;
    height: 36px;
  }

  .modal {
    padding: var(--space-md);
    margin: var(--space-sm);
    max-width: calc(100vw - 24px);
  }

  .toast-container {
    left: var(--space-sm);
    right: var(--space-sm);
    bottom: var(--space-sm);
  }

  .toast {
    max-width: 100%;
    font-size: var(--font-size-xs);
  }
}

/* Video source support and player feedback */
.media-support-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.6rem;
}

.media-support-list span,
.media-format-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0.15rem 0.48rem;
  border: 1px solid rgba(124, 92, 252, 0.2);
  border-radius: var(--radius-full);
  background: rgba(124, 92, 252, 0.07);
  color: #b9aaff;
  font-size: 0.56rem;
  font-weight: 650;
  letter-spacing: 0.025em;
}

.media-format-badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 26;
  min-height: 24px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(8, 8, 14, 0.72);
  color: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  pointer-events: none;
}

.media-status {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 35;
  width: min(420px, calc(100% - 32px));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  background: rgba(10, 10, 17, 0.88);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.media-status__spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.media-status__copy,
.media-status__copy strong,
.media-status__copy span {
  display: block;
  min-width: 0;
}

.media-status__copy strong {
  color: #f4f3f8;
  font-size: 0.78rem;
  font-weight: 650;
}

.media-status__copy span {
  margin-top: 0.12rem;
  color: #858396;
  font-size: 0.62rem;
  line-height: 1.45;
}

.media-status__actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.5rem;
  padding-top: 0.15rem;
  pointer-events: auto;
}

.media-status__actions button,
.media-status__actions a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: #dedde7;
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
}

.media-status__actions button:hover,
.media-status__actions a:hover {
  border-color: rgba(124, 92, 252, 0.38);
  background: rgba(124, 92, 252, 0.12);
  color: #fff;
}

.media-status--error {
  border-color: rgba(248, 113, 113, 0.24);
}

.media-status--error .media-status__spinner {
  border: 0;
  animation: none;
}

.media-status--error .media-status__spinner::before {
  content: '!';
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(248, 113, 113, 0.13);
  color: var(--color-danger);
  font-weight: 700;
}

.media-status--notice .media-status__spinner {
  animation: pulse 1.2s ease infinite;
}

:where(button, a, input, select):focus-visible {
  outline: 2px solid rgba(145, 121, 255, 0.9);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .media-format-badge {
    left: 9px;
    bottom: 9px;
  }

  .media-status {
    width: min(360px, calc(100% - 20px));
    padding: 0.72rem 0.8rem;
  }

  .media-status__copy span {
    font-size: 0.58rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   Minimal Room Experience Refresh
   ============================================ */

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.setting-row:hover {
  border-color: var(--color-border-hover);
  background: var(--color-accent-subtle);
}

.setting-row--form {
  margin-top: 0.15rem;
}

.setting-row__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.2rem;
}

.setting-row__copy strong {
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: 1.35;
}

.setting-row__copy small,
.modal__subtitle,
.settings-note {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  line-height: 1.5;
}

.room-video-setting {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
  padding: 0.9rem;
  border: 1px solid rgba(124, 92, 252, 0.22);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(124, 92, 252, 0.09), rgba(255, 255, 255, 0.025));
}

.room-video-setting__heading,
.room-video-setting__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.room-video-setting__heading > span:first-child,
.room-video-setting__heading strong,
.room-video-setting__heading small {
  display: block;
}

.room-video-setting__heading strong {
  font-size: 0.78rem;
}

.room-video-setting__heading small,
.room-video-setting__hint {
  margin-top: 0.12rem;
  color: var(--color-text-muted);
  font-size: 0.58rem;
  line-height: 1.45;
}

.room-video-setting__live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  color: #85e8c0;
  font-size: 0.56rem;
  font-weight: 650;
}

.room-video-setting__live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 7px rgba(52, 211, 153, 0.55);
}

.room-video-setting__controls .form-input {
  min-width: 0;
  min-height: 40px;
}

.room-video-setting__controls .btn {
  flex-shrink: 0;
  min-height: 40px;
}

@media (max-width: 600px) {
  .room-video-setting__controls {
    align-items: stretch;
    flex-direction: column;
  }

  .room-video-setting__controls .btn {
    width: 100%;
  }
}

.switch-control {
  position: relative;
  display: inline-flex;
  width: 44px;
  height: 24px;
  flex: 0 0 44px;
}

.switch-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-control__track {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  background: var(--color-bg-input);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.switch-control__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-text-secondary);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.switch-control input:checked + .switch-control__track {
  border-color: var(--color-accent);
  background: var(--color-accent);
}

.switch-control input:checked + .switch-control__track::after {
  background: #fff;
  transform: translateX(20px);
}

.switch-control input:focus-visible + .switch-control__track {
  outline: 3px solid var(--color-accent-glow);
  outline-offset: 2px;
}

.switch-control input:disabled + .switch-control__track {
  cursor: wait;
  opacity: 0.55;
}

.modal--compact {
  max-width: 470px;
}

.modal__subtitle {
  margin-top: 0.25rem;
}

.settings-note {
  margin-top: var(--space-md);
  padding-left: 0.1rem;
}

body.mobile-video-view {
  overflow: hidden;
  background: #050509;
}

.room-layout {
  grid-template-columns: minmax(0, 1fr) minmax(310px, 350px);
  grid-template-rows: 58px minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  background: #050509;
}

.room-header {
  min-width: 0;
  min-height: 58px;
  padding: 0 var(--space-lg);
  background: rgba(10, 10, 17, 0.94);
  border-color: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px);
}

.room-header__left,
.room-header__info {
  min-width: 0;
}

.room-header__logo {
  color: var(--color-text-primary);
}

.room-header__name {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-header__right {
  gap: 0.3rem;
}

.header-action {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0 0.7rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}

.header-action:hover {
  color: var(--color-text-primary);
  border-color: var(--color-border);
  background: rgba(255, 255, 255, 0.05);
}

.header-action--danger:hover {
  color: var(--color-danger);
  border-color: rgba(248, 113, 113, 0.2);
  background: rgba(248, 113, 113, 0.08);
}

.video-section {
  min-width: 0;
  min-height: 0;
  background: #000;
}

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

.guest-video-overlay {
  inset: 0;
  z-index: 20;
  pointer-events: auto !important;
  cursor: not-allowed;
  background: transparent;
}

.guest-video-overlay__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(8, 8, 14, 0.76);
  border-color: rgba(255, 255, 255, 0.11);
  box-shadow: none;
}

.btn-fullscreen {
  right: 16px;
  top: 16px;
  bottom: auto;
  z-index: 30;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(8, 8, 14, 0.72);
  box-shadow: none;
}

.video-pseudo-fullscreen .video-container {
  position: fixed;
  inset: 0;
  z-index: 500;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #000;
}

.video-pseudo-fullscreen .video-container video,
.video-pseudo-fullscreen .video-container .youtube-wrapper {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

.sidebar {
  min-width: 0;
  min-height: 0;
  background: #0c0c14;
  border-color: rgba(255, 255, 255, 0.07);
}

.sidebar__tabs {
  min-height: 48px;
  padding: 0 0.45rem;
}

.sidebar__tab {
  margin: 0.35rem 0;
  padding: 0.45rem;
  border-radius: var(--radius-md);
}

.sidebar__tab.active {
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar__tab.active::after {
  display: none;
}

.chat__messages {
  padding: 0.8rem;
}

.chat__message {
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius-md);
}

.chat__input-area {
  padding: 0.65rem;
  padding-bottom: max(0.65rem, env(safe-area-inset-bottom));
  background: #0c0c14;
}

.chat__input {
  min-height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.chat__send-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.connection-bar {
  position: fixed;
  top: 66px;
  left: 50%;
  z-index: 150;
  width: max-content;
  max-width: calc(100vw - 24px);
  border-radius: var(--radius-full);
  transform: translateX(-50%);
  box-shadow: var(--shadow-md);
}

@media (max-width: 900px) {
  .room-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 54px minmax(220px, 50dvh) minmax(0, 1fr);
  }

  .room-header {
    min-height: 54px;
  }

  .video-section {
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
  }

  .sidebar {
    border-top: 1px solid var(--color-border);
    border-left: 0;
  }
}

@media (max-width: 600px) {
  .room-layout {
    grid-template-rows: 48px auto minmax(0, 1fr);
  }

  .room-header {
    min-height: 48px;
    padding: 0 0.5rem;
  }

  .room-header__left {
    gap: 0.45rem;
  }

  .room-header__logo {
    width: 30px;
    flex: 0 0 30px;
    justify-content: center;
  }

  .room-header__logo span,
  .header-action__label,
  #room-type-badge {
    display: none;
  }

  .room-header__info {
    gap: 0.3rem;
    overflow: hidden;
  }

  .room-header__name {
    max-width: 92px;
    font-size: 0.72rem;
  }

  .room-header__info .badge {
    padding: 0.18rem 0.42rem;
    font-size: 0.61rem;
  }

  .room-header__right {
    gap: 1px;
  }

  .header-action {
    width: 32px;
    min-width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 9px;
  }

  .video-section {
    height: min(34dvh, 56.25vw);
    min-height: 180px;
    max-height: 300px;
    aspect-ratio: 16 / 9;
  }

  .guest-video-overlay__badge {
    top: 8px;
    left: 8px;
    padding: 0.3rem 0.6rem;
    font-size: 0.6rem;
  }

  .btn-fullscreen {
    right: 9px;
    top: 9px;
    bottom: auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .sidebar__tabs {
    min-height: 42px;
    padding: 0 0.35rem;
  }

  .sidebar__tab {
    margin: 0.28rem 0;
    padding: 0.35rem;
  }

  .chat__messages {
    padding: 0.45rem 0.55rem;
  }

  .chat__message {
    padding: 0.36rem 0.42rem;
  }

  .chat__input-area {
    padding: 0.45rem 0.5rem;
    padding-bottom: max(0.45rem, env(safe-area-inset-bottom));
  }

  .chat__input,
  .chat__send-btn {
    min-height: 40px;
    height: 40px;
  }

  .chat__emoji-btn {
    width: 36px;
    height: 36px;
  }

  .setting-row {
    gap: var(--space-md);
    padding: 0.8rem;
  }

  .modal {
    border-radius: 18px;
  }

  .connection-bar {
    top: 54px;
  }
}

@media (max-width: 600px) and (max-height: 600px) {
  .video-section {
    height: 30dvh;
    min-height: 140px;
  }
}

/* ============================================
   Lobby — Product-led landing
   ============================================ */

.landing-page {
  background:
    radial-gradient(circle at 70% 12%, rgba(124, 92, 252, 0.1), transparent 28rem),
    #08080d;
}

.lobby-nav {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 20;
  width: min(1180px, calc(100% - 48px));
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateX(-50%);
}

.lobby-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--color-text-primary);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.lobby-brand:hover {
  color: #fff;
}

.lobby-brand__mark {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.68rem;
  box-shadow: 0 8px 24px rgba(124, 92, 252, 0.28);
}

.lobby-nav__actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.lobby-live-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 0.35rem;
  color: var(--color-text-secondary);
  font-size: 0.7rem;
}

.lobby-live-status > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.08);
}

.lobby-live-status strong {
  color: var(--color-text-primary);
  font-weight: 600;
}

.lobby-nav__button {
  height: 38px;
  padding: 0 0.85rem;
  border: 0;
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.lobby-nav__button:hover {
  color: #fff;
}

.lobby-nav__cta {
  min-height: 38px;
  padding: 0 1rem;
  box-shadow: none;
}

.lobby-hero {
  position: relative;
  width: min(1180px, calc(100% - 48px));
  min-height: 720px;
  margin: 0 auto;
  padding: 132px 0 76px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(480px, 1.1fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 7rem);
}

.lobby-hero__glow {
  position: absolute;
  top: 12%;
  right: 4%;
  width: 410px;
  height: 410px;
  border-radius: 50%;
  background: rgba(124, 92, 252, 0.12);
  filter: blur(110px);
  pointer-events: none;
}

.lobby-hero__content {
  position: relative;
  z-index: 2;
}

.lobby-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.4rem;
  color: var(--color-text-accent);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lobby-eyebrow span {
  width: 18px;
  height: 1px;
  background: var(--color-accent);
}

.lobby-hero h1 {
  max-width: 570px;
  color: #f6f5fb;
  font-size: clamp(3.3rem, 5.6vw, 5.3rem);
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.lobby-hero h1 span {
  color: var(--color-text-secondary);
}

.lobby-hero__lead {
  max-width: 530px;
  margin-top: 1.65rem;
  color: #9494ad;
  font-size: 1rem;
  line-height: 1.75;
}

.lobby-hero__actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2rem;
}

.lobby-hero__actions .btn {
  min-height: 48px;
  padding: 0 1.25rem;
  box-shadow: 0 12px 35px rgba(124, 92, 252, 0.2);
}

.lobby-hero__actions .btn span {
  font-size: 1rem;
  transition: transform var(--transition-fast);
}

.lobby-hero__actions .btn:hover span {
  transform: translateX(3px);
}

.lobby-text-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0;
  border: 0;
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 0.78rem;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.lobby-text-button:hover {
  color: #fff;
}

.lobby-text-button span {
  color: var(--color-accent-hover);
  font-size: 1.1rem;
}

.lobby-hero__proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
  margin-top: 1.8rem;
  color: var(--color-text-muted);
  font-size: 0.66rem;
}

.lobby-hero__proof span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.lobby-hero__proof b {
  color: var(--color-success);
  font-size: 0.72rem;
}

.watch-preview {
  position: relative;
  z-index: 2;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: #0c0c13;
  box-shadow: 0 38px 90px rgba(0, 0, 0, 0.5), 0 0 0 8px rgba(255, 255, 255, 0.012);
  transform: perspective(1200px) rotateY(-3deg) rotateX(1deg);
}

.watch-preview__topbar {
  height: 48px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.watch-preview__dots {
  display: flex;
  gap: 0.3rem;
}

.watch-preview__dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #30303d;
}

.watch-preview__room {
  color: #c4c4d3;
  font-size: 0.7rem;
  font-weight: 500;
}

.watch-preview__live {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--color-success);
  font-size: 0.62rem;
}

.watch-preview__live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.watch-preview__screen {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(19, 13, 35, 0.3), rgba(2, 2, 5, 0.15)),
    radial-gradient(circle at 65% 42%, #6d4779 0, #2c2139 24%, #10101a 54%, #060609 100%);
}

.watch-preview__ambient {
  position: absolute;
  inset: 10% 15%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(224, 152, 255, 0.2), transparent 65%);
  filter: blur(18px);
}

.watch-preview__screen::before,
.watch-preview__screen::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
}

.watch-preview__screen::before {
  top: 18%;
  left: 22%;
  width: 38%;
  height: 64%;
  background: linear-gradient(145deg, rgba(159, 103, 185, 0.24), rgba(44, 31, 62, 0.08));
  transform: rotate(-14deg);
}

.watch-preview__screen::after {
  top: 8%;
  right: 17%;
  width: 23%;
  height: 72%;
  background: linear-gradient(145deg, rgba(117, 77, 145, 0.2), transparent);
  transform: rotate(18deg);
}

.watch-preview__play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  background: rgba(8, 8, 14, 0.58);
  color: #fff;
  font-size: 0.9rem;
  padding-left: 4px;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(10px);
}

.watch-preview__timeline {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 17px;
  z-index: 2;
  height: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.18);
}

.watch-preview__timeline span {
  display: block;
  width: 38%;
  height: 100%;
  background: var(--color-accent-hover);
}

.watch-preview__time {
  position: absolute;
  left: 18px;
  bottom: 24px;
  z-index: 2;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.55rem;
}

.watch-preview__footer {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 0.7rem 0.9rem;
}

.watch-preview__people {
  display: flex;
  align-items: center;
}

.watch-preview__people > span,
.watch-preview__message > span {
  width: 27px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: -5px;
  border: 2px solid #0c0c13;
  border-radius: 50%;
  background: #2b2340;
  color: #c5b9ed;
  font-size: 0.5rem;
  font-weight: 700;
}

.watch-preview__people > span:first-child {
  margin-left: 0;
  background: #243b38;
  color: #8ad6c8;
}

.watch-preview__people > span:nth-child(2) {
  background: #3a2839;
  color: #e4addc;
}

.watch-preview__people small {
  margin-left: 0.55rem;
  color: var(--color-text-muted);
  font-size: 0.55rem;
}

.watch-preview__message {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.watch-preview__message > span {
  width: 22px;
  height: 22px;
  margin: 0;
  border-width: 0;
}

.watch-preview__message p {
  color: #aaa9ba;
  font-size: 0.58rem;
}

@media (max-width: 900px) {
  .lobby-nav {
    width: min(100% - 32px, 720px);
  }

  .lobby-live-status {
    display: none;
  }

  .lobby-hero {
    width: min(100% - 32px, 720px);
    padding-top: 120px;
    grid-template-columns: 1fr;
    gap: 3.5rem;
    text-align: center;
  }

  .lobby-eyebrow,
  .lobby-hero__actions,
  .lobby-hero__proof {
    justify-content: center;
  }

  .lobby-hero h1,
  .lobby-hero__lead {
    margin-left: auto;
    margin-right: auto;
  }

  .watch-preview {
    max-width: 620px;
    margin: 0 auto;
    transform: none;
  }
}

@media (max-width: 600px) {
  .lobby-nav {
    width: calc(100% - 28px);
    height: 64px;
  }

  .lobby-brand {
    font-size: 0.8rem;
  }

  .lobby-brand__mark {
    width: 28px;
    height: 28px;
  }

  .lobby-nav__button {
    display: none;
  }

  .lobby-nav__cta {
    min-height: 34px;
    padding: 0 0.75rem;
    font-size: 0.68rem;
  }

  .lobby-hero {
    width: calc(100% - 28px);
    min-height: auto;
    padding: 104px 0 58px;
    gap: 2.6rem;
  }

  .lobby-eyebrow {
    margin-bottom: 1rem;
    font-size: 0.6rem;
  }

  .lobby-hero h1 {
    font-size: clamp(2.55rem, 12.5vw, 3.35rem);
    line-height: 1.01;
  }

  .lobby-hero__lead {
    margin-top: 1.25rem;
    font-size: 0.88rem;
    line-height: 1.7;
  }

  .lobby-hero__actions {
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1.55rem;
  }

  .lobby-hero__actions .btn {
    width: min(100%, 320px);
  }

  .lobby-hero__proof {
    gap: 0.45rem 0.8rem;
    margin-top: 1.2rem;
  }

  .watch-preview {
    border-radius: 17px;
  }

  .watch-preview__topbar {
    height: 40px;
  }

  .watch-preview__footer {
    min-height: 58px;
    padding: 0.55rem 0.65rem;
  }

  .watch-preview__message {
    display: none;
  }
}

.lobby-steps,
.lobby-actions-section,
.lobby-benefits {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.lobby-steps {
  padding: 96px 0 116px;
}

.lobby-section-heading {
  max-width: 660px;
  margin-bottom: 2.8rem;
}

.lobby-section-heading .lobby-eyebrow {
  margin-bottom: 0.85rem;
}

.lobby-section-heading h2 {
  color: #f1f0f7;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.lobby-section-heading > p:last-child:not(.lobby-eyebrow) {
  max-width: 520px;
  margin-top: 0.9rem;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
}

.lobby-section-heading--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.lobby-section-heading--center .lobby-eyebrow {
  justify-content: center;
}

.lobby-section-heading--center > p:last-child {
  margin-left: auto;
  margin-right: auto;
}

.lobby-steps__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lobby-step {
  position: relative;
  min-height: 260px;
  padding: 2rem;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  transition: background var(--transition-base);
}

.lobby-step:last-child {
  border-right: 0;
}

.lobby-step:hover {
  background: rgba(255, 255, 255, 0.018);
}

.lobby-step__number {
  position: absolute;
  top: 1.2rem;
  right: 1.4rem;
  color: #393947;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
}

.lobby-step__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 3rem;
  border: 1px solid rgba(124, 92, 252, 0.25);
  border-radius: 13px;
  background: rgba(124, 92, 252, 0.07);
  color: var(--color-text-accent);
  font-size: 1rem;
}

.lobby-step h3 {
  margin-bottom: 0.65rem;
  color: #e7e6ee;
  font-size: 1rem;
  font-weight: 600;
}

.lobby-step p {
  max-width: 280px;
  color: var(--color-text-secondary);
  font-size: 0.78rem;
  line-height: 1.65;
}

.lobby-actions-section {
  padding: 110px 0 120px;
}

.lobby-actions-section::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  margin-top: -110px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.lobby-action-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 1rem;
  align-items: stretch;
}

.lobby-panel {
  min-width: 0;
  padding: clamp(1.35rem, 3vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(15, 15, 25, 0.78);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}

.lobby-panel--create {
  background:
    radial-gradient(circle at 10% 0, rgba(124, 92, 252, 0.09), transparent 20rem),
    rgba(15, 15, 25, 0.82);
}

.lobby-panel__header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.7rem;
}

.lobby-panel__mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  border: 1px solid rgba(124, 92, 252, 0.25);
  border-radius: 12px;
  background: rgba(124, 92, 252, 0.08);
  color: var(--color-text-accent);
}

.lobby-panel__header p {
  margin-bottom: 0.18rem;
  color: var(--color-text-muted);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lobby-panel__header h3 {
  color: #e8e7ef;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.landing-page .action-panel__form {
  gap: 1rem;
}

.lobby-form-row,
.lobby-room-preferences {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.landing-page .form-label {
  color: #a5a4b5;
  font-size: 0.66rem;
  font-weight: 500;
}

.landing-page .form-input {
  min-height: 46px;
  padding: 0.7rem 0.85rem;
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(5, 5, 10, 0.56);
  color: #efeff5;
  font-size: 0.78rem;
}

.landing-page .form-input:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.landing-page .form-input:focus {
  border-color: rgba(124, 92, 252, 0.7);
  box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.1);
}

.landing-page .form-hint {
  margin-top: 0.12rem;
  color: #555565;
  font-size: 0.58rem;
}

.lobby-input-with-icon {
  position: relative;
}

.lobby-input-with-icon > span {
  position: absolute;
  top: 50%;
  left: 0.85rem;
  z-index: 1;
  color: #626274;
  font-size: 0.68rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.lobby-input-with-icon .form-input {
  width: 100%;
  padding-left: 2.15rem;
}

.landing-page .toggle-group {
  min-height: 46px;
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(5, 5, 10, 0.56);
  padding: 3px;
}

.landing-page .toggle-option {
  padding: 0.45rem 0.55rem;
  border-radius: 9px;
  font-size: 0.66rem;
}

.landing-page .toggle-option.active {
  background: rgba(124, 92, 252, 0.18);
  color: #c4baff;
  box-shadow: inset 0 0 0 1px rgba(124, 92, 252, 0.2);
}

.landing-page .setting-row {
  min-height: 72px;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: rgba(5, 5, 10, 0.42);
}

.landing-page .setting-row__copy strong {
  font-size: 0.67rem;
}

.landing-page .setting-row__copy small {
  font-size: 0.56rem;
}

.lobby-submit {
  min-height: 48px;
  margin-top: 0.25rem;
  border-radius: 12px;
  box-shadow: none;
}

.lobby-submit span {
  margin-left: auto;
}

.lobby-panel--join .lobby-submit {
  color: #dddbea;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.055);
}

.lobby-panel--join .lobby-submit:hover {
  background: rgba(255, 255, 255, 0.085);
}

.lobby-room-browser {
  margin-top: 1.4rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.lobby-room-browser__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.lobby-room-browser__header > div {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.lobby-room-browser__header h4 {
  color: #bdbccb;
  font-size: 0.68rem;
  font-weight: 600;
}

.lobby-room-browser__header small {
  color: var(--color-text-muted);
  font-size: 0.55rem;
}

.lobby-room-browser__pulse,
.room-card__live-dot {
  width: 6px;
  height: 6px;
  display: inline-block;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.07);
}

.lobby-room-list {
  max-height: 226px;
  gap: 0.45rem;
  overflow-y: auto;
  padding-right: 2px;
}

.landing-page .room-card {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 12px;
  background: rgba(5, 5, 10, 0.4);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.landing-page .room-card:hover,
.landing-page .room-card:focus-visible {
  border-color: rgba(124, 92, 252, 0.35);
  background: rgba(124, 92, 252, 0.055);
  transform: translateY(-1px);
  outline: none;
}

.landing-page .room-card__header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
}

.landing-page .room-card__name {
  overflow: hidden;
  color: #d8d7e0;
  font-size: 0.69rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landing-page .room-card__meta {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0;
}

.landing-page .room-card__meta-item {
  color: var(--color-text-muted);
  font-size: 0.56rem;
}

.landing-page .room-card__action {
  color: var(--color-text-accent);
  font-size: 0.6rem;
}

.lobby-empty-state {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  text-align: left;
}

.lobby-empty-state__mark {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.035);
  color: #555565;
}

.lobby-empty-state strong {
  display: block;
  margin-bottom: 0.2rem;
  color: #aaa9b7;
  font-size: 0.65rem;
  font-weight: 500;
}

.lobby-empty-state p {
  color: var(--color-text-muted);
  font-size: 0.57rem;
  line-height: 1.5;
}

.lobby-benefits {
  padding: 110px 0 130px;
}

.lobby-benefits__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.lobby-benefit {
  position: relative;
  min-height: 290px;
  padding: 2rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 22px;
  background: rgba(15, 15, 24, 0.65);
}

.lobby-benefit--wide {
  min-height: 340px;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(400px, 1.15fr);
  align-items: center;
  gap: 4rem;
  background:
    radial-gradient(circle at 75% 40%, rgba(124, 92, 252, 0.08), transparent 24rem),
    rgba(15, 15, 24, 0.68);
}

.lobby-benefit > span,
.lobby-benefit__copy > span {
  display: block;
  margin-bottom: 1.25rem;
  color: var(--color-text-muted);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
}

.lobby-benefit h3 {
  max-width: 430px;
  margin-bottom: 0.75rem;
  color: #e4e3eb;
  font-size: clamp(1.35rem, 2.5vw, 2.1rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.lobby-benefit p {
  max-width: 470px;
  color: var(--color-text-secondary);
  font-size: 0.78rem;
  line-height: 1.7;
}

.lobby-benefit__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem 0 3rem;
  border-radius: 14px;
  background: rgba(124, 92, 252, 0.08);
  color: var(--color-text-accent);
  font-size: 0.9rem;
}

.sync-visual {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 18px;
  background: rgba(5, 5, 10, 0.48);
}

.sync-visual > div {
  display: grid;
  grid-template-columns: 52px 1fr 42px;
  align-items: center;
  gap: 0.75rem;
}

.sync-visual span,
.sync-visual b {
  color: #777788;
  font-size: 0.58rem;
  font-weight: 500;
}

.sync-visual b {
  color: #aaa9b7;
  text-align: right;
}

.sync-visual i {
  position: relative;
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.sync-visual i::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--progress);
  border-radius: inherit;
  background: var(--color-accent);
}

.lobby-footer {
  width: min(1180px, calc(100% - 48px));
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.lobby-footer p {
  color: var(--color-text-muted);
  font-size: 0.65rem;
}

.lobby-footer button {
  border: 0;
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 0.68rem;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.lobby-footer button:hover {
  color: #fff;
}

@media (max-width: 900px) {
  .lobby-steps,
  .lobby-actions-section,
  .lobby-benefits,
  .lobby-footer {
    width: min(100% - 32px, 720px);
  }

  .lobby-steps__grid {
    grid-template-columns: 1fr;
  }

  .lobby-step {
    min-height: 190px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .lobby-step:last-child {
    border-bottom: 0;
  }

  .lobby-step__icon {
    margin-bottom: 1.7rem;
  }

  .lobby-action-grid {
    grid-template-columns: 1fr;
  }

  .lobby-benefit--wide {
    grid-template-columns: 1fr;
    gap: 2.4rem;
  }
}

@media (max-width: 600px) {
  .lobby-steps,
  .lobby-actions-section,
  .lobby-benefits,
  .lobby-footer {
    width: calc(100% - 28px);
  }

  .lobby-steps {
    padding: 72px 0 82px;
  }

  .lobby-section-heading {
    margin-bottom: 2rem;
  }

  .lobby-section-heading h2 {
    font-size: 2.1rem;
  }

  .lobby-step {
    min-height: 176px;
    padding: 1.35rem 0.4rem;
  }

  .lobby-step__number {
    right: 0.5rem;
  }

  .lobby-actions-section {
    padding: 82px 0 88px;
  }

  .lobby-actions-section::before {
    margin-top: -82px;
  }

  .lobby-panel {
    padding: 1.15rem;
    border-radius: 18px;
  }

  .lobby-form-row,
  .lobby-room-preferences,
  .lobby-benefits__grid {
    grid-template-columns: 1fr;
  }

  .landing-page .setting-row {
    min-height: 66px;
  }

  .lobby-room-list {
    max-height: 210px;
  }

  .lobby-benefits {
    padding: 82px 0 96px;
  }

  .lobby-benefit,
  .lobby-benefit--wide {
    min-height: auto;
    padding: 1.35rem;
    border-radius: 18px;
  }

  .lobby-benefit__icon {
    margin: 1.5rem 0 2rem;
  }

  .sync-visual {
    padding: 1rem;
  }

  .sync-visual > div {
    grid-template-columns: 40px 1fr 38px;
    gap: 0.5rem;
  }

  .lobby-footer {
    min-height: 150px;
    flex-direction: column;
    justify-content: center;
    gap: 0.8rem;
    text-align: center;
  }
}

/* ============================================
   Utility — Visibility
   ============================================ */

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Loading Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.spinner--lg {
  width: 32px;
  height: 32px;
  border-width: 3px;
}

/* ---------- Inline-replaced Utility Classes ---------- */
.panel__title {
  margin-bottom: var(--space-lg);
}

.section-label {
  margin-bottom: var(--space-md);
  font-weight: 600;
}

.loading-area {
  padding: var(--space-lg);
}

.footer {
  padding: var(--space-xl) 0;
}

/* ============================================
   Film Gecesi V2 — product and room experience
   ============================================ */

.brand-version {
  display: inline-flex;
  align-items: center;
  height: 18px;
  margin-left: 0.28rem;
  padding: 0 0.38rem;
  border: 1px solid rgba(124, 92, 252, 0.38);
  border-radius: 5px;
  background: rgba(124, 92, 252, 0.12);
  color: #b9aaff;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  vertical-align: middle;
}

.lobby-room-preferences {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(120px, 0.75fr);
  align-items: end;
}

.lobby-capacity-field .form-input {
  cursor: pointer;
}

.room-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.7rem 0 0.55rem;
  padding: 0 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background: rgba(4, 4, 9, 0.38);
  color: var(--color-text-muted);
}

.room-search:focus-within {
  border-color: rgba(124, 92, 252, 0.45);
}

.room-search input {
  width: 100%;
  height: 38px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--color-text-primary);
  font-size: 0.72rem;
}

.room-card--restricted {
  border-color: rgba(251, 191, 36, 0.12);
}

.room-card--restricted .room-card__live-dot {
  background: var(--color-warning);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.08);
}

.room-header__logo-mark {
  width: 27px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(145deg, #8c70ff, #6240e8);
  color: white;
  font-size: 0.7rem;
  box-shadow: 0 5px 18px rgba(124, 92, 252, 0.22);
}

.sync-status {
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.62rem;
  border: 1px solid rgba(52, 211, 153, 0.16);
  border-radius: var(--radius-full);
  background: rgba(52, 211, 153, 0.06);
  color: #87e8c1;
  font-size: 0.61rem;
  font-weight: 600;
  white-space: nowrap;
}

.sync-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.65);
}

.sync-status--receiving,
.sync-status--adjusting {
  border-color: rgba(251, 191, 36, 0.18);
  background: rgba(251, 191, 36, 0.07);
  color: #f8d779;
}

.sync-status--receiving i,
.sync-status--adjusting i {
  background: var(--color-warning);
  animation: pulse 1s ease infinite;
}

.header-action--ready.is-ready {
  border-color: rgba(52, 211, 153, 0.2);
  background: rgba(52, 211, 153, 0.09);
  color: #8fe9c5;
}

.reaction-menu {
  position: relative;
}

.reaction-tray {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: var(--z-dropdown);
  display: flex;
  gap: 0.18rem;
  padding: 0.42rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(17, 17, 28, 0.96);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-5px) scale(0.97);
  transition: var(--transition-fast);
}

.reaction-tray.visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.reaction-tray button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 1.12rem;
  cursor: pointer;
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.reaction-tray button:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-3px) scale(1.1);
}

.reaction-stage {
  position: absolute;
  inset: 0;
  z-index: 25;
  overflow: hidden;
  pointer-events: none;
}

.floating-reaction {
  position: absolute;
  left: var(--reaction-x);
  bottom: 4%;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.55));
  animation: reaction-float 2.35s ease-out forwards;
}

@keyframes reaction-float {
  0% { opacity: 0; transform: translateY(20px) scale(0.55) rotate(-8deg); }
  16% { opacity: 1; transform: translateY(0) scale(1.08) rotate(4deg); }
  100% { opacity: 0; transform: translateY(-250px) scale(1.25) rotate(-6deg); }
}

.sidebar__tabs {
  gap: 0.2rem;
}

.sidebar__tab-count {
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.2rem;
  border-radius: var(--radius-full);
  background: rgba(124, 92, 252, 0.16);
  color: #b9aaff;
  font-size: 0.58rem;
}

.chat__toolbar {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.75rem 0;
  color: var(--color-text-muted);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chat__clear {
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.6rem;
  cursor: pointer;
}

.chat__clear:hover {
  color: var(--color-danger);
}

.user-item__actions {
  display: flex;
  align-items: center;
  gap: 0.38rem;
}

.user-item__ready {
  padding: 0.15rem 0.38rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text-muted);
  font-size: 0.55rem;
}

.user-item__ready.is-ready {
  background: rgba(52, 211, 153, 0.09);
  color: #7fe2b9;
}

.user-item__kick {
  padding: 0.18rem 0.4rem;
  border: 1px solid rgba(248, 113, 113, 0.15);
  border-radius: 6px;
  background: rgba(248, 113, 113, 0.06);
  color: #df8585;
  font-size: 0.53rem;
  cursor: pointer;
}

.queue-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.queue-panel__header {
  padding: 0.85rem 0.85rem 0.45rem;
}

.queue-panel__header span,
.queue-panel__header small {
  display: block;
}

.queue-panel__header span {
  font-size: 0.78rem;
  font-weight: 600;
}

.queue-panel__header small {
  margin-top: 0.12rem;
  color: var(--color-text-muted);
  font-size: 0.6rem;
}

.queue-form {
  display: grid;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.queue-form .form-input {
  min-height: 38px;
  padding: 0.55rem 0.65rem;
  font-size: 0.7rem;
}

.queue-form__url {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.4rem;
}

.queue-list {
  min-height: 0;
  overflow-y: auto;
  padding: 0.45rem;
}

.queue-item {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.queue-item__index {
  color: #5e5d70;
  font-size: 0.58rem;
  font-variant-numeric: tabular-nums;
}

.queue-item__copy {
  min-width: 0;
}

.queue-item__copy strong,
.queue-item__copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-item__copy strong {
  color: #dad9e3;
  font-size: 0.7rem;
  font-weight: 550;
}

.queue-item__copy small {
  margin-top: 0.1rem;
  color: var(--color-text-muted);
  font-size: 0.55rem;
}

.queue-item__actions {
  display: flex;
  gap: 0.22rem;
}

.queue-item__actions button {
  height: 27px;
  border-radius: 6px;
  font-size: 0.56rem;
  cursor: pointer;
}

.queue-item__play {
  padding: 0 0.45rem;
  border: 1px solid rgba(124, 92, 252, 0.2);
  background: rgba(124, 92, 252, 0.1);
  color: #b9aaff;
}

.queue-item__remove {
  width: 27px;
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
}

.queue-empty {
  margin: auto;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--color-text-muted);
}

.queue-empty span,
.queue-empty strong,
.queue-empty p {
  display: block;
}

.queue-empty span {
  margin-bottom: 0.6rem;
  font-size: 1.4rem;
}

.queue-empty strong {
  color: var(--color-text-secondary);
  font-size: 0.75rem;
}

.queue-empty p {
  margin-top: 0.2rem;
  font-size: 0.62rem;
}

.settings-capacity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.65rem;
  padding: 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
}

.settings-capacity > span,
.settings-capacity small {
  display: block;
}

.settings-capacity strong {
  font-size: 0.78rem;
}

.settings-capacity small {
  margin-top: 0.15rem;
  color: var(--color-text-muted);
  font-size: 0.58rem;
}

.settings-capacity .form-input {
  width: 112px;
  min-height: 38px;
}

.room-code-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.8rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  color: var(--color-text-muted);
  font-size: 0.65rem;
}

.room-code-row code {
  color: #d8d3f4;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.room-code-row button {
  border: 0;
  background: transparent;
  color: var(--color-text-accent);
  font-size: 0.62rem;
  cursor: pointer;
}

@media (max-width: 1180px) {
  .sync-status span,
  .header-action__label {
    display: none;
  }

  .sync-status {
    width: 30px;
    padding: 0;
    justify-content: center;
  }
}

@media (max-width: 900px) {
  .lobby-room-preferences {
    grid-template-columns: 1fr 1fr;
  }

  .lobby-capacity-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .brand-version {
    height: 15px;
    font-size: 0.48rem;
  }

  .lobby-room-preferences {
    grid-template-columns: 1fr;
  }

  .lobby-capacity-field {
    grid-column: auto;
  }

  .room-header__logo-mark {
    width: 28px;
    height: 28px;
  }

  .sync-status {
    width: 26px;
    height: 26px;
  }

  #btn-reactions,
  #btn-ready,
  #btn-invite,
  #btn-leave {
    width: 30px;
    min-width: 30px;
  }

  .reaction-tray {
    position: fixed;
    top: 54px;
    right: 8px;
  }

  .sidebar__tab {
    font-size: 0.65rem;
  }

  .sidebar__tab-count {
    min-width: 16px;
    height: 16px;
  }

  .chat__toolbar {
    min-height: 27px;
    padding-top: 0.2rem;
  }

  .queue-panel__header {
    padding-top: 0.6rem;
  }

  .queue-form {
    grid-template-columns: 0.85fr 1.15fr;
    align-items: center;
    padding: 0.4rem 0.55rem 0.55rem;
  }

  .settings-capacity {
    align-items: flex-start;
    flex-direction: column;
  }

  .settings-capacity .form-input {
    width: 100%;
  }
}
