/* ==========================================================================
   BIZIM SINEMAMIZ - Romantic Botanical Cinema Stylesheet
   Themes: Dark (Midnight Obsidian), Light (Crisp Linen), Love (Soft Romantic Pink)
   ========================================================================== */

:root {
  --bg-core: #090c10;
  --bg-surface: #10151f;
  --bg-elevated: #161e2c;
  --bg-input: #1b2434;

  --accent-gold: #e2b078;
  --accent-gold-soft: rgba(226, 176, 120, 0.15);
  --accent-gold-hover: #f0c38f;
  --accent-gold-glow: rgba(226, 176, 120, 0.25);

  --botanical-moss: #223f30;
  --botanical-leaf: #3e7b59;
  --botanical-soft: rgba(62, 123, 89, 0.2);

  --text-main: #f3efe9;
  --text-muted: #9fa7b8;
  --text-dim: #647087;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(226, 176, 120, 0.25);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --shadow-cinema: 0 20px 50px -10px rgba(0, 0, 0, 0.7), 0 0 40px rgba(226, 176, 120, 0.04);
}

/* ==========================================================================
   LIGHT THEME (AÇIK TEMA) - Yüksek Kontrast, Kristal Netliğinde Okunabilirlik
   ========================================================================== */
[data-theme="light"] {
  --bg-core: #f5f2eb;
  --bg-surface: #ffffff;
  --bg-elevated: #eae4d6;
  --bg-input: #ffffff;

  --accent-gold: #b37324;
  --accent-gold-soft: rgba(179, 115, 36, 0.14);
  --accent-gold-hover: #965f1a;
  --accent-gold-glow: rgba(179, 115, 36, 0.28);

  --botanical-moss: #1e4530;
  --botanical-leaf: #2c6845;
  --botanical-soft: rgba(44, 104, 69, 0.12);

  --text-main: #141b24;
  --text-muted: #3d495c;
  --text-dim: #647287;

  --border-subtle: #d8cfbe;
  --border-gold: #b37324;

  --shadow-cinema: 0 10px 30px -5px rgba(0, 0, 0, 0.08), 0 2px 10px rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   LOVE THEME (AŞK & ROMANTİZM TEMASI) - Sıcak, Canlı ve Tatlı Aşk Pembesi
   ========================================================================== */
[data-theme="love"] {
  --bg-core: #220d1c;            /* Tatlı ahududu pembe gece zemini */
  --bg-surface: #34142b;         /* Sıcak pembe/orkide yüzey */
  --bg-elevated: #4b1d3e;        /* Pembe buton zemini */
  --bg-input: #291022;           /* Giriş alanı */

  --accent-gold: #ff3377;        /* Canlı, parlak Aşk Pembesi */
  --accent-gold-soft: rgba(255, 51, 119, 0.22);
  --accent-gold-hover: #ff5591;
  --accent-gold-glow: rgba(255, 51, 119, 0.45);

  --botanical-moss: #501639;
  --botanical-leaf: #ff3377;
  --botanical-soft: rgba(255, 51, 119, 0.2);

  --text-main: #fff0f5;          /* Kar beyazı & pamuk pembe yazı */
  --text-muted: #f7c3dc;         /* Tatlı pembe alt yazı */
  --text-dim: #ba84a4;           /* Muted pembe */

  --border-subtle: rgba(255, 85, 145, 0.28);
  --border-gold: rgba(255, 51, 119, 0.6);

  --shadow-cinema: 0 20px 50px -10px rgba(0, 0, 0, 0.65), 0 0 45px rgba(255, 51, 119, 0.28);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-core);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-touch-callout: none;
}

/* Ambient Background Lights */
.ambient-glow {
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.25;
  transition: background 0.5s ease;
}

.glow-top-left {
  top: -100px;
  left: -100px;
  background: radial-gradient(circle, var(--botanical-leaf) 0%, transparent 70%);
}

.glow-bottom-right {
  bottom: -150px;
  right: -100px;
  background: radial-gradient(circle, var(--accent-gold) 0%, transparent 70%);
}

[data-theme="love"] .glow-top-left {
  background: radial-gradient(circle, #ff1a6b 0%, transparent 70%);
  opacity: 0.45;
}
[data-theme="love"] .glow-bottom-right {
  background: radial-gradient(circle, #ff6699 0%, transparent 70%);
  opacity: 0.4;
}

/* ==========================================================================
   ROMANTIC SIDE FLOATING HEARTS (Love Theme Only - Never blocks screen!)
   ========================================================================== */
.floating-side-hearts {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 85px;
  pointer-events: none;
  z-index: 4;
  overflow: hidden;
  display: none;
}

[data-theme="love"] .floating-side-hearts {
  display: block;
}

.floating-side-hearts.side-left {
  left: 0;
}

.floating-side-hearts.side-right {
  right: 0;
}

.side-heart-particle {
  position: absolute;
  bottom: -30px;
  font-size: 1.4rem;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  animation: floatSideHeart 4.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  filter: drop-shadow(0 2px 8px rgba(255, 51, 119, 0.4));
  opacity: 0.65;
}

@keyframes floatSideHeart {
  0% {
    transform: translateY(0) scale(0.6) rotate(0deg);
    opacity: 0;
  }
  20% {
    opacity: 0.8;
    transform: translateY(-80px) scale(1.15) rotate(-10deg);
  }
  60% {
    opacity: 0.75;
    transform: translateY(-300px) scale(1) rotate(12deg);
  }
  100% {
    transform: translateY(-580px) scale(0.7) rotate(-15deg);
    opacity: 0;
  }
}

/* App Main Layout */
.app-layout {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* ==========================================================================
   TOP NAVIGATION
   ========================================================================== */
.top-nav {
  height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(16, 21, 31, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  gap: 16px;
  flex-shrink: 0;
  z-index: 50;
}

[data-theme="love"] .top-nav {
  background: rgba(52, 20, 43, 0.85);
  border-bottom-color: var(--border-subtle);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1.5px solid var(--border-gold);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

[data-theme="love"] .brand-icon {
  width: 48px;
  height: 48px;
  border: 2px solid #ff3377;
  box-shadow: 0 0 16px rgba(255, 51, 119, 0.6);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-text h1 {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-main);
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 3px;
}

.brand-heart {
  color: var(--accent-gold);
  font-family: var(--font-sans);
  font-weight: 700;
  margin: 0 5px;
  display: inline-block;
  animation: gentlePulse 2.5s infinite ease-in-out;
}

/* Couple Status Center Bar */
.couple-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(22, 30, 44, 0.7);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

[data-theme="love"] .couple-bar {
  background: rgba(75, 29, 62, 0.7);
}

.partner-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.partner-badge.me {
  cursor: pointer;
  touch-action: manipulation;
}

.partner-badge.me:hover {
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-dot.online {
  background-color: #2ecc71;
  box-shadow: 0 0 10px #2ecc71;
}

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

.partner-status-text {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 400;
}

.edit-name-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s, transform 0.2s;
}

.partner-badge.me:hover .edit-name-btn,
.edit-name-btn:hover {
  color: var(--accent-gold);
  transform: scale(1.15);
}

.couple-heart {
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  animation: gentlePulse 2.5s infinite ease-in-out;
}

@keyframes gentlePulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.18); opacity: 1; }
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.room-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  font-size: 0.82rem;
}

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

.copy-btn {
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s;
  touch-action: manipulation;
}

.copy-btn:hover {
  background: var(--accent-gold);
  color: #fff;
}

.btn-theme-toggle,
.btn-cinema-toggle {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  touch-action: manipulation;
}

.btn-theme-toggle:hover,
.btn-cinema-toggle:hover {
  color: var(--accent-gold);
  border-color: var(--accent-gold);
  background: var(--bg-surface);
  transform: translateY(-1px);
}

#heartThemeIcon {
  color: #ff3377;
}

/* ==========================================================================
   MAIN VIEWPORT: CINEMA (LEFT) + CHAT (RIGHT)
   ========================================================================== */
.main-container {
  flex: 1;
  display: flex;
  padding: 16px 24px;
  gap: 18px;
  height: calc(100vh - 72px);
  height: calc(100dvh - 72px);
  min-height: 0;
  overflow: hidden;
}

/* ==========================================================================
   CINEMA / VIDEO SECTION
   ========================================================================== */
.cinema-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.video-container {
  flex: 1;
  background: #000;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-cinema);
  user-select: none;
  min-height: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Video element takes 100% space */
#mainVideo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* ==========================================================================
   DROP ZONE UI (Z-INDEX 35 - ALWAYS CLICKABLE & NEVER BLOCKED!)
   ========================================================================== */
.video-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(34, 63, 48, 0.25) 0%, rgba(16, 21, 31, 0.8) 100%);
  border: 2px dashed rgba(226, 176, 120, 0.35);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  z-index: 35;
  pointer-events: auto;
}

[data-theme="love"] .video-dropzone {
  background: radial-gradient(circle at center, rgba(255, 51, 119, 0.22) 0%, rgba(52, 20, 43, 0.85) 100%);
  border-color: rgba(255, 51, 119, 0.5);
}

.video-dropzone.drag-over {
  border-color: var(--accent-gold);
  background: rgba(255, 51, 119, 0.3);
  transform: scale(0.99);
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 580px;
  pointer-events: auto;
}

.dropzone-icon {
  color: var(--accent-gold);
  margin-bottom: 16px;
  animation: floatIcon 3s infinite ease-in-out;
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.dropzone-content h2 {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 20px;
  line-height: 1.25;
}

.btn-select-file {
  background: linear-gradient(135deg, var(--accent-gold), #d89650);
  color: #0b0e14;
  padding: 13px 32px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--accent-gold-glow);
  transition: all 0.25s;
  touch-action: manipulation;
  border: none;
  font-family: var(--font-sans);
  position: relative;
  z-index: 36;
  pointer-events: auto;
}

[data-theme="love"] .btn-select-file {
  background: linear-gradient(135deg, #ff3377, #d91455);
  color: #fff;
  box-shadow: 0 4px 25px rgba(255, 51, 119, 0.5);
}

.btn-select-file:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(226, 176, 120, 0.45);
}

/* When video is NOT loaded, HIDE overlay controls completely */
.video-container:not(.video-loaded) .video-controls-overlay,
.video-container:not(.video-loaded) .double-tap-ripple,
.video-container:not(.video-loaded) .video-live-chat-overlay {
  display: none !important;
  pointer-events: none !important;
}

/* ==========================================================================
   YOUTUBE-STYLE DOUBLE TAP SEEK RIPPLES (-5s / +5s)
   ========================================================================== */
.double-tap-ripple {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 38%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  z-index: 28;
  transition: opacity 0.25s ease;
}

.double-tap-ripple.left {
  left: 0;
  border-radius: 0 160px 160px 0;
  background: radial-gradient(ellipse at left, rgba(255, 255, 255, 0.25) 0%, transparent 70%);
}

.double-tap-ripple.right {
  right: 0;
  border-radius: 160px 0 0 160px;
  background: radial-gradient(ellipse at right, rgba(255, 255, 255, 0.25) 0%, transparent 70%);
}

.dt-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  width: 76px;
  height: 76px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  transform: scale(0.8);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.double-tap-ripple.active {
  opacity: 1;
}

.double-tap-ripple.active .dt-circle {
  transform: scale(1.05);
}

/* ==========================================================================
   YOUTUBE LIVE IN-VIDEO OVERLAY CHAT
   ========================================================================== */
.video-live-chat-overlay {
  position: absolute;
  left: 18px;
  bottom: 84px;
  max-width: 360px;
  width: calc(100% - 36px);
  pointer-events: none;
  z-index: 26;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  transition: opacity 0.3s ease;
}

.video-live-chat-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.live-chat-bubbles {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.live-bubble {
  background: rgba(14, 19, 28, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 6px 14px;
  font-size: 0.86rem;
  color: #fff;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  animation: liveBubbleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1), liveBubbleFadeOut 1.2s ease-in 5.5s forwards;
  max-width: 90%;
  word-break: break-word;
}

[data-theme="love"] .live-bubble {
  background: rgba(52, 20, 43, 0.84);
  border-color: rgba(255, 51, 119, 0.35);
}

.live-bubble-sender {
  font-weight: 700;
  color: var(--accent-gold);
  font-size: 0.82rem;
  flex-shrink: 0;
}

.live-bubble-text {
  color: #f3efe9;
  line-height: 1.35;
}

@keyframes liveBubbleIn {
  from { opacity: 0; transform: translateY(12px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes liveBubbleFadeOut {
  0% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-8px); }
}

/* ==========================================================================
   ON-VIDEO OVERLAY CONTROLS (Controlled strictly by JS .active class)
   ========================================================================== */
.video-controls-overlay {
  position: absolute;
  inset: 0;
  z-index: 24;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.75) 0%, transparent 24%, transparent 68%, rgba(0, 0, 0, 0.88) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  touch-action: manipulation;
}

.video-controls-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Top Row inside Video */
.overlay-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.overlay-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.overlay-movie-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.overlay-title-group .sync-badge {
  position: static;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.9);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.overlay-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.overlay-btn {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  touch-action: manipulation;
}

.overlay-btn:hover {
  background: var(--accent-gold);
  color: #000;
  border-color: var(--accent-gold);
  transform: scale(1.1);
}

/* Center Big Playback Buttons */
.overlay-center-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
}

.overlay-circle-btn {
  background: rgba(14, 19, 28, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.overlay-circle-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #fff;
  transform: scale(1.12);
}

.overlay-circle-btn.play-main {
  width: 68px;
  height: 68px;
  background: linear-gradient(135deg, var(--accent-gold), #d89650);
  color: #0b0e14;
  border: none;
  box-shadow: 0 4px 20px var(--accent-gold-glow);
}

[data-theme="love"] .overlay-circle-btn.play-main {
  background: linear-gradient(135deg, #ff3377, #d91455);
  color: #fff;
  box-shadow: 0 4px 25px rgba(255, 51, 119, 0.5);
}

.overlay-circle-btn.play-main:hover {
  transform: scale(1.15);
}

/* Bottom Row inside Video */
.overlay-bottom-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.overlay-time-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.overlay-mini-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s;
  touch-action: manipulation;
}

.overlay-mini-btn:hover {
  background: var(--accent-gold);
  color: #000;
  border-color: var(--accent-gold);
}

/* Quick Chat Bar inside Fullscreen / Video */
.overlay-chat-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(14, 19, 28, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.overlay-chat-bar.hidden {
  display: none !important;
}

[data-theme="love"] .overlay-chat-bar {
  background: rgba(52, 20, 43, 0.8);
  border-color: rgba(255, 51, 119, 0.3);
}

.overlay-quick-emojis {
  display: flex;
  align-items: center;
  gap: 8px;
}

.overlay-emoji-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  transition: transform 0.15s ease;
  line-height: 1;
  padding: 2px;
  touch-action: manipulation;
}

.overlay-emoji-btn:hover {
  transform: scale(1.3);
}

.overlay-chat-form {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.overlay-chat-form input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.88rem;
  outline: none;
  font-family: var(--font-sans);
}

.overlay-chat-form input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.overlay-chat-send {
  background: var(--accent-gold);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.overlay-chat-send:hover {
  transform: scale(1.15);
}

/* ==========================================================================
   CONTAINER FULLSCREEN SUPPORT (:fullscreen on video-container)
   ========================================================================== */
.video-container:fullscreen,
.video-container:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
}

.video-container:fullscreen #mainVideo,
.video-container:-webkit-full-screen #mainVideo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Tap to Play Overlay (Apple iPadOS / Safari autoplay helper) */
.tap-to-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 27;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.btn-tap-to-play {
  background: linear-gradient(135deg, var(--accent-gold), #c99359);
  color: #0b0e14;
  border: 2px solid #ffffff;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-sans);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  animation: pulseButton 2s infinite ease-in-out;
  touch-action: manipulation;
}

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

/* ==========================================================================
   FLOATING ROMANTIC REACTIONS OVERLAY (With Mega Vibration Bomb Effect)
   ========================================================================== */
.reaction-canvas-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 25;
}

.floating-particle {
  position: absolute;
  bottom: -20px;
  font-size: 2.2rem;
  line-height: 1;
  pointer-events: none;
  animation: floatUpAndFade 3.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
  user-select: none;
}

/* Mega Bomb Particle (Sent on Long Press) */
.floating-particle.mega {
  font-size: 4.5rem !important;
  animation: megaParticleBoom 2.8s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards !important;
  filter: drop-shadow(0 0 30px rgba(255, 51, 119, 0.85)) drop-shadow(0 0 10px #ff1a6b) !important;
}

@keyframes floatUpAndFade {
  0% {
    transform: translateY(0) scale(0.6) rotate(0deg);
    opacity: 0;
  }
  15% {
    opacity: 1;
    transform: translateY(-40px) scale(1.2) rotate(8deg);
  }
  50% {
    opacity: 0.95;
    transform: translateY(-220px) scale(1) rotate(-8deg);
  }
  100% {
    transform: translateY(-460px) scale(0.7) rotate(15deg);
    opacity: 0;
  }
}

@keyframes megaParticleBoom {
  0% {
    transform: translateY(0) scale(0.3) rotate(0deg);
    opacity: 0;
  }
  20% {
    opacity: 1;
    transform: translateY(-80px) scale(1.5) rotate(-10deg);
  }
  40% {
    transform: translateY(-140px) scale(1.3) rotate(10deg);
  }
  60% {
    transform: translateY(-220px) scale(1.4) rotate(-6deg);
  }
  100% {
    transform: translateY(-420px) scale(0.8) rotate(12deg);
    opacity: 0;
  }
}

/* Video Toast Alert */
.video-toast {
  position: absolute;
  top: 20px;
  background: rgba(16, 21, 31, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-gold);
  color: var(--text-main);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 29;
}

.video-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Sync Pulse Indicator */
.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.sync-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #2ecc71;
  box-shadow: 0 0 8px #2ecc71;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* ==========================================================================
   VIDEO BOTTOM BAR (Subtitles & Standard Controls)
   ========================================================================== */
.video-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  gap: 12px;
  flex-shrink: 0;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.file-name {
  color: var(--text-main);
  font-weight: 500;
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-change-file {
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-change-file:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.video-quick-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ctrl-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
  touch-action: manipulation;
}

.ctrl-btn:hover {
  background: var(--bg-input);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.ctrl-play-main {
  background: linear-gradient(135deg, var(--accent-gold), #c99359);
  color: #0b0e14;
  border: none;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  justify-content: center;
  box-shadow: 0 2px 10px var(--accent-gold-glow);
}

[data-theme="love"] .ctrl-play-main {
  background: linear-gradient(135deg, #ff3377, #d91455);
  color: #fff;
  box-shadow: 0 2px 10px rgba(255, 51, 119, 0.4);
}

.ctrl-play-main:hover {
  transform: scale(1.06);
}

/* Subtitle (.srt / .vtt) Controls */
.subtitle-bar-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-subtitle {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
  touch-action: manipulation;
}

.btn-subtitle:hover {
  background: var(--bg-input);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.subtitle-offset-group {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-input);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
}

.sub-name-tag {
  font-size: 0.75rem;
  color: var(--accent-gold);
  font-weight: 600;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
}

.btn-sub-offset {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-sub-offset:hover {
  background: var(--accent-gold);
  color: #fff;
}

.sub-offset-val {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-main);
  min-width: 34px;
  text-align: center;
}

.btn-sub-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.btn-sub-remove:hover {
  color: #e74c3c;
}

/* Crisp Cinema Subtitle / WebVTT Rendering */
video::cue {
  background-color: rgba(12, 16, 23, 0.88);
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95);
  padding: 3px 10px;
  border-radius: 4px;
}

/* ==========================================================================
   LOVE THEME ROMANTIC COUPLE BANNER & AVATAR (In Chat Sidebar)
   ========================================================================== */
.love-theme-banner {
  display: none;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: linear-gradient(135deg, rgba(255, 51, 119, 0.22), rgba(82, 32, 68, 0.45));
  border-bottom: 1px solid rgba(255, 51, 119, 0.35);
  animation: fadeInBanner 0.4s ease-out;
  flex-shrink: 0;
}

[data-theme="love"] .love-theme-banner {
  display: flex;
}

.love-photo-frame {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(135deg, #ff3377, #ff85b3, #ff1a6b);
  box-shadow: 0 0 16px rgba(255, 51, 119, 0.65), 0 2px 8px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.love-couple-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.love-frame-heart {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 1rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
  animation: gentlePulse 2s infinite ease-in-out;
}

.love-banner-info h4 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff0f5;
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1.2;
}

.love-banner-info p {
  font-size: 0.78rem;
  color: #f7c3dc;
  margin-top: 2px;
}

.heart-pulse {
  color: #ff3377;
  display: inline-block;
  animation: gentlePulse 2s infinite ease-in-out;
}

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

/* ==========================================================================
   CHAT & LOVE REACTIONS SIDEBAR
   ========================================================================== */
.chat-sidebar {
  width: 360px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s;
}

.chat-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(22, 30, 44, 0.4);
  flex-shrink: 0;
}

[data-theme="love"] .chat-header {
  background: rgba(75, 29, 62, 0.45);
}

.chat-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-title h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.chat-sound-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.chat-sound-toggle:hover {
  color: var(--accent-gold);
}

/* Quick Reactions Row */
.quick-reactions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(16, 21, 31, 0.5);
  border-bottom: 1px solid var(--border-subtle);
  gap: 4px;
  flex-shrink: 0;
}

[data-theme="love"] .quick-reactions-bar {
  background: rgba(52, 20, 43, 0.5);
}

.reaction-pill {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 6px 0;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.reaction-pill:hover {
  transform: translateY(-2px) scale(1.15);
  background: var(--accent-gold-soft);
  border-color: var(--border-gold);
}

/* Long press feedback on reaction pill */
.reaction-pill.pressing {
  transform: scale(1.35) !important;
  background: var(--accent-gold-glow) !important;
  border-color: var(--accent-gold) !important;
  animation: pillShake 0.15s infinite alternate ease-in-out;
}

@keyframes pillShake {
  0% { transform: scale(1.35) rotate(-3deg); }
  100% { transform: scale(1.35) rotate(3deg); }
}

/* Chat Message Stream (Auto-scrolled, never overflows body) */
.chat-messages {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

/* Custom Scrollbar */
.chat-messages::-webkit-scrollbar {
  width: 5px;
}
.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}
.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(226, 176, 120, 0.3);
}

/* Chat Bubbles */
.chat-bubble {
  max-width: 86%;
  display: flex;
  flex-direction: column;
  animation: fadeInBubble 0.22s ease-out;
}

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

.chat-bubble.me {
  align-self: flex-end;
}

.chat-bubble.partner {
  align-self: flex-start;
}

.bubble-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.chat-bubble.me .bubble-meta {
  justify-content: flex-end;
}

.bubble-sender {
  font-weight: 600;
  color: var(--text-muted);
}

.bubble-text {
  padding: 8px 13px;
  border-radius: 14px;
  font-size: 0.88rem;
  word-break: break-word;
  line-height: 1.4;
}

.chat-bubble.me .bubble-text {
  background: linear-gradient(135deg, rgba(226, 176, 120, 0.22), rgba(201, 147, 89, 0.15));
  border: 1px solid var(--border-gold);
  color: #fff;
  border-bottom-right-radius: 3px;
}

[data-theme="love"] .chat-bubble.me .bubble-text {
  background: linear-gradient(135deg, rgba(255, 51, 119, 0.3), rgba(217, 20, 85, 0.22));
  border-color: rgba(255, 51, 119, 0.5);
}

.chat-bubble.partner .bubble-text {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-bottom-left-radius: 3px;
}

/* System Messages */
.system-message {
  align-self: center;
  background: rgba(34, 63, 48, 0.35);
  border: 1px solid rgba(62, 123, 89, 0.4);
  color: #a4ddbd;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  text-align: center;
  max-width: 90%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.35;
}

.system-message.join {
  background: rgba(46, 204, 113, 0.15);
  border-color: rgba(46, 204, 113, 0.4);
  color: #2ecc71;
}

.system-message.leave {
  background: rgba(231, 76, 60, 0.15);
  border-color: rgba(231, 76, 60, 0.4);
  color: #e74c3c;
}

[data-theme="love"] .system-message {
  background: rgba(80, 22, 57, 0.45);
  border-color: rgba(255, 51, 119, 0.35);
  color: #ffb8d0;
}

.system-message.welcome {
  background: rgba(22, 30, 44, 0.6);
  border-color: var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-md);
  text-align: left;
  line-height: 1.4;
  align-self: stretch;
}

/* Chat Input Footer (Pinned to bottom) */
.chat-input-area {
  padding: 10px 14px;
  background: rgba(16, 21, 31, 0.85);
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

[data-theme="love"] .chat-input-area {
  background: rgba(52, 20, 43, 0.85);
}

.chat-form {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px 6px 4px 14px;
  transition: border-color 0.2s;
}

.chat-form:focus-within {
  border-color: var(--accent-gold);
}

#chatInput {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  outline: none;
  min-width: 0;
}

#chatInput::placeholder {
  color: var(--text-dim);
}

.btn-send-message {
  background: var(--accent-gold);
  border: none;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  flex-shrink: 0;
  touch-action: manipulation;
}

[data-theme="love"] .btn-send-message {
  background: #ff3377;
  color: #fff;
}

.btn-send-message:hover {
  transform: scale(1.08);
}

/* ==========================================================================
   MODAL & POPUPS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeInModal 0.2s ease-out;
}

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

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: scaleModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleModal {
  from { transform: scale(0.92); }
  to { transform: scale(1); }
}

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

.modal-header h3 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
}

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

.modal-close-btn:hover {
  color: var(--accent-gold);
}

.modal-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.45;
}

#nameInputModal {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 1rem;
  outline: none;
  margin-bottom: 20px;
  transition: border-color 0.2s;
}

#nameInputModal:focus {
  border-color: var(--accent-gold);
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.btn-secondary {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: var(--bg-input);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold), #c99359);
  color: #0b0e14;
  border: none;
  padding: 9px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

[data-theme="love"] .btn-primary {
  background: linear-gradient(135deg, #ff3377, #d91455);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-1px);
}

/* App Toast Notification */
.app-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(16, 21, 31, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-gold);
  color: #fff;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 120;
  max-width: 90vw;
  text-align: center;
}

.app-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Full Cinema Mode (Hide Sidebar) */
body.cinema-mode-active .chat-sidebar {
  display: none;
}

body.cinema-mode-active .main-container {
  padding: 12px;
}

/* ==========================================================================
   RESPONSIVE DESIGN (Tablets & Mobile Phones)
   ========================================================================== */
@media (min-width: 901px) and (max-width: 1200px) {
  .main-container {
    padding: 14px 16px;
    gap: 14px;
  }
  .chat-sidebar {
    width: 320px;
  }
}

@media (max-width: 900px) {
  .top-nav {
    padding: 0 12px;
    height: 60px;
    gap: 8px;
  }

  .brand-icon {
    width: 38px;
    height: 38px;
  }

  .brand-text h1 {
    font-size: 1.15rem;
  }

  .couple-bar {
    display: flex !important;
    padding: 4px 10px;
    gap: 6px;
    font-size: 0.78rem;
  }

  .partner-badge {
    font-size: 0.78rem;
    padding: 2px 4px;
  }

  .partner-status-text {
    display: none;
  }

  .room-pill {
    padding: 4px 8px;
    font-size: 0.75rem;
  }

  .copy-btn-text {
    display: none;
  }

  .copy-btn {
    padding: 4px 6px;
  }

  .btn-theme-toggle,
  .btn-cinema-toggle {
    width: 34px;
    height: 34px;
  }

  .main-container {
    flex-direction: column;
    height: calc(100vh - 60px);
    height: calc(100dvh - 60px);
    padding: 8px;
    gap: 8px;
    overflow: hidden;
  }

  .cinema-section {
    flex: 0 0 auto;
    height: auto;
    width: 100%;
    gap: 6px;
  }

  .video-container {
    width: 100%;
    height: 48vw;
    min-height: 200px;
    max-height: 36vh;
    border-radius: var(--radius-md);
  }

  .video-meta-bar {
    padding: 6px 12px;
    flex-wrap: wrap;
    gap: 6px;
  }

  .file-name {
    max-width: 140px;
  }

  .chat-sidebar {
    flex: 1;
    min-height: 0;
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: none;
  }

  .chat-header {
    padding: 8px 12px;
  }

  .chat-title h3 {
    font-size: 1.05rem;
  }

  .quick-reactions-bar {
    padding: 6px 8px;
  }

  .reaction-pill {
    padding: 5px 0;
    font-size: 1.15rem;
  }

  .chat-messages {
    padding: 10px;
    gap: 8px;
  }

  .bubble-text {
    font-size: 0.85rem;
    padding: 7px 11px;
  }

  .chat-input-area {
    padding: 8px 10px;
  }

  .video-live-chat-overlay {
    bottom: 50px;
    left: 10px;
    width: calc(100% - 20px);
  }

  .live-bubble {
    font-size: 0.78rem;
    padding: 4px 10px;
  }

  .overlay-center-row {
    gap: 20px;
  }

  .overlay-circle-btn {
    width: 44px;
    height: 44px;
  }

  .overlay-circle-btn.play-main {
    width: 56px;
    height: 56px;
  }

  .overlay-chat-bar {
    padding: 4px 10px;
  }

  .overlay-emoji-btn {
    font-size: 1.1rem;
  }
}

/* ==========================================================================
   LIGHT THEME COMPLETE COMPONENT OVERRIDES (High Contrast & Crystal Clear)
   ========================================================================== */
[data-theme="light"] body {
  background-color: var(--bg-core);
  color: var(--text-main);
}

[data-theme="light"] .top-nav {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--border-subtle);
}

[data-theme="light"] .brand-icon {
  background: linear-gradient(135deg, #f5efe6, #ffffff);
  border-color: var(--border-gold);
}

[data-theme="light"] .brand-text h1 {
  color: #141b24;
}

[data-theme="light"] .brand-heart {
  color: var(--accent-gold);
}

[data-theme="light"] .couple-bar {
  background: #ffffff;
  border-color: #d8cfbe;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .partner-badge {
  color: #141b24;
}

[data-theme="light"] .room-pill {
  background: #ffffff;
  border-color: #d8cfbe;
  color: #141b24;
}

[data-theme="light"] .video-container {
  background: #ffffff;
  border: 1.5px solid #d8cfbe;
  box-shadow: var(--shadow-cinema);
}

[data-theme="light"] .video-dropzone {
  background: radial-gradient(circle at center, #ffffff 0%, #f7f2e7 100%);
  border: 2px dashed #caa267;
}

[data-theme="light"] .dropzone-icon {
  color: #b37324;
}

[data-theme="light"] .dropzone-content h2 {
  color: #141b24 !important;
}

[data-theme="light"] .btn-select-file {
  background: linear-gradient(135deg, #b37324, #915a15);
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(179, 115, 36, 0.32);
}

[data-theme="light"] .sync-badge {
  background: rgba(255, 255, 255, 0.92);
  border-color: #d8cfbe;
  color: #3d495c;
}

[data-theme="light"] .video-meta-bar {
  background: #ffffff;
  border-color: #d8cfbe;
}

[data-theme="light"] .file-name {
  color: #141b24;
}

[data-theme="light"] .ctrl-btn,
[data-theme="light"] .btn-subtitle,
[data-theme="light"] .btn-theme-toggle,
[data-theme="light"] .btn-cinema-toggle {
  background: #eae4d6;
  border-color: #d8cfbe;
  color: #141b24;
}

[data-theme="light"] .ctrl-play-main {
  background: linear-gradient(135deg, #b37324, #915a15);
  color: #ffffff;
}

[data-theme="light"] .chat-sidebar {
  background: #ffffff;
  border-color: #d8cfbe;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .chat-header {
  background: #faf7f0;
  border-bottom-color: #e5ded0;
}

[data-theme="light"] .chat-title h3 {
  color: #141b24;
}

[data-theme="light"] .quick-reactions-bar {
  background: #faf7f0;
  border-bottom-color: #e5ded0;
}

[data-theme="light"] .reaction-pill {
  background: #eae4d6;
  border-color: #d8cfbe;
}

[data-theme="light"] .system-message.welcome {
  background: #f4efe4;
  border-color: #dcd3c3;
  color: #2c3847;
}

[data-theme="light"] .chat-bubble.partner .bubble-text {
  background: #ffffff;
  border: 1px solid #dcd3c3;
  color: #141b24;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .chat-bubble.me .bubble-text {
  background: linear-gradient(135deg, #e58e26, #c26910);
  border: none;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(229, 142, 38, 0.25);
}

[data-theme="light"] .bubble-sender {
  color: #141b24;
  font-weight: 700;
}

[data-theme="light"] .bubble-time {
  color: #647287;
  font-weight: 500;
}

[data-theme="light"] .system-message {
  background: #f0f7f3;
  border: 1px solid #c2e5d1;
  color: #1b5e37;
  font-weight: 600;
}

[data-theme="light"] .system-message.leave {
  background: #fdedec;
  border-color: #f5b7b1;
  color: #922b21;
  font-weight: 600;
}

[data-theme="light"] .system-message.join {
  background: #e8f8f0;
  border-color: #a3e4d7;
  color: #0e6251;
  font-weight: 600;
}

[data-theme="light"] .chat-input-area {
  background: #faf7f0;
  border-top-color: #e5ded0;
}

[data-theme="light"] .chat-form {
  background: #ffffff;
  border-color: #d8cfbe;
}

[data-theme="light"] #chatInput {
  color: #141b24;
}

[data-theme="light"] .btn-send-message {
  background: #b37324;
  color: #ffffff;
}

[data-theme="light"] .copy-btn {
  background: rgba(179, 115, 36, 0.12);
  color: #b37324;
  border-color: #caa267;
}

[data-theme="light"] .copy-btn:hover {
  background: #b37324;
  color: #ffffff;
}
