/* CineSync - Mobile & Responsive Cinema Styling */
:root {
  --bg-main: #0a0e17;
  --bg-card: #121826;
  --bg-card-hover: #1a2236;
  --accent-primary: #e50914;
  --accent-glow: rgba(229, 9, 20, 0.4);
  --accent-secondary: #00d2ff;
  --accent-secondary-glow: rgba(0, 210, 255, 0.35);
  --text-primary: #f5f7fa;
  --text-muted: #8e9bb0;
  --text-dim: #5a667a;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(229, 9, 20, 0.3);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Header */
.app-header {
  height: 60px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(18, 24, 38, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.brand-logo {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-primary), #ff5a5f);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-tag {
  font-size: 0.65rem;
  background: rgba(229, 9, 20, 0.15);
  color: #ff5a5f;
  border: 1px solid rgba(229, 9, 20, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
}

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

.room-badge {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.room-badge:hover {
  background: rgba(255, 255, 255, 0.12);
}

.live-dot {
  width: 8px;
  height: 8px;
  background: #00ff88;
  border-radius: 50%;
  box-shadow: 0 0 8px #00ff88;
  animation: pulseLive 2s infinite;
}

@keyframes pulseLive {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Lobby Modal / View */
.lobby-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 12px;
  background: radial-gradient(circle at 50% 20%, rgba(229, 9, 20, 0.08) 0%, transparent 65%);
}

.lobby-card {
  width: 100%;
  max-width: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.lobby-hero {
  text-align: center;
  margin-bottom: 24px;
}

.lobby-hero h1 {
  font-size: 1.7rem;
  font-weight: 800;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #ffffff, #b0c4de);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.lobby-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
}

.lobby-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.lobby-tab.active {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input, .form-select {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

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

.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  max-height: 140px;
  overflow-y: auto;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px;
}

.country-chip {
  padding: 6px 10px;
  font-size: 0.82rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  transition: all 0.2s;
}

.country-chip.selected {
  background: rgba(0, 210, 255, 0.15);
  border-color: var(--accent-secondary);
  color: #fff;
  font-weight: 600;
}

.movie-picker-slider {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}

.movie-thumb-card, .movie-picker-card {
  min-width: 125px;
  max-width: 125px;
  flex-shrink: 0;
  background: rgba(0,0,0,0.4);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  scroll-snap-align: start;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}

.movie-thumb-card.selected, .movie-picker-card.selected {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--accent-glow);
}

.movie-thumb-card img, .movie-picker-card img {
  width: 100%;
  height: 75px;
  object-fit: cover;
  display: block;
}

.movie-thumb-info {
  padding: 6px;
}

.movie-thumb-title, .movie-picker-title {
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 4px 6px 0 6px;
  color: #fff;
}

.movie-thumb-genre, .movie-picker-duration {
  font-size: 0.65rem;
  color: var(--text-muted);
  padding: 0 6px 6px 6px;
}

.btn-cta {
  width: 100%;
  padding: 14px;
  border: none;
  background: linear-gradient(135deg, var(--accent-primary), #ff2a3b);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 6px 20px var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px var(--accent-glow);
}

.btn-cta:active {
  transform: translateY(1px);
}

/* Theater View Layout */
.theater-container {
  display: none;
  flex: 1;
  flex-direction: column;
  height: calc(100vh - 60px);
}

@media (min-width: 900px) {
  .theater-container {
    flex-direction: row;
  }
}

/* Left: Video Stage */
.video-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #000;
  position: relative;
  min-height: 240px;
}

.video-player-wrapper {
  position: relative;
  width: 100%;
  flex: 1;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#mainVideo {
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 140px);
  background: #000;
  outline: none;
  object-fit: contain;
}

/* Floating sync indicator over video */
.sync-indicator-pill {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
  pointer-events: none;
}

.sync-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00ff88;
}

.sync-status-dot.syncing {
  background: #ffaa00;
}

/* Floating reactions animation canvas / layer */
.floating-reactions-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 20;
}

/* ==========================================================================
   CUSTOM CINEMA VIDEO PLAYER & GOOGLE DRIVE VIEWER
   ========================================================================== */
.drive-preview-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
  z-index: 15;
}

/* When in Drive mode, center play button yields to the iframe */
.video-player-wrapper.is-drive-mode .player-center-play {
  display: none !important;
  pointer-events: none !important;
}

/* Center Play / Pause Pulsing Circle */
.player-center-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 12;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.video-player-wrapper.paused .player-center-play,
.video-player-wrapper:hover .player-center-play {
  opacity: 1;
  pointer-events: auto;
}

.btn-play-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(229, 9, 20, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.6);
  color: #fff;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(229, 9, 20, 0.5);
  transition: transform 0.2s, background 0.2s;
  padding-left: 5px;
}

.btn-play-circle:hover {
  transform: scale(1.1);
  background: #ff2a6d;
}

.btn-play-circle:active {
  transform: scale(0.94);
}

/* Overlay Video Controls Bar */
.custom-player-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.6) 65%, transparent 100%);
  padding: 24px 16px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 25;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.video-player-wrapper.user-idle:not(.paused) .custom-player-controls,
.video-player-wrapper.user-idle.is-drive-mode .custom-player-controls {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

/* In drive mode, hide the scrubbing bar and the left controls (play, skip, volume) to avoid double controllers */
.video-player-wrapper.is-drive-mode .scrub-bar-container,
.video-player-wrapper.is-drive-mode .controls-left {
  display: none !important;
}

/* Scrubber / Seek Bar */
.scrub-bar-container {
  position: relative;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  cursor: pointer;
  transition: height 0.15s ease;
}

.scrub-bar-container:hover {
  height: 10px;
}

.scrub-bar-buffer {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 3px;
  pointer-events: none;
}

.scrub-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-primary), #ff2a6d);
  border-radius: 3px;
  pointer-events: none;
}

.scrub-handle {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px rgba(0,0,0,0.8);
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  transition: transform 0.15s ease;
}

.scrub-bar-container:hover .scrub-handle {
  transform: translate(-50%, -50%) scale(1);
}

/* Control Buttons Row */
.custom-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.controls-left, .controls-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ctrl-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
  min-width: 32px;
}

.ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.ctrl-btn:active {
  transform: scale(0.92);
}

.text-ctrl {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.time-display {
  font-size: 0.8rem;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
}

/* Volume control wrap */
.volume-control-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.volume-slider {
  width: 70px;
  height: 4px;
  accent-color: var(--accent-primary);
  cursor: pointer;
  outline: none;
  transition: width 0.2s;
}

@media (max-width: 600px) {
  .volume-slider {
    width: 50px;
  }
  .controls-left button:nth-child(2),
  .controls-left button:nth-child(3) {
    display: none; /* Hide 10s skip on very tight mobile screens to conserve space */
  }
}

/* Google Drive Mode chip button */
.btn-gdrive-chip {
  background: rgba(66, 133, 244, 0.2);
  border: 1px solid rgba(66, 133, 244, 0.4);
  color: #8ab4f8;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 14px;
}

.btn-gdrive-chip:hover {
  background: rgba(66, 133, 244, 0.35);
  color: #fff;
}

/* Speed selector dropdown menu */
.speed-selector-wrap, .audio-track-selector-wrap {
  position: relative;
}

.btn-audio-track {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-audio-track:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
}

.audio-dropdown-menu {
  min-width: 210px;
  max-height: 240px;
  overflow-y: auto;
}

.speed-dropdown-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: rgba(18, 24, 38, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 4px 0;
  min-width: 120px;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.speed-dropdown-menu.show {
  display: block;
}

.speed-option {
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.speed-option:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.speed-option.active {
  color: var(--accent-primary);
  font-weight: 700;
}

.input-hint {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

.floating-emoji {
  position: absolute;
  bottom: 20px;
  font-size: 2.2rem;
  animation: floatUp 3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  pointer-events: none;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) scale(0.6) rotate(0deg);
    opacity: 0;
  }
  15% {
    opacity: 1;
    transform: translateY(-30px) scale(1.2) rotate(-10deg);
  }
  80% {
    opacity: 0.9;
    transform: translateY(-240px) scale(1) rotate(15deg);
  }
  100% {
    transform: translateY(-320px) scale(0.8) rotate(30deg);
    opacity: 0;
  }
}

/* Video Bottom Control / Meta Bar */
.theater-controls-bar {
  padding: 10px 14px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.movie-meta-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.movie-title-active {
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-genre-badge {
  font-size: 0.72rem;
  color: var(--accent-secondary);
  background: rgba(0, 210, 255, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.theater-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-theater-icon {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-theater-icon:hover {
  background: rgba(255, 255, 255, 0.16);
}

.reaction-dock {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 8px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.btn-react {
  background: transparent;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 2px 4px;
  transition: transform 0.15s;
}

.btn-react:hover {
  transform: scale(1.35);
}

.btn-react:active {
  transform: scale(0.9);
}

/* Right Side / Mobile Bottom: Chat & Social Drawer */
.social-sidebar {
  width: 100%;
  background: var(--bg-card);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 380px;
}

@media (min-width: 900px) {
  .social-sidebar {
    width: 360px;
    height: 100%;
  }
}

.social-tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
}

.social-tab-btn {
  flex: 1;
  padding: 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
  transition: color 0.2s;
}

.social-tab-btn.active {
  color: #fff;
}

.social-tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 3px;
  background: var(--accent-primary);
  border-radius: 3px 3px 0 0;
}

.tab-pane {
  display: none;
  flex: 1;
  overflow: hidden;
  flex-direction: column;
}

.tab-pane.active {
  display: flex;
}

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

.chat-bubble {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  background: #2a2f3a;
  border: none;
  padding: 10px 14px;
  border-radius: 18px 18px 18px 4px;
  font-size: 0.9rem;
  line-height: 1.4;
  word-break: break-word;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  color: #e2e8f0;
}

.chat-bubble.mine {
  align-self: flex-end;
  background: linear-gradient(135deg, #e50914, #ff2a6d);
  border-radius: 18px 18px 4px 18px;
  color: #fff;
  border: none;
}

.chat-bubble.system {
  align-self: center;
  background: transparent;
  border: none;
  box-shadow: none;
  color: #8ab4f8;
  font-style: italic;
  font-size: 0.8rem;
  text-align: center;
  max-width: 95%;
}

.chat-header-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.chat-sender-name {
  font-weight: 700;
  color: #fff;
}

.chat-time {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-left: auto;
}

.chat-input-bar {
  padding: 10px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
}

.chat-input-bar input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: 20px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
}

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

.btn-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s;
}

.btn-send:active {
  transform: scale(0.92);
}

/* Participants List */
.participants-container {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.participant-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

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

.participant-flag {
  font-size: 1.3rem;
}

.participant-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.participant-country-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.badge-host {
  font-size: 0.68rem;
  background: rgba(255, 170, 0, 0.2);
  color: #ffb833;
  border: 1px solid rgba(255, 170, 0, 0.35);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

/* Change Movie Drawer / Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-content {
  width: 100%;
  max-width: 500px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Toast alert notification */
.toast-msg {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 24, 38, 0.95);
  border: 1px solid var(--accent-primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 0.88rem;
  z-index: 300;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  animation: fadeInOut 3s forwards;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translate(-50%, 15px); }
  15% { opacity: 1; transform: translate(-50%, 0); }
  80% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -10px); }
}

/* ===== Live Captions Overlay (translated speech + TTS bubbles) ===== */
.caption-overlay {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: min(92%, 560px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 15;
  pointer-events: none;
}

.caption-line {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.92rem;
  line-height: 1.45;
  text-align: center;
  max-width: 100%;
  animation: captionIn 0.25s ease;
}

.caption-line .cap-name {
  color: var(--accent-secondary);
  font-weight: 700;
  margin-right: 6px;
  font-size: 0.78rem;
}

.caption-line .cap-translation {
  display: block;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dashed rgba(255,255,255,0.25);
  color: #ffd166;
  font-size: 0.85rem;
}

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

/* ===== Voice button states ===== */
.btn-voice.calling {
  background: rgba(0, 255, 136, 0.2);
  border-color: rgba(0, 255, 136, 0.5);
  animation: pulseLive 1.6s infinite;
}

.btn-voice.mic-muted {
  opacity: 0.55;
}

.btn-caption.listening {
  background: rgba(229, 9, 20, 0.35);
  border-color: rgba(229, 9, 20, 0.6);
  animation: pulseLive 1.2s infinite;
}

/* ===== Voice modal extras ===== */
.range-slider {
  width: 100%;
  accent-color: var(--accent-primary);
  height: 4px;
}

.voice-hint {
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: center;
}

/* Translated line under a chat bubble */
.chat-translation {
  display: block;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px dashed rgba(255,255,255,0.18);
  color: #ffd166;
  font-size: 0.8rem;
}

/* Mobile full-width adjustments */
@media (max-width: 600px) {
  .app-header {
    padding: 0 12px;
  }
  .brand-title {
    font-size: 1rem;
  }
  .reaction-dock {
    gap: 4px;
    padding: 2px 6px;
  }
  .btn-react {
    font-size: 1rem;
  }
  .theater-controls-bar {
    padding: 8px 10px;
  }
  .lobby-card {
    padding: 18px;
  }
}
