/* ============================================================
   WatchParty — Thème cinéma
   ============================================================ */

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

:root {
  --bg:          #09090f;
  --bg2:         #111118;
  --bg3:         #1a1a24;
  --glass:       rgba(255,255,255,0.04);
  --glass-border:rgba(255,255,255,0.08);
  --accent:      #7c5cfc;
  --accent2:     #5865f2;
  --green:       #23d18b;
  --amber:       #f0b429;
  --red:         #ff4d4d;
  --text:        #f0f0ff;
  --muted:       #7070a0;
  --radius:      14px;
  --radius-sm:   8px;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ─────────────────────────────────
   CHARGEMENT
───────────────────────────────── */
#loading-screen {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 24px; z-index: 9999;
}

.load-logo {
  display: flex; flex-direction: column;
  align-items: center; gap: 10px;
}

.load-film {
  font-size: 48px;
  animation: pulse-scale 2s ease-in-out infinite;
}

@keyframes pulse-scale {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.1); }
}

.load-title {
  font-size: 26px; font-weight: 800;
  background: linear-gradient(135deg, #7c5cfc, #5865f2, #00d2ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.load-bar {
  width: 200px; height: 3px;
  background: var(--glass-border);
  border-radius: 10px; overflow: hidden;
}

.load-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c5cfc, #00d2ff);
  border-radius: 10px;
  animation: load-anim 2s ease-in-out forwards;
}

@keyframes load-anim {
  from { width: 0; }
  to   { width: 100%; }
}

.load-status { font-size: 13px; color: var(--muted); }

/* ─────────────────────────────────
   FOND ANIMÉ
───────────────────────────────── */
.app-bg {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  overflow: hidden;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: orb-drift 20s ease-in-out infinite;
}

.orb-1 {
  width: 500px; height: 500px;
  background: #7c5cfc;
  top: -150px; left: -100px;
  animation-duration: 25s;
}

.orb-2 {
  width: 400px; height: 400px;
  background: #5865f2;
  bottom: -100px; right: -80px;
  animation-duration: 20s;
  animation-delay: -8s;
}

.orb-3 {
  width: 300px; height: 300px;
  background: #00d2ff;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 30s;
  animation-delay: -15s;
  opacity: 0.08;
}

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

/* ─────────────────────────────────
   LAYOUT GLOBAL
───────────────────────────────── */
#app {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  height: 100vh; overflow: hidden;
}

#app.hidden { display: none; }
.hidden { display: none !important; }

/* ─────────────────────────────────
   HEADER
───────────────────────────────── */
#app-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: rgba(9, 9, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0; z-index: 10;
}

.hd-left {
  display: flex; align-items: center; gap: 10px;
}

.hd-back {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); color: var(--muted);
  padding: 5px 8px; cursor: pointer;
  display: flex; align-items: center;
  transition: all 0.2s;
}
.hd-back:hover { color: var(--text); border-color: var(--accent); }

.hd-logo {
  font-size: 16px; font-weight: 800;
  letter-spacing: -0.3px;
  display: flex; align-items: center; gap: 6px;
}

.hd-logo span {
  background: linear-gradient(135deg, #c084fc, #7c5cfc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hd-tag {
  background: linear-gradient(135deg, #7c5cfc22, #5865f222);
  border: 1px solid #7c5cfc55;
  color: #c084fc;
  font-size: 11px; font-weight: 700;
  padding: 2px 9px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.5px;
}

.hd-right {
  display: flex; align-items: center; gap: 8px;
}

.hd-room {
  display: flex; align-items: center; gap: 7px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 5px 12px;
}

.hd-room-label {
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}

.hd-room-code {
  font-size: 14px; font-weight: 800;
  font-family: 'Courier New', monospace;
  color: #c084fc;
  letter-spacing: 2px;
}

.hd-copy-btn {
  background: none; border: none; cursor: pointer;
  color: var(--muted); padding: 0;
  display: flex; align-items: center;
  transition: color 0.2s;
}
.hd-copy-btn:hover { color: var(--accent); }

.hd-members {
  display: flex; align-items: center; gap: 6px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 13px; font-weight: 600;
}

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

.premium-btn {
  background: linear-gradient(135deg, #f0b429, #f97316);
  border: none;
  border-radius: 20px;
  padding: 5px 12px;
  color: white;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(240, 180, 41, 0.3);
}

.premium-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(240, 180, 41, 0.5);
  filter: brightness(1.1);
}

@keyframes pulse-dot {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* ─────────────────────────────────
   PREMIUM GLASS UI
───────────────────────────────── */
:root {
  --bg:          #050508;
  --bg2:         #0a0a12;
  --bg3:         #12121e;
  --glass:       rgba(255, 255, 255, 0.03);
  --glass-border:rgba(255, 255, 255, 0.07);
  --accent:      #8b5cf6; /* Violet plus vif */
  --accent-glow: rgba(139, 92, 246, 0.5);
  --accent2:     #3b82f6; /* Bleu plus pro */
  --text:        #f8fafc;
  --muted:       #94a3b8;
  --radius-lg:   20px;
  --radius-md:   12px;
}

body {
  background: radial-gradient(circle at top right, #1e1b4b, #050508 60%);
}

.pcard {
  background: linear-gradient(165deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 24px -1px rgba(0,0,0,0.2);
}

.pcard:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-8px) scale(1.02);
}

.pcard-badge.free {
  background: rgba(35, 209, 139, 0.1);
  color: #23d18b;
  border: 1px solid rgba(35, 209, 139, 0.2);
}

.pcard-badge.ext {
  background: rgba(139, 92, 246, 0.1);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

/* Chat Premium UI */
.chat-msgs {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

.chat-msg {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-left: 2px solid transparent;
  transition: all 0.2s;
}

.chat-msg:hover {
  background: rgba(255, 255, 255, 0.04);
  border-left-color: var(--accent);
}

.chat-msg-user {
  font-weight: 800;
  color: var(--accent);
  font-size: 11px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.chat-msg-text {
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}

/* Ambient Light effect for Cinema mode */
#cinema-screen {
  position: relative;
  overflow: hidden;
}

#cinema-screen::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 120%; height: 120%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.1;
  pointer-events: none;
  z-index: -1;
}
.screen {
  flex: 1; overflow-y: auto; min-height: 0;
}

.screen.active { display: flex; flex-direction: column; }
.screen.hidden  { display: none; }

/* ─────────────────────────────────
   ÉCRAN HOME
───────────────────────────────── */
#screen-home {
  padding: 24px 20px;
  overflow-y: auto;
}

.home-wrapper {
  max-width: 780px; margin: 0 auto;
  width: 100%;
}

.home-hero {
  text-align: center; margin-bottom: 32px;
  padding-top: 8px;
}

.home-title {
  font-size: 28px; font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.home-sub {
  color: var(--muted); font-size: 14px;
}

.platform-section { margin-bottom: 28px; }

.section-divider {
  display: flex; align-items: center;
  gap: 12px; margin-bottom: 14px;
}

.divider-line {
  flex: 1; height: 1px;
  background: var(--glass-border);
}

.divider-label {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--muted);
  white-space: nowrap;
}

/* GRILLE DE PLATEFORMES */
.platform-grid {
  display: grid; gap: 10px;
}

.open-grid { grid-template-columns: repeat(3, 1fr); }
.drm-grid  { grid-template-columns: repeat(4, 1fr); }

/* CARD DE PLATEFORME */
.pcard {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.pcard::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.03), transparent);
  pointer-events: none;
}

.pcard:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.pcard.drm:hover { border-color: rgba(240, 180, 41, 0.3); }

.pcard-glow {
  position: absolute; inset: 0;
  background: radial-gradient(circle at center, var(--glow), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  mix-blend-mode: soft-light;
}

.pcard:hover .pcard-glow { opacity: 0.15; }

/* Icônes des plateformes */
.pcard-icon {
  width: 50px; height: 50px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 900;
  flex-shrink: 0;
  transition: transform 0.25s;
}

.pcard:hover .pcard-icon { transform: scale(1.1); }

.nf-icon { background: linear-gradient(135deg, #e50914, #a30007); color: white; font-size: 26px; }
.dp-icon { background: linear-gradient(135deg, #0063e5, #003f91); color: white; font-size: 16px; }
.cp-icon { background: linear-gradient(135deg, #333, #111); color: white; font-size: 16px; border: 1px solid #555; }
.bs-icon { background: linear-gradient(135deg, #c8102e, #8a0b20); color: white; font-size: 11px; }
.at-icon { background: linear-gradient(135deg, #3a3a3a, #1a1a1a); color: white; border: 1px solid #555; }
.pv-icon { background: linear-gradient(135deg, #00a8e0, #006a8e); color: white; }
.tt-icon { background: linear-gradient(135deg, #010101, #1a1a1a); color: white; font-size: 12px; border: 1px solid #333; }
.ot-icon { background: var(--glass); border: 2px dashed var(--glass-border); color: var(--muted); font-size: 22px; }

.pcard-info {
  display: flex; flex-direction: column;
  align-items: center; gap: 4px;
}

.pcard-name {
  font-size: 13px; font-weight: 700;
}

.pcard-badge {
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.4px;
}

.pcard-badge.free {
  background: rgba(35, 209, 139, 0.15);
  color: var(--green);
  border: 1px solid rgba(35, 209, 139, 0.3);
}

.pcard-badge.ext {
  background: rgba(240, 180, 41, 0.15);
  color: var(--amber);
  border: 1px solid rgba(240, 180, 41, 0.3);
}

/* ─────────────────────────────────
   ÉCRAN PLAYER
───────────────────────────────── */
#screen-player { display: flex; flex-direction: column; }

.player-layout {
  flex: 1; display: flex; min-height: 0;
}

.player-aside {
  width: 220px; flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--glass-border);
  display: flex; flex-direction: column;
  overflow: hidden;
}

.player-main {
  flex: 1; display: flex; flex-direction: column;
  min-width: 0;
}

.aside-members {
  padding: 12px;
  border-bottom: 1px solid var(--glass-border);
}

.aside-title {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--muted); margin-bottom: 8px;
}

.members-mini-list {
  display: flex; flex-direction: column; gap: 5px;
}

.member-mini {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 7px;
  background: var(--glass);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.member-mini-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; color: white;
  flex-shrink: 0;
}

.member-mini-name { flex: 1; font-weight: 600; font-size: 12px; }

.member-mini-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); flex-shrink: 0;
}

.aside-chat {
  flex: 1; display: flex; flex-direction: column;
  padding: 12px; min-height: 0;
}

/* URL BAR */
.player-urlbar {
  display: flex; gap: 8px;
  padding: 10px 12px;
  background: var(--bg2);
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.url-input {
  flex: 1;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text); font-family: inherit;
  font-size: 13px; padding: 7px 12px;
  transition: border-color 0.2s;
}
.url-input:focus { outline: none; border-color: var(--accent); }

.url-load-btn {
  background: var(--accent);
  border: none; border-radius: var(--radius-sm);
  color: white; font-family: inherit;
  font-size: 13px; font-weight: 700;
  padding: 7px 18px; cursor: pointer;
  transition: filter 0.2s;
}
.url-load-btn:hover { filter: brightness(1.15); }

/* EMBED */
#embed-area {
  flex: 1; background: #000;
  position: relative; min-height: 0;
}

.embed-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; color: var(--muted); text-align: center;
}

.ph-icon { font-size: 48px; }

.embed-placeholder p {
  font-size: 15px; font-weight: 600; color: var(--text);
}

.ph-examples {
  font-size: 12px; color: var(--muted);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
}

#video-iframe {
  width: 100%; height: 100%;
  border: none; display: block;
}

/* CONTROLS BAR */
.player-controls-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: var(--bg2);
  border-top: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.ctrl-btn {
  border: none; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 13px; font-weight: 700;
  padding: 7px 14px; cursor: pointer;
  transition: all 0.2s;
}

.ctrl-btn.green { background: rgba(35, 209, 139, 0.2); color: var(--green); border: 1px solid rgba(35, 209, 139, 0.3); }
.ctrl-btn.amber { background: rgba(240, 180, 41, 0.2); color: var(--amber); border: 1px solid rgba(240, 180, 41, 0.3); }
.ctrl-btn.purple { background: rgba(124, 92, 252, 0.2); color: #c084fc; border: 1px solid rgba(124, 92, 252, 0.3); }

.ctrl-btn:hover { filter: brightness(1.2); transform: translateY(-1px); }

.ctrl-seek {
  display: flex; align-items: center; gap: 6px;
  margin-left: auto;
  font-size: 12px; color: var(--muted);
}

.seek-input {
  width: 70px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text); font-family: inherit;
  font-size: 13px; padding: 5px 8px;
}
.seek-input:focus { outline: none; border-color: var(--accent); }

.sync-indicator {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--green); font-weight: 600;
}

.sync-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}

/* ─────────────────────────────────
   ÉCRAN CINÉMA (DRM)
───────────────────────────────── */
#screen-cinema { display: flex; flex-direction: column; }

.cinema-layout {
  flex: 1; display: flex; min-height: 0;
}

.cinema-main {
  flex: 1; display: flex; flex-direction: column;
  padding: 20px; gap: 16px; overflow-y: auto;
}

/* Écran de cinéma virtuel */
.cinema-screen-wrapper {
  position: relative;
  display: flex; align-items: center;
  flex-shrink: 0;
}

.cinema-curtain-left, .cinema-curtain-right {
  width: 28px; flex-shrink: 0; height: 120px;
  border-radius: 4px;
}

.cinema-curtain-left {
  background: linear-gradient(90deg, #3a0060, #2a0040);
  border-radius: 4px 0 0 4px;
  box-shadow: inset -4px 0 8px rgba(0,0,0,0.5);
}

.cinema-curtain-right {
  background: linear-gradient(270deg, #3a0060, #2a0040);
  border-radius: 0 4px 4px 0;
  box-shadow: inset 4px 0 8px rgba(0,0,0,0.5);
}

.cinema-screen-frame {
  flex: 1; height: 120px;
  background: linear-gradient(180deg, #0d0d1a, #050510);
  border: 1px solid rgba(124, 92, 252, 0.2);
  border-radius: 0;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  box-shadow:
    0 0 40px rgba(124, 92, 252, 0.1),
    inset 0 0 60px rgba(0,0,0,0.8);
}

.cinema-screen-frame::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255,255,255,0.01) 2px,
    rgba(255,255,255,0.01) 4px
  );
  pointer-events: none;
}

.cinema-screen-content {
  text-align: center; z-index: 1;
}

.cinema-platform-logo {
  font-size: 32px; font-weight: 900;
  margin-bottom: 6px;
}

.cinema-title {
  font-size: 14px; font-weight: 700; color: var(--text);
}

.cinema-subtitle {
  font-size: 12px; color: var(--muted); margin-top: 4px;
}

/* Sièges de cinéma */
.cinema-seating {
  flex-shrink: 0;
}

.seating-row-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--muted); margin-bottom: 10px;
}

.cinema-seats-row {
  display: flex; gap: 12px; flex-wrap: wrap;
}

.cinema-seat {
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  min-width: 64px;
}

.seat-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900; color: white;
  border: 3px solid transparent;
  transition: all 0.3s;
  position: relative;
}

.seat-avatar.playing { border-color: var(--green); box-shadow: 0 0 12px rgba(35,209,139,0.4); }
.seat-avatar.paused  { border-color: var(--amber); box-shadow: 0 0 12px rgba(240,180,41,0.4); }
.seat-avatar.waiting { border-color: var(--muted); }
.seat-avatar.buffering { border-color: #00d2ff; box-shadow: 0 0 12px rgba(0,210,255,0.4); animation: pulse-scale 1.5s ease-in-out infinite; }

.seat-status-icon {
  position: absolute;
  bottom: -2px; right: -2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; border: 2px solid var(--bg);
}

.seat-name {
  font-size: 11px; font-weight: 600;
  color: var(--muted); text-align: center;
  max-width: 64px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.seat-time {
  font-size: 10px; color: var(--muted);
  font-family: monospace;
}

/* Barre contrôles cinéma */
.cinema-controls-bar {
  flex-shrink: 0;
  display: flex; align-items: center;
  gap: 10px; flex-wrap: wrap;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}

.cinema-open-btn {
  display: flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg, #7c5cfc, #5865f2);
  border: none; border-radius: var(--radius-sm);
  color: white; font-family: inherit;
  font-size: 13px; font-weight: 700;
  padding: 9px 16px; cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(124,92,252,0.3);
}
.cinema-open-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124,92,252,0.5);
}

.cinema-sync-btns {
  display: flex; gap: 7px;
}

.cinema-ctrl {
  display: flex; align-items: center; gap: 6px;
  border: none; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 13px; font-weight: 700;
  padding: 8px 14px; cursor: pointer;
  transition: all 0.2s;
}

.cinema-ctrl.green {
  background: rgba(35, 209, 139, 0.15);
  color: var(--green);
  border: 1px solid rgba(35, 209, 139, 0.3);
}
.cinema-ctrl.amber {
  background: rgba(240, 180, 41, 0.15);
  color: var(--amber);
  border: 1px solid rgba(240, 180, 41, 0.3);
}
.cinema-ctrl.purple {
  background: rgba(124, 92, 252, 0.15);
  color: #c084fc;
  border: 1px solid rgba(124, 92, 252, 0.3);
}

.cinema-ctrl:hover { filter: brightness(1.2); transform: translateY(-1px); }

.cinema-seek-area {
  display: flex; align-items: center; gap: 6px;
  margin-left: auto;
}

.cinema-seek-input {
  width: 58px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text); font-family: inherit;
  font-size: 13px; padding: 6px 8px; text-align: center;
}
.cinema-seek-input:focus { outline: none; border-color: var(--accent); }

.seek-sep { color: var(--muted); font-size: 16px; font-weight: 700; }

.cinema-time-display {
  display: flex; flex-direction: column;
  align-items: flex-end;
}

.time-label {
  font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--muted);
}

.time-value {
  font-size: 14px; font-weight: 800;
  font-family: 'Courier New', monospace;
  color: #c084fc;
}

/* ASIDE CINÉMA */
.cinema-aside {
  width: 260px; flex-shrink: 0;
  background: var(--bg2);
  border-left: 1px solid var(--glass-border);
  display: flex; flex-direction: column;
  overflow: hidden;
}

/* Instructions */
.instructions-card {
  padding: 14px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.inst-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
}

.inst-icon { font-size: 18px; }

.inst-header h3 {
  font-size: 13px; font-weight: 800;
}

.inst-steps {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 12px;
}

.inst-step {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px; color: var(--muted); line-height: 1.4;
}

.inst-step strong { color: var(--text); }

.step-num {
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(124, 92, 252, 0.2);
  border: 1px solid rgba(124, 92, 252, 0.4);
  color: #c084fc; font-size: 10px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.inst-code-display {
  background: rgba(124, 92, 252, 0.1);
  border: 1px solid rgba(124, 92, 252, 0.3);
  border-radius: var(--radius-sm);
  padding: 8px; text-align: center;
  margin-bottom: 10px;
}

.inst-code {
  font-size: 20px; font-weight: 900;
  font-family: 'Courier New', monospace;
  color: #c084fc; letter-spacing: 4px;
}

.inst-dismiss {
  width: 100%;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--muted); font-family: inherit;
  font-size: 11px; padding: 6px; cursor: pointer;
  transition: all 0.2s;
}
.inst-dismiss:hover { border-color: var(--accent); color: var(--text); }

/* CHAT */
.aside-chat {
  flex: 1; display: flex; flex-direction: column;
  padding: 12px; min-height: 0; overflow: hidden;
}

.cinema-chat { flex: 1; }

.chat-msgs {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
  min-height: 0; margin-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--glass-border) transparent;
}

.chat-msg {
  font-size: 12px; line-height: 1.4; color: var(--muted);
  padding: 2px 0;
}

.chat-author { color: #c084fc; font-weight: 700; margin-right: 5px; }
.chat-text   { color: var(--text); }
.chat-system { font-style: italic; font-size: 11px; color: var(--muted); }

.chat-input-row {
  display: flex; gap: 6px; flex-shrink: 0;
}

.chat-input {
  flex: 1;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text); font-family: inherit;
  font-size: 12px; padding: 6px 10px;
}
.chat-input:focus { outline: none; border-color: var(--accent); }

.chat-send {
  background: var(--accent); border: none;
  border-radius: var(--radius-sm);
  color: white; font-size: 14px;
  width: 30px; cursor: pointer;
  transition: filter 0.2s;
}
.chat-send:hover { filter: brightness(1.2); }

/* ─────────────────────────────────
   RESPONSIVE
───────────────────────────────── */
@media (max-width: 580px) {
  .open-grid { grid-template-columns: repeat(3, 1fr); }
  .drm-grid  { grid-template-columns: repeat(3, 1fr); }
  .player-aside, .cinema-aside { display: none; }
  .cinema-controls-bar { flex-direction: column; align-items: stretch; }
  .cinema-seek-area { margin-left: 0; }
}
