/* ═════════════════════════════════════════════════════════════════════
   SEANS CINEMATHEQUE DESIGN SYSTEM
   Deep Pitch Black (#050608), 35mm Amber (#E59819), Silver Halide (#E2DFD8)
   Zero AI-slop: High-end bespoke screening-room aesthetic.
   Precision typography, architectural layout, flawless scrub & controls.
   ═════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --bg-pitch: #040507;
  --bg-deep: #090B0F;
  --bg-panel: rgba(13, 16, 23, 0.82);
  --bg-glass: rgba(18, 22, 32, 0.65);
  --bg-control: rgba(10, 13, 19, 0.78);
  --bg-hover: rgba(255, 255, 255, 0.06);
  --bg-active: rgba(255, 255, 255, 0.12);

  --border-dim: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.14);
  --border-focus: #E59819;

  --amber: #E59819;
  --amber-glow: rgba(229, 152, 25, 0.35);
  --ruby: #E53935;
  --ruby-glow: rgba(229, 57, 53, 0.4);
  
  --silver-100: #F3F1EC;
  --silver-200: #D8D4CA;
  --silver-400: #8E8A82;
  --silver-600: #55524C;
  --silver-800: #262422;

  --font-display: 'Cinzel', serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --ease-cinematic: cubic-bezier(0.16, 1, 0.3, 1);
  --blur-panel: blur(24px) saturate(160%);
  --blur-control: blur(16px);
  --shadow-cinema: 0 24px 60px rgba(0, 0, 0, 0.7);

  --chat-width: 380px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-pitch);
  color: var(--silver-100);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* ═════════════════════════════════════════════════════════════════════
   COMMON / ATOMS
   ═════════════════════════════════════════════════════════════════════ */
.sprite { display: none; }

.ico {
  width: 20px;
  height: 20px;
  fill: currentColor;
  stroke: none;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.ico.sm { width: 14px; height: 14px; }
.ico.lg { width: 28px; height: 28px; }

button {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  outline: none;
}

input, select, textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--silver-400);
  font-weight: 500;
}
.kicker.amber { color: var(--amber); }
.kicker.ruby { color: var(--ruby); }
.kicker.on-dark { color: var(--silver-400); }

.sq {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--amber);
  border-radius: 1px;
  box-shadow: 0 0 8px var(--amber-glow);
}
.sq.blink {
  animation: pulse-sq 1.8s ease-in-out infinite;
}
@keyframes pulse-sq {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

/* ═════════════════════════════════════════════════════════════════════
   HOME SCREEN (Landing)
   ═════════════════════════════════════════════════════════════════════ */
.home {
  width: 100vw;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: 
    radial-gradient(circle at 50% 0%, rgba(229, 152, 25, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 10% 40%, rgba(22, 28, 42, 0.4) 0%, transparent 45%),
    var(--bg-pitch);
}

.home-head {
  max-width: 960px;
  width: 100%;
  text-align: center;
  margin-bottom: 56px;
  animation: fade-down 0.8s var(--ease-cinematic);
}

.home-head .hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 84px);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--silver-100);
  text-transform: uppercase;
  margin: 12px 0 16px;
  text-shadow: 0 8px 32px rgba(0,0,0,0.8), 0 0 40px var(--amber-glow);
}

.home-head .hero-copy p {
  font-size: 17px;
  color: var(--silver-200);
  max-width: 640px;
  margin: 0 auto 36px;
  font-weight: 400;
  line-height: 1.6;
}

.home-head .facts {
  display: flex;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--border-dim);
}
.home-head .facts > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}
.home-head .facts b {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--silver-100);
  letter-spacing: 0.02em;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 460px));
  gap: 32px;
  width: 100%;
  max-width: 960px;
  justify-content: center;
  animation: fade-up 0.9s var(--ease-cinematic);
}

.card {
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  border-radius: 12px;
  padding: 36px;
  backdrop-filter: var(--blur-panel);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-cinema);
  transition: transform 0.35s var(--ease-cinematic), border-color 0.35s ease, box-shadow 0.35s ease;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-light);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.85);
}
.card.host-card:hover::before {
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.card-head .name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--silver-100);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-body h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--silver-100);
  margin-bottom: 12px;
}
.card-body .say {
  font-size: 14px;
  color: var(--silver-400);
  line-height: 1.6;
  margin-bottom: 28px;
}

.card-body .steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
  border-left: 1px solid var(--border-dim);
  padding-left: 16px;
}
.card-body .steps > div {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.card-body .steps span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--amber);
  font-weight: 700;
  padding-top: 2px;
}
.card-body .steps p {
  font-size: 13px;
  color: var(--silver-200);
  line-height: 1.45;
}

.card-body .note {
  font-size: 12px;
  color: var(--silver-600);
  font-style: italic;
  margin-top: 16px;
}

.block {
  width: 100%;
  background: var(--silver-100);
  color: var(--bg-pitch);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  padding: 14px 24px;
  border-radius: 8px;
  transition: all 0.25s var(--ease-cinematic);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.block:hover:not(:disabled) {
  background: #FFF;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
}
.block:active:not(:disabled) { transform: translateY(0); }
.block:disabled { opacity: 0.5; cursor: not-allowed; }

.code-row {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}
.code-row input {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--silver-100);
  transition: border-color 0.2s ease;
}
.code-row input:focus {
  border-color: var(--amber);
}
.code-row button {
  background: var(--amber);
  color: #000;
  font-weight: 700;
  padding: 0 24px;
  border-radius: 8px;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
}
.code-row button:hover {
  background: #F5A623;
  box-shadow: 0 0 16px var(--amber-glow);
}

/* ═════════════════════════════════════════════════════════════════════
   MAIN APP / ROOM LAYOUT
   ═════════════════════════════════════════════ */
.app {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr var(--chat-width);
  grid-template-rows: 100%;
  background: var(--bg-pitch);
  position: relative;
  overflow: hidden;
}

/* ═════════════════════════════════════════════════════════════════════
   STAGE (Cinema Canvas)
   ═════════════════════════════════════════════════════════════════════ */
.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #000;
  overflow: hidden;
  height: 100%;
}

.stage .screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
.stage .screen video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* Stage top bar */
.stage-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 5, 7, 0.8) 0%, transparent 100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.stage-top > * { pointer-events: auto; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 6px;
  background: var(--bg-control);
  backdrop-filter: var(--blur-control);
  border: 1px solid var(--border-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--silver-200);
}
.tag-group {
  display: flex;
  gap: 10px;
}
.voicetag {
  background: rgba(229, 152, 25, 0.15);
  border-color: rgba(229, 152, 25, 0.35);
  color: var(--amber);
}

.stage-fill { flex: 1; }

/* ═════════════════════════════════════════════════════════════════════
   SUBTITLES (Floating Typography)
   ═════════════════════════════════════════════ */
.caption {
  position: absolute;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  z-index: 15;
  text-align: center;
  pointer-events: none;
  width: 90%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  transition: bottom 0.25s ease;
}
.caption span {
  font-family: var(--font-sans);
  font-size: var(--sub-size, 26px);
  font-weight: 600;
  color: var(--sub-color, #FFF);
  line-height: 1.35;
  padding: 4px 14px;
  border-radius: 4px;
  background-color: var(--sub-bg, rgba(0, 0, 0, 0.72));
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95);
  display: inline-block;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ═════════════════════════════════════════════════════════════════════
   OVERLAYS / VEILS
   ═════════════════════════════════════════════ */
.veil {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 5, 7, 0.65);
  backdrop-filter: blur(8px);
  animation: fade-in 0.25s ease;
}
.veil.dim { background: rgba(4, 5, 7, 0.85); }

.paused-card, .stall-card, .ask-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 32px 48px;
  text-align: center;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.9);
  backdrop-filter: var(--blur-panel);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.paused-card .bars {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}
.paused-card .bars i {
  display: block;
  width: 6px;
  height: 28px;
  background: var(--amber);
  border-radius: 2px;
  box-shadow: 0 0 12px var(--amber-glow);
}

.paused-card h3, .stall-card h3, .ask-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--silver-100);
}

.spin {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-dim);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.ask {
  position: absolute;
  inset: 0;
  z-index: 26;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 5, 7, 0.7);
}
.ask-card {
  max-width: 360px;
  width: 90%;
  padding: 28px;
}
.ask-bar {
  width: 100%;
  height: 4px;
  background: var(--border-dim);
  border-radius: 2px;
  overflow: hidden;
  margin: 12px 0;
}
.ask-bar i {
  display: block;
  height: 100%;
  background: var(--ruby);
  transition: width 0.1s linear;
}
.ask-row {
  display: flex;
  gap: 12px;
  width: 100%;
}
.ask-yes {
  flex: 1;
  background: var(--ruby);
  color: #FFF;
  font-weight: 700;
  padding: 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.ask-no {
  flex: 1;
  background: var(--bg-hover);
  border: 1px solid var(--border-dim);
  padding: 12px;
  border-radius: 6px;
  font-weight: 600;
}

/* ═════════════════════════════════════════════════════════════════════
   CINEMA CONTROLS & SCRUBBER
   ═════════════════════════════════════════════ */
.controls, .viewbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 16px 24px 20px;
  background: linear-gradient(0deg, rgba(4, 5, 7, 0.95) 0%, rgba(4, 5, 7, 0.75) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Scrub track */
.scrub {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}
.scrub .t {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--silver-200);
  min-width: 44px;
}
.scrub .t.dim { color: var(--silver-400); text-align: right; }

.scrub .track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 3px;
  position: relative;
  cursor: pointer;
  transition: height 0.15s ease;
}
.scrub .track:hover { height: 10px; }

.scrub .buf {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.28);
  border-radius: inherit;
  pointer-events: none;
}
.scrub .fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: var(--amber);
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 10px var(--amber-glow);
}
.scrub .knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 14px;
  height: 14px;
  background: #FFF;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  transition: transform 0.15s ease;
}
.scrub .track:hover .knob {
  transform: translate(-50%, -50%) scale(1);
}

/* Control buttons row */
.ctrl-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ctrl-left, .ctrl-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sqbtn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-hover);
  border: 1px solid var(--border-dim);
  color: var(--silver-200);
  transition: all 0.2s ease;
}
.sqbtn:hover {
  background: var(--bg-active);
  color: var(--silver-100);
  border-color: var(--border-light);
}
.sqbtn.bare { border-color: transparent; background: none; }
.sqbtn.bare:hover { background: var(--bg-hover); }

.playbtn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--silver-100);
  color: #000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease-cinematic);
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.playbtn:hover {
  background: #FFF;
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255,255,255,0.25);
}
.playbtn:active { transform: scale(0.98); }

/* Volume slider */
.vol {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px;
}
.volbar {
  width: 64px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
  transition: width 0.2s ease;
}
.volbar:hover { width: 80px; }
.volbar i {
  display: block;
  height: 100%;
  background: var(--silver-100);
  border-radius: inherit;
  width: 100%;
}

/* Quality/Audio/Sub chips */
.chip {
  height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--bg-hover);
  border: 1px solid var(--border-dim);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--silver-200);
  transition: all 0.2s ease;
}
.chip:hover {
  background: var(--bg-active);
  border-color: var(--border-light);
  color: var(--silver-100);
}

/* Viewer bar */
.viewbar {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}
.viewbar .left, .viewbar .right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.viewbar .state {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--silver-400);
  margin-right: 8px;
}

/* ═════════════════════════════════════════════════════════════════════
   CHAT PANEL (Sidebar)
   ═════════════════════════════════════════════ */
.chat {
  height: 100%;
  background: var(--bg-deep);
  border-left: 1px solid var(--border-dim);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.chat-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border-dim);
  background: rgba(13, 16, 23, 0.4);
}
.chat-head .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.chat-head .me {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--silver-400);
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chips .chip-person {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-dim);
  font-size: 12px;
  color: var(--silver-200);
}
.chips .chip-person.host { border-color: rgba(229, 152, 25, 0.4); }

/* Voice box */
.voice {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(229, 152, 25, 0.06);
  border: 1px solid rgba(229, 152, 25, 0.2);
  border-radius: 8px;
}
.voice-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.voice-act {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--amber);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(229, 152, 25, 0.3);
  transition: all 0.2s ease;
}
.voice-act:hover {
  background: var(--amber);
  color: #000;
}
.voice-people {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Messages area */
.msgs {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.msgs::-webkit-scrollbar { width: 4px; }
.msgs::-webkit-scrollbar-thumb { background: var(--border-dim); border-radius: 2px; }

.msg {
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: fade-up 0.25s ease;
}
.msg .meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--silver-400);
}
.msg .author {
  font-weight: 600;
  color: var(--silver-200);
}
.msg.me .author { color: var(--amber); }
.msg .body {
  font-size: 13px;
  color: var(--silver-100);
  line-height: 1.45;
  word-break: break-word;
}
.msg.system {
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 2px solid var(--silver-600);
}
.msg.system .body {
  font-size: 12px;
  color: var(--silver-400);
  font-family: var(--font-mono);
}

.typing {
  min-height: 20px;
  padding: 0 20px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--silver-600);
  font-style: italic;
}

.emotes {
  display: flex;
  gap: 8px;
  padding: 6px 20px;
  overflow-x: auto;
  border-top: 1px solid var(--border-dim);
}
.emotes button {
  font-size: 18px;
  padding: 4px;
  transition: transform 0.15s ease;
}
.emotes button:hover { transform: scale(1.25); }

/* Composer */
.composer {
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border-dim);
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(9, 11, 15, 0.85);
}
.composer input {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--silver-100);
  font-size: 13px;
  transition: border-color 0.2s ease;
}
.composer input:focus {
  border-color: var(--amber);
}
.composer .now {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--silver-600);
}
.composer .send {
  background: var(--silver-100);
  color: #000;
  font-weight: 700;
  font-size: 12px;
  padding: 10px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.composer .send:hover {
  background: #FFF;
  box-shadow: 0 0 12px rgba(255,255,255,0.2);
}

.sheet-head, .mobrow { display: none; }

/* ═════════════════════════════════════════════════════════════════════
   MODAL DIALOGS / SHEETS (Gate, Lobby, Settings, Picker)
   ═════════════════════════════════════════════ */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 5, 7, 0.82);
  backdrop-filter: blur(16px);
  padding: 24px;
  animation: fade-in 0.25s ease;
}

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.95);
  backdrop-filter: var(--blur-panel);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.panel-head {
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--border-dim);
}
.panel-head h2 {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--silver-100);
  font-weight: 700;
  margin-top: 4px;
}
.panel-head .filmline {
  font-size: 13px;
  color: var(--silver-400);
  margin-top: 2px;
}

.panel-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-foot {
  padding: 16px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.panel-foot .side {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--silver-600);
}

.linkrow {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  overflow: hidden;
}
.linkrow .u {
  flex: 1;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--silver-200);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.linkrow button {
  background: var(--bg-hover);
  border-left: 1px solid var(--border-dim);
  padding: 0 16px;
  font-weight: 600;
  font-size: 12px;
  color: var(--silver-100);
  transition: background 0.2s ease;
}
.linkrow button:hover { background: var(--bg-active); }

/* Gate specific */
.gate-art {
  width: 100%;
  height: 180px;
  background-size: cover;
  background-position: center;
  background-color: #000;
  border-bottom: 1px solid var(--border-dim);
}
.gate-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gate-field input.text {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--silver-100);
  font-size: 15px;
}
.gate-field input.text:focus { border-color: var(--amber); }

/* Settings rows */
#setRows {
  padding: 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-bottom: 1px solid var(--border-dim);
}
.set-segment {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.set-segment .kicker { margin-bottom: 2px; }
.set-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.set-btn {
  padding: 6px 14px;
  border-radius: 6px;
  background: var(--bg-hover);
  border: 1px solid var(--border-dim);
  font-size: 12px;
  color: var(--silver-200);
  transition: all 0.2s ease;
}
.set-btn:hover { background: var(--bg-active); color: var(--silver-100); }
.set-btn.on {
  background: var(--amber);
  color: #000;
  font-weight: 700;
  border-color: var(--amber);
}

/* Emote picker */
.emote-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  padding: 24px 28px;
  max-height: 280px;
  overflow-y: auto;
}
.emote-grid button {
  font-size: 24px;
  padding: 8px;
  border-radius: 6px;
  transition: transform 0.15s ease, background 0.15s ease;
}
.emote-grid button:hover {
  transform: scale(1.2);
  background: var(--bg-hover);
}

/* Toast */
.toast {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 13px;
  color: var(--silver-100);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.8);
  backdrop-filter: var(--blur-control);
  animation: fade-down 0.25s ease;
}

/* Goodbye screen */
.bye {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg-pitch);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 24px;
}
.bye h1 {
  font-family: var(--font-display);
  font-size: 36px;
  color: var(--silver-100);
}
.bye a {
  color: var(--amber);
  text-decoration: none;
  font-weight: 600;
  margin-top: 12px;
}
.bye a:hover { text-decoration: underline; }

/* ═════════════════════════════════════════════════════════════════════
   FULLSCREEN & IDLE BEHAVIOR
   ═════════════════════════════════════════════ */
.app[data-fs="1"] {
  grid-template-columns: 100%;
}
.app[data-fs="1"] .chat { display: none; }

.app[data-idle="1"] .stage { cursor: none; }
.app[data-idle="1"] .controls,
.app[data-idle="1"] .viewbar,
.app[data-idle="1"] .stage-top {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}
.app[data-idle="1"] .stage-top {
  transform: translateY(-8px);
}
.app[data-idle="1"] .caption {
  bottom: 32px;
}

/* ═════════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVENESS (< 900px)
   ═════════════════════════════════════════════ */
@media (max-width: 900px) {
  .app {
    grid-template-columns: 100%;
    grid-template-rows: 1fr auto;
  }
  .chat {
    max-height: 48px;
    transition: max-height 0.35s var(--ease-cinematic);
  }
  .app[data-chat="open"] .chat {
    max-height: 55vh;
  }
  .sheet-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: var(--bg-deep);
    border-top: 1px solid var(--border-dim);
    cursor: pointer;
  }
  .mobrow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    border-top: 1px solid var(--border-dim);
  }
  .chat-head { display: none; }
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-down { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
