/* ==========================================================================
   PurrCine v1.2 — Watch Together theme layer
   Cute · organised · professional · interactive
   ========================================================================== */

:root {
  --mint: #7ce7c0;
  --mint-deep: #2fbf92;
  --lilac: #a5c0ff;
  --lilac-deep: #6f97f5;
  --butter: #a5c0ff;
  --peach: #ffb4a2;
  --ink: #0b0b10;
  --card: rgba(20, 20, 28, .78);
  --card-solid: #14141c;
  --card-line: rgba(255, 255, 255, .09);
  --soft-line: rgba(255, 255, 255, .06);
  --cute-shadow: 0 26px 60px rgba(0, 0, 0, .42);
  --pop: cubic-bezier(.22, 1.2, .36, 1);
}

[hidden] { display: none !important; }

/* ------------------------------------------------------------------ shared */
.glass-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015));
  border: 1px solid var(--card-line);
  border-radius: 22px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .26);
  backdrop-filter: blur(14px);
}

.badge-dot {
  width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none;
  background: var(--muted-2);
}
.badge-dot.mint { background: var(--mint); box-shadow: 0 0 10px rgba(124, 231, 192, .8); }
.badge-dot.lilac { background: var(--lilac); box-shadow: 0 0 10px rgba(165, 192, 255, .8); }
.badge-dot.butter { background: var(--butter); box-shadow: 0 0 10px rgba(245, 217, 152, .8); }

/* ============================================================== ROOMS HUB */
.rooms-page { padding: 34px 0 70px; }

.rooms-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 34px;
  align-items: center;
  padding: 38px clamp(22px, 3vw, 46px);
  border-radius: 30px;
  border: 1px solid var(--card-line);
  background:
    radial-gradient(620px 320px at 88% 8%, rgba(165, 192, 255, .22), transparent 70%),
    radial-gradient(520px 320px at 6% 96%, rgba(124, 231, 192, .14), transparent 70%),
    linear-gradient(150deg, rgba(30, 27, 46, .92), rgba(14, 14, 21, .92));
  box-shadow: var(--cute-shadow);
  overflow: hidden;
}
.rooms-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px);
  background-size: 26px 26px; opacity: .25; mask-image: linear-gradient(120deg, #000, transparent 65%);
}
.rooms-hero-copy { position: relative; z-index: 2; display: grid; gap: 14px; justify-items: start; }
.rooms-hero-copy h1 {
  font-size: clamp(34px, 4.6vw, 58px);
  letter-spacing: -.045em;
  line-height: .98;
}
.rooms-hero-copy h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--butter), var(--peach) 55%, var(--lilac));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.rooms-hero-copy > p { color: var(--muted); font-size: 14.5px; max-width: 52ch; }
.rooms-hero-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--card-line); background: rgba(255, 255, 255, .05);
  font-size: 11px; font-weight: 800; color: var(--text);
}
.hero-badge span { font-size: 13px; }
.hero-paw-row { display: flex; gap: 7px; margin-top: 2px; }
.hero-paw-row i {
  width: 9px; height: 9px; border-radius: 50% 50% 45% 45%;
  background: linear-gradient(135deg, var(--butter), var(--peach)); opacity: .8;
  animation: pawBounce 2.4s ease-in-out infinite;
}
.hero-paw-row i:nth-child(2) { animation-delay: .2s; }
.hero-paw-row i:nth-child(3) { animation-delay: .4s; }
.hero-paw-row i:nth-child(4) { animation-delay: .6s; }
@keyframes pawBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* Cute CSS illustration: cinema screen + cat + popcorn */
.rooms-hero-art { position: relative; z-index: 2; min-height: 320px; display: grid; place-items: center; }
.art-blob {
  position: absolute; width: 78%; aspect-ratio: 1; border-radius: 46% 54% 58% 42% / 48% 42% 58% 52%;
  background: radial-gradient(circle at 30% 25%, rgba(165, 192, 255, .45), rgba(111, 151, 245, .12) 55%, transparent 72%);
  filter: blur(2px); animation: blobFloat 9s ease-in-out infinite;
}
@keyframes blobFloat { 0%, 100% { transform: translateY(0) rotate(0deg) scale(1); } 50% { transform: translateY(-12px) rotate(6deg) scale(1.04); } }
.art-screen {
  position: relative; width: min(340px, 92%); aspect-ratio: 16 / 10;
  border-radius: 20px; border: 1px solid rgba(255, 255, 255, .18);
  background: linear-gradient(160deg, #26213a, #121019 70%);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .5), inset 0 0 60px rgba(111, 151, 245, .18);
  display: grid; place-items: center; overflow: hidden;
}
.art-screen::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 4px);
  opacity: .5;
}
.art-screen-bar { position: absolute; top: 10px; left: 12px; display: flex; gap: 5px; }
.art-screen-bar i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .22); }
.art-screen-bar i:nth-child(1) { background: #ff8f9c; }
.art-screen-bar i:nth-child(2) { background: var(--butter); }
.art-screen-bar i:nth-child(3) { background: var(--mint); }

.art-cat { position: relative; width: 132px; height: 112px; margin-top: 12px; }
.cat-ear {
  position: absolute; top: -14px; width: 0; height: 0;
  border-left: 20px solid transparent; border-right: 20px solid transparent;
  border-bottom: 30px solid #f7e6d2; filter: drop-shadow(0 -2px 0 rgba(0, 0, 0, .06));
}
.cat-ear.left { left: 12px; transform: rotate(-14deg); }
.cat-ear.right { right: 12px; transform: rotate(14deg); }
.cat-ear::after {
  content: ""; position: absolute; left: -11px; top: 12px;
  border-left: 11px solid transparent; border-right: 11px solid transparent;
  border-bottom: 17px solid #ffb4a2;
}
.cat-face {
  position: absolute; inset: 0; border-radius: 46% 46% 44% 44%;
  background: linear-gradient(160deg, #fff6ea, #f7e6d2);
  box-shadow: inset 0 -10px 20px rgba(214, 170, 132, .25), 0 12px 26px rgba(0, 0, 0, .28);
}
.cat-eye {
  position: absolute; top: 44px; width: 13px; height: 16px; border-radius: 50%;
  background: #2b2233; box-shadow: inset 0 -4px 0 rgba(255, 255, 255, .18);
  animation: catBlink 4.6s infinite;
}
.cat-eye.left { left: 34px; }
.cat-eye.right { right: 34px; }
@keyframes catBlink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.12); } }
.cat-mouth {
  position: absolute; left: 50%; top: 70px; width: 22px; height: 12px;
  transform: translateX(-50%);
  border-bottom: 3px solid #c98f7f; border-radius: 0 0 50% 50%;
}
.cat-mouth::before, .cat-mouth::after {
  content: ""; position: absolute; top: 1px; width: 9px; height: 3px;
  border-radius: 99px; background: #ffb4a2;
}
.cat-mouth::before { left: -9px; transform: rotate(-12deg); }
.cat-mouth::after { right: -9px; transform: rotate(12deg); }

.art-popcorn {
  position: absolute; right: 8%; bottom: 6%;
  width: 64px; height: 62px; transform: rotate(-8deg);
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .35));
}
.art-popcorn::before {
  content: ""; position: absolute; left: 8px; bottom: 0;
  width: 48px; height: 40px; border-radius: 4px 4px 10px 10px;
  background: repeating-linear-gradient(90deg, #ff8f9c 0 9px, #fff 9px 18px);
}
.art-popcorn::after {
  content: "🍿"; position: absolute; left: 50%; top: -18px; transform: translateX(-50%);
  font-size: 30px;
}
.art-heart {
  position: absolute; left: 6%; top: 8%; font-size: 26px;
  animation: heartFloat 4.4s ease-in-out infinite;
  filter: drop-shadow(0 6px 12px rgba(255, 107, 122, .35));
}
.art-heart.two { left: auto; right: 12%; top: 16%; font-size: 18px; animation-delay: .8s; }
.art-heart.three { left: 16%; top: auto; bottom: 10%; font-size: 15px; animation-delay: 1.6s; }
@keyframes heartFloat { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-12px) scale(1.08); } }
.art-card {
  position: absolute; width: 66px; height: 92px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: linear-gradient(160deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .04));
  box-shadow: 0 16px 30px rgba(0, 0, 0, .35); backdrop-filter: blur(4px);
}
.art-card-a { left: 2%; bottom: 14%; transform: rotate(-13deg); }
.art-card-b { right: 3%; top: 12%; transform: rotate(11deg); width: 54px; height: 76px; }

/* Layout + create card */
.rooms-layout {
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: 22px; margin-top: 26px; align-items: start;
}
.rooms-layout .glass-card { padding: 24px; }
.card-head { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 18px; }
.card-icon {
  width: 42px; height: 42px; border-radius: 14px; flex: none; display: grid; place-items: center;
  font-size: 19px; background: linear-gradient(135deg, rgba(165, 192, 255, .25), rgba(124, 231, 192, .18));
  border: 1px solid var(--card-line);
}
.card-head h2 { font-size: 21px; letter-spacing: -.03em; }
.card-head p { color: var(--muted); font-size: 12px; margin-top: 3px; }

.room-form { display: grid; gap: 14px; }
.room-form .field { display: grid; gap: 6px; }
.room-form label { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.room-form .input, .room-form .select {
  width: 100%; height: 44px; border-radius: 12px;
  border: 1px solid var(--card-line); background: rgba(255, 255, 255, .04);
  padding: 0 13px; font-size: 13px; transition: border-color .2s, background .2s;
}
.room-form .input:focus, .room-form .select:focus {
  outline: 0; border-color: rgba(165, 192, 255, .6); background: rgba(165, 192, 255, .07);
}

.privacy-fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.privacy-fieldset legend { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.privacy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.privacy-grid-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.privacy-option { position: relative; cursor: pointer; display: block; }
.privacy-option input { position: absolute; opacity: 0; pointer-events: none; }
.privacy-card {
  position: relative; display: grid; gap: 2px; justify-items: start;
  padding: 13px 12px 12px; border-radius: 15px;
  border: 1px solid var(--card-line); background: rgba(255, 255, 255, .035);
  transition: transform .2s var(--pop), border-color .2s, background .2s, box-shadow .2s;
  height: 100%;
}
.privacy-card:hover { transform: translateY(-3px); border-color: rgba(165, 192, 255, .45); }
.privacy-emoji { font-size: 21px; line-height: 1; margin-bottom: 4px; }
.privacy-card strong { font-size: 12.5px; letter-spacing: -.01em; }
.privacy-card small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.privacy-check {
  position: absolute; top: 9px; right: 9px; width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 10px; font-weight: 900;
  background: rgba(255, 255, 255, .06); color: transparent; border: 1px solid var(--card-line);
  transition: .2s;
}
.privacy-option input:checked + .privacy-card {
  border-color: rgba(124, 231, 192, .65);
  background: linear-gradient(160deg, rgba(124, 231, 192, .16), rgba(165, 192, 255, .08));
  box-shadow: 0 12px 30px rgba(47, 191, 146, .16);
}
.privacy-option input:checked + .privacy-card .privacy-check {
  background: var(--mint); color: #0b2a21; border-color: transparent;
}
.privacy-option input:focus-visible + .privacy-card { outline: 2px solid var(--gold); outline-offset: 2px; }
.privacy-option.is-disabled { opacity: .45; cursor: not-allowed; }
.privacy-note {
  display: flex; gap: 7px; align-items: flex-start;
  padding: 9px 11px; border-radius: 11px; background: rgba(255, 255, 255, .035);
  border: 1px solid var(--soft-line); color: var(--muted); font-size: 11px; line-height: 1.5;
}
.privacy-note::before { content: "💡"; flex: none; }

.code-input { text-transform: uppercase; letter-spacing: .28em; font-family: var(--display); font-weight: 700; text-align: center; }
.join-card { display: grid; gap: 13px; }
.join-card h2 { font-size: 21px; }
.join-card p { color: var(--muted); font-size: 12px; }
.how-steps { display: grid; gap: 10px; margin-top: 16px; }
.how-step { display: flex; gap: 11px; align-items: flex-start; font-size: 11.5px; color: var(--muted); }
.how-step b {
  width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center;
  font-size: 10px; color: var(--ink); background: linear-gradient(135deg, var(--butter), var(--peach));
}
.how-step strong { color: var(--text); font-weight: 800; }

/* Live room cards */
.live-rooms { margin-top: 34px; }
.live-filter { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.live-chip {
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--card-line);
  background: rgba(255, 255, 255, .035); color: var(--muted);
  font-size: 11px; font-weight: 800; transition: .2s;
}
.live-chip:hover { color: var(--text); border-color: var(--line-strong); }
.live-chip.active {
  color: var(--ink); background: linear-gradient(135deg, var(--butter), var(--peach));
  border-color: transparent; box-shadow: 0 8px 20px rgba(245, 217, 152, .18);
}
.rooms-grid-v2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.room-card-v2 {
  position: relative; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--card-line); background: var(--card-solid);
  box-shadow: 0 16px 38px rgba(0, 0, 0, .3);
  transition: transform .25s var(--pop), border-color .2s, box-shadow .25s;
  display: flex; flex-direction: column;
}
.room-card-v2:hover { transform: translateY(-5px); border-color: rgba(165, 192, 255, .45); box-shadow: 0 26px 54px rgba(0, 0, 0, .45); }
.room-card-art { position: relative; aspect-ratio: 16 / 8; overflow: hidden; background: #0d0d13; }
.room-card-art img { width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: transform .5s ease, opacity .3s; }
.room-card-v2:hover .room-card-art img { transform: scale(1.06); opacity: .95; }
.room-card-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 8, 12, .05) 20%, rgba(8, 8, 12, .9)); }
.room-live {
  position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px; border-radius: 999px; background: rgba(8, 8, 12, .7);
  border: 1px solid rgba(255, 255, 255, .16); font-size: 9.5px; font-weight: 900;
  letter-spacing: .1em; text-transform: uppercase; backdrop-filter: blur(6px);
}
.room-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px var(--mint); animation: pulse 1.6s infinite; }
.privacy-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 999px; font-size: 9.5px; font-weight: 900;
  letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  border: 1px solid var(--card-line); background: rgba(255, 255, 255, .06); color: var(--text);
}
.room-card-art .privacy-badge { position: absolute; top: 10px; right: 10px; backdrop-filter: blur(6px); }
.privacy-badge.privacy-public { color: var(--mint); border-color: rgba(124, 231, 192, .35); background: rgba(124, 231, 192, .1); }
.privacy-badge.privacy-friends { color: var(--butter); border-color: rgba(245, 217, 152, .35); background: rgba(245, 217, 152, .1); }
.privacy-badge.privacy-private { color: var(--lilac); border-color: rgba(165, 192, 255, .35); background: rgba(165, 192, 255, .1); }
.room-code-float {
  position: absolute; bottom: 10px; left: 10px;
  font-family: var(--display); font-size: 12px; font-weight: 700; letter-spacing: .22em;
  color: var(--butter); padding: 3px 8px; border-radius: 7px;
  background: rgba(8, 8, 12, .6); border: 1px solid rgba(245, 217, 152, .25);
}
.room-card-body { padding: 14px 15px 12px; display: grid; gap: 4px; flex: 1; }
.room-card-body h3 { font-size: 15.5px; letter-spacing: -.02em; line-height: 1.25; }
.room-film { color: var(--muted); font-size: 11px; }
.room-watching { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.avatar-stack { display: flex; align-items: center; }
.avatar-stack-item {
  width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center;
  font-size: 9px; font-weight: 900; color: var(--ink);
  border: 2px solid var(--card-solid); margin-left: -7px;
  background: linear-gradient(135deg, var(--lilac), var(--mint));
}
.avatar-stack-item:first-child { margin-left: 0; }
.avatar-stack-item:nth-child(2n) { background: linear-gradient(135deg, var(--butter), var(--peach)); }
.avatar-stack-more { background: rgba(255, 255, 255, .12); color: var(--text); font-size: 8px; }
.room-watching small { color: var(--muted); font-size: 10px; }
.room-card-foot { padding: 0 15px 15px; }
.room-open {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; min-height: 36px; border-radius: 10px;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--card-line);
  font-size: 11px; font-weight: 900; color: var(--text); transition: .2s;
}
.room-open:hover { background: linear-gradient(135deg, var(--butter), var(--peach)); color: var(--ink); border-color: transparent; }
.rooms-empty { margin-top: 18px; }
.room-filter-empty { display: none; text-align: center; padding: 30px 16px; color: var(--muted); font-size: 12px; }
.room-filter-empty.show { display: block; }
.empty-emoji { font-size: 44px; line-height: 1; margin-bottom: 10px; }

/* ============================================================== ROOM PAGE */
.room-body { background: #07070b; }
.room-page-v2 { padding: 22px 0 60px; }
.room-container { display: grid; gap: 18px; }

.room-hero {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px; align-items: center;
  padding: 18px 20px; border-radius: 24px;
  border: 1px solid var(--card-line);
  background:
    radial-gradient(520px 200px at 80% 0%, rgba(165, 192, 255, .16), transparent 70%),
    linear-gradient(150deg, rgba(26, 24, 38, .9), rgba(13, 13, 19, .9));
  box-shadow: 0 20px 46px rgba(0, 0, 0, .34);
}
.room-poster {
  position: relative; width: 74px; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden;
  flex: none; border: 1px solid var(--card-line); box-shadow: 0 12px 26px rgba(0, 0, 0, .4);
}
.room-poster img { width: 100%; height: 100%; object-fit: cover; }
.room-poster-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(8, 8, 12, .35); color: #fff; font-size: 18px;
  opacity: 0; transition: .2s;
}
.room-poster:hover .room-poster-play { opacity: 1; }
.room-hero-copy { min-width: 0; display: grid; gap: 5px; }
.room-eyebrow-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.room-hero-copy h1 { font-size: clamp(22px, 3vw, 34px); letter-spacing: -.04em; line-height: 1.08; }
.room-sub { color: var(--muted); font-size: 12px; }
.room-sub b { color: var(--text); font-weight: 800; }
.room-meta-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.meta-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 700;
  border: 1px solid var(--soft-line); background: rgba(255, 255, 255, .04); color: var(--muted);
}
.meta-chip b { color: var(--text); }
.room-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.room-code-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px;
  border-radius: 999px; border: 1px solid rgba(245, 217, 152, .32);
  background: rgba(245, 217, 152, .08); color: var(--butter);
  font-size: 9px; font-weight: 900; letter-spacing: .16em; transition: .2s;
}
.room-code-pill b { font-family: var(--display); font-size: 13px; letter-spacing: .2em; }
.room-code-pill:hover { background: rgba(245, 217, 152, .16); transform: translateY(-1px); }
.room-code-pill i { font-style: normal; opacity: .7; }

.room-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.room-main { min-width: 0; display: grid; gap: 14px; }

/* Player */
.player-card {
  border-radius: 24px; overflow: hidden; border: 1px solid var(--card-line);
  background: #0a0a0f; box-shadow: 0 26px 60px rgba(0, 0, 0, .5);
}
.player-stage { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.player-stage iframe, .player-stage video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; }
.player-loading {
  position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; gap: 10px;
  background: radial-gradient(circle at 50% 45%, rgba(111, 151, 245, .12), rgba(0, 0, 0, .86));
  transition: opacity .35s, visibility .35s; text-align: center;
}
.player-loading small { color: var(--muted); font-size: 11px; }
.player-loading.is-hidden { opacity: 0; visibility: hidden; }
.player-error {
  position: absolute; inset: 0; z-index: 6; display: none; place-items: center; text-align: center;
  padding: 22px; background: rgba(5, 5, 8, .94);
}
.player-error.show { display: grid; }
.player-error h3 { font-size: 18px; margin-bottom: 6px; }
.player-error p { color: var(--muted); font-size: 12px; max-width: 420px; margin: 0 auto 12px; }
.player-controls {
  display: flex; align-items: center; gap: 9px; padding: 10px 13px;
  background: #0b0b10; border-top: 1px solid var(--soft-line);
}
.player-controls button {
  width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: transparent; color: var(--text); display: grid; place-items: center; flex: none;
}
.player-controls button:hover { background: rgba(255, 255, 255, .09); }
.player-controls svg { width: 17px; height: 17px; fill: currentColor; }
.seek-wrap { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.time-label { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.seek-wrap input[type=range], .volume-wrap input[type=range] {
  -webkit-appearance: none; appearance: none; height: 4px; border-radius: 99px;
  background: rgba(255, 255, 255, .16); outline: 0; cursor: pointer;
}
.seek-wrap input[type=range] { flex: 1; min-width: 0; }
.seek-wrap input[type=range]::-webkit-slider-thumb, .volume-wrap input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%;
  background: var(--butter); box-shadow: 0 0 0 3px rgba(245, 217, 152, .2);
}
.volume-wrap { display: flex; align-items: center; gap: 6px; width: 108px; flex: none; }
.volume-wrap input[type=range] { width: 62px; }

/* Countdown + reactions */
.countdown-overlay {
  position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; justify-items: center; gap: 4px;
  background: radial-gradient(circle at 50% 45%, rgba(111, 151, 245, .34), rgba(5, 5, 8, .88));
  backdrop-filter: blur(3px); text-align: center;
}
.countdown-kicker { font-size: 10px; font-weight: 900; letter-spacing: .22em; text-transform: uppercase; color: var(--butter); }
.countdown-overlay b {
  font-family: var(--display); font-size: clamp(64px, 12vw, 120px); line-height: 1;
  color: #fff; text-shadow: 0 0 40px rgba(165, 192, 255, .7);
  animation: countPop .9s var(--pop) infinite;
}
.countdown-overlay small { color: var(--muted); font-size: 11px; }
@keyframes countPop { 0% { transform: scale(.82); opacity: .6; } 40% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); opacity: .92; } }
.reaction-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.reaction-float {
  position: absolute; bottom: 6%; animation: reactionRise 2.4s ease-out forwards;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .4)); will-change: transform, opacity;
}
@keyframes reactionRise {
  0% { transform: translateY(0) scale(.6) rotate(0deg); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translateY(-320px) scale(1.15) rotate(14deg); opacity: 0; }
}

/* Sync dock */
.sync-dock {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 14px; background: linear-gradient(160deg, rgba(111, 151, 245, .1), rgba(11, 11, 16, .9));
  border-top: 1px solid var(--soft-line);
}
.sync-dock-main { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sync-mode-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  font-size: 10px; font-weight: 900; letter-spacing: .04em;
  border: 1px solid var(--card-line); background: rgba(255, 255, 255, .05);
}
.sync-mode-badge.is-true { color: var(--mint); border-color: rgba(124, 231, 192, .4); background: rgba(124, 231, 192, .1); }
.sync-mode-badge.is-timeline { color: var(--butter); border-color: rgba(245, 217, 152, .4); background: rgba(245, 217, 152, .1); }
.sync-clock, .sync-drift { display: grid; gap: 0; }
.sync-clock small, .sync-drift small { font-size: 8.5px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); }
.sync-clock b { font-family: var(--display); font-size: 16px; font-variant-numeric: tabular-nums; }
.sync-drift b { font-size: 12px; color: var(--butter); font-variant-numeric: tabular-nums; }
.sync-drift b.is-good { color: var(--mint); }
.sync-dock-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.sync-btn {
  min-height: 34px; padding: 0 11px; border-radius: 10px;
  border: 1px solid var(--card-line); background: rgba(255, 255, 255, .055);
  color: var(--text); font-size: 11px; font-weight: 800; transition: .2s;
}
.sync-btn:hover { background: rgba(255, 255, 255, .12); transform: translateY(-1px); }
.sync-btn-main { background: linear-gradient(135deg, var(--lilac), var(--lilac-deep)); color: #fff; border-color: transparent; }
.sync-btn-cute { background: linear-gradient(135deg, var(--butter), var(--peach)); color: var(--ink); border-color: transparent; }
.sync-banner {
  display: flex; align-items: flex-start; gap: 7px; padding: 10px 14px;
  border-top: 1px solid var(--soft-line); background: rgba(111, 151, 245, .07);
  color: var(--muted); font-size: 11px; line-height: 1.55;
}
.sync-banner strong { color: var(--lilac); }

/* Source strip */
.source-strip { padding: 14px; border-top: 1px solid var(--soft-line); background: rgba(10, 10, 15, .8); }
.source-strip-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.source-strip-head h3 { font-size: 13px; letter-spacing: -.01em; }
.source-strip-head p { margin-top: 2px; }
.source-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.source-tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px;
  border-radius: 10px; border: 1px solid var(--card-line); background: rgba(255, 255, 255, .035);
  color: var(--muted); font-size: 10.5px; font-weight: 800; transition: .2s;
}
.source-tab small { color: var(--muted-2); font-size: 8.5px; font-weight: 700; }
.source-tab em { font-style: normal; font-size: 8px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; padding: 1px 5px; border-radius: 99px; }
.source-tab.active { color: var(--text); border-color: rgba(245, 217, 152, .5); background: rgba(245, 217, 152, .1); }
.tag-true { color: var(--mint); background: rgba(124, 231, 192, .14); }
.tag-embed { color: var(--butter); background: rgba(245, 217, 152, .14); }

/* Info card + reactions */
.room-info-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; flex-wrap: wrap; }
.room-info-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.info-emoji {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex: none;
  font-size: 18px; background: linear-gradient(135deg, rgba(165, 192, 255, .22), rgba(124, 231, 192, .16));
  border: 1px solid var(--card-line);
}
.room-info-main h3 { font-size: 14px; }
.room-info-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.room-info-actions form { margin: 0; }

.reaction-bar {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: 16px;
  border: 1px solid var(--card-line); background: rgba(255, 255, 255, .03);
}
.reaction-label { font-size: 9.5px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); margin-right: 3px; }
.reaction-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--card-line);
  background: rgba(255, 255, 255, .05); font-size: 17px; line-height: 1;
  display: grid; place-items: center; transition: transform .18s var(--pop), background .2s;
}
.reaction-btn:hover { transform: translateY(-4px) scale(1.12); background: rgba(255, 255, 255, .12); }
.reaction-btn:active { transform: scale(.92); }

/* Sidebar */
.room-sidebar {
  position: sticky; top: 92px; display: flex; flex-direction: column;
  height: min(720px, calc(100vh - 120px)); border-radius: 22px; overflow: hidden;
  border: 1px solid var(--card-line); background: rgba(16, 16, 23, .86);
  box-shadow: 0 20px 46px rgba(0, 0, 0, .3);
}
.room-tabs { display: flex; border-bottom: 1px solid var(--soft-line); flex: none; }
.room-tabs button {
  flex: 1; padding: 12px 6px; border: 0; background: none; color: var(--muted);
  font-size: 10px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase;
  border-bottom: 2px solid transparent; transition: .2s;
}
.room-tabs button:hover { color: var(--text); }
.room-tabs button.active { color: var(--butter); border-bottom-color: var(--butter); }
.room-pane { display: none; flex: 1; min-height: 0; }
.room-pane.active { display: flex; flex-direction: column; }

.chat-messages { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { display: flex; gap: 8px; align-items: flex-end; max-width: 94%; align-self: flex-start; }
.chat-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.chat-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-size: 9px; font-weight: 900; color: var(--ink);
  background: linear-gradient(135deg, var(--lilac), var(--mint));
}
.chat-msg:nth-child(2n) .chat-avatar { background: linear-gradient(135deg, var(--butter), var(--peach)); }
.chat-bubble {
  padding: 7px 10px; border-radius: 13px 13px 13px 4px;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--soft-line);
  font-size: 11.5px; line-height: 1.45; min-width: 0;
}
.chat-msg.mine .chat-bubble { border-radius: 13px 13px 4px 13px; background: rgba(111, 151, 245, .18); border-color: rgba(165, 192, 255, .22); }
.chat-bubble b { display: block; font-size: 9px; color: var(--butter); margin-bottom: 1px; }
.chat-bubble span { display: block; word-break: break-word; }
.chat-bubble time { display: block; color: var(--muted-2); font-size: 8px; margin-top: 3px; }
.chat-empty { margin: auto; text-align: center; color: var(--muted-2); font-size: 11.5px; padding: 20px; }
.chat-form { display: flex; gap: 7px; padding: 10px; border-top: 1px solid var(--soft-line); flex: none; }
.chat-form input {
  flex: 1; min-width: 0; height: 38px; border-radius: 10px;
  border: 1px solid var(--card-line); background: rgba(255, 255, 255, .04); padding: 0 11px; font-size: 11.5px;
}
.chat-form input:focus { outline: 0; border-color: rgba(165, 192, 255, .55); }
.chat-form button {
  width: 38px; height: 38px; border: 0; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, var(--butter), var(--peach)); color: var(--ink);
  font-size: 16px; font-weight: 900;
}
.member-list { padding: 10px; overflow: auto; }
.member-row { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 11px; transition: background .2s; }
.member-row:hover { background: rgba(255, 255, 255, .045); }
.member-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-size: 10px; font-weight: 900; color: var(--ink);
  background: linear-gradient(135deg, var(--lilac), var(--mint));
}
.member-row:nth-child(2n) .member-avatar { background: linear-gradient(135deg, var(--butter), var(--peach)); }
.member-row strong { font-size: 11.5px; display: inline-flex; align-items: center; gap: 5px; }
.member-row small { display: block; color: var(--muted); font-size: 9.5px; }
.host-tag {
  margin-left: auto; font-size: 8px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink); background: linear-gradient(135deg, var(--butter), var(--peach));
  padding: 2px 6px; border-radius: 99px;
}
.voice-pane-inner { padding: 14px; display: grid; gap: 13px; align-content: start; overflow: auto; }
.voice-pane-head { display: flex; align-items: center; gap: 9px; }
.voice-pane-head strong { display: block; font-size: 12px; }
.voice-people-large { display: grid; gap: 6px; }
.voice-people-large .voice-person { width: 100%; }
.voice-tips { display: grid; gap: 6px; padding: 11px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--soft-line); }
.voice-tips p { color: var(--muted); font-size: 10.5px; }
.voice-tips .link-btn { justify-self: start; }

/* Voice bar + mic */
.voice-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 12px 14px 0; padding: 11px 13px; border-radius: 15px;
  border: 1px solid var(--card-line);
  background: linear-gradient(135deg, rgba(111, 151, 245, .1), rgba(14, 14, 20, .7));
  transition: border-color .3s, background .3s;
}
.voice-bar.is-on { border-color: rgba(124, 231, 192, .42); background: linear-gradient(135deg, rgba(124, 231, 192, .1), rgba(14, 14, 20, .7)); }
.voice-status { display: flex; align-items: center; gap: 9px; }
.voice-status strong { display: block; font-size: 12px; }
.voice-status .small { font-size: 10px; }
.voice-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted-2); flex: none; transition: .3s; }
.voice-dot.live { background: var(--mint); box-shadow: 0 0 0 4px rgba(124, 231, 192, .16), 0 0 12px var(--mint); animation: pulse 1.8s infinite; }
.voice-people { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.voice-empty { color: var(--muted-2); font-size: 10.5px; }
.voice-person {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 4px;
  border-radius: 99px; background: rgba(255, 255, 255, .05); border: 1px solid var(--soft-line);
  font-size: 10.5px; transition: .2s;
}
.voice-person .voice-avatar {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--lilac), var(--mint)); color: var(--ink); font-size: 9px; font-weight: 900;
}
.voice-person .voice-name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.voice-person .voice-mic { font-size: 9px; opacity: .85; }
.voice-person.speaking { border-color: rgba(124, 231, 192, .7); box-shadow: 0 0 0 2px rgba(124, 231, 192, .18); }
.voice-person.muted { opacity: .6; }
.voice-actions { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.voice-audio { position: absolute; width: 0; height: 0; overflow: hidden; }

.mic-meter { display: inline-flex; align-items: flex-end; gap: 2px; height: 20px; width: 34px; flex: none; }
.mic-meter i {
  flex: 1; height: 100%; border-radius: 2px; background: rgba(255, 255, 255, .14);
  transform: scaleY(.25); transform-origin: bottom; transition: background .12s, transform .08s;
}
.mic-meter i.on { background: linear-gradient(180deg, var(--mint), var(--mint-deep)); }
.mic-meter-large { width: 100%; height: 46px; gap: 4px; }
.mic-meter-large i { border-radius: 4px; }
.mic-select {
  height: 34px; max-width: 170px; border-radius: 9px; padding: 0 8px;
  border: 1px solid var(--card-line); background: rgba(255, 255, 255, .05); font-size: 10.5px;
}

/* Modals */
.modal-card-wide { width: min(620px, 100%); }
.settings-block { display: grid; gap: 9px; padding: 13px; border-radius: 15px; background: rgba(255, 255, 255, .03); border: 1px solid var(--soft-line); }
.settings-block h4 { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.share-row { display: flex; gap: 7px; }
.share-row .input { flex: 1; min-width: 0; height: 38px; border-radius: 10px; border: 1px solid var(--card-line); background: rgba(255, 255, 255, .04); padding: 0 10px; font-size: 11px; }

.source-modal-list { display: grid; gap: 7px; max-height: 42vh; overflow: auto; padding-right: 2px; }
.source-option {
  display: flex; align-items: center; gap: 10px; padding: 10px 11px; border-radius: 13px;
  border: 1px solid var(--card-line); background: rgba(255, 255, 255, .03); cursor: pointer; transition: .18s;
}
.source-option:hover { border-color: rgba(165, 192, 255, .45); background: rgba(165, 192, 255, .07); }
.source-option input { width: 16px; height: 16px; accent-color: var(--mint); flex: none; }
.source-option.is-current { border-color: rgba(124, 231, 192, .5); background: rgba(124, 231, 192, .08); }
.source-option-icon { font-size: 17px; flex: none; }
.source-option-body { display: grid; gap: 1px; min-width: 0; flex: 1; }
.source-option-body strong { font-size: 12px; }
.source-option-body small { color: var(--muted); font-size: 10px; }
.source-option-tag { font-size: 8px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; padding: 2px 6px; border-radius: 99px; flex: none; }
.custom-source { border-radius: 13px; border: 1px dashed var(--line-strong); background: rgba(255, 255, 255, .02); }
.custom-source summary { padding: 10px 12px; cursor: pointer; font-size: 11.5px; font-weight: 800; color: var(--butter); }
.custom-source-body { display: grid; gap: 9px; padding: 0 12px 12px; }
.custom-source-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.custom-source .field { display: grid; gap: 5px; }
.custom-source label { font-size: 9.5px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.custom-source .input, .custom-source .select {
  width: 100%; height: 38px; border-radius: 9px; border: 1px solid var(--card-line);
  background: rgba(255, 255, 255, .04); padding: 0 10px; font-size: 11.5px;
}

.mic-steps { display: grid; gap: 8px; padding-left: 18px; margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.55; }
.mic-steps b { color: var(--text); }
.mic-steps code { background: rgba(255, 255, 255, .07); padding: 1px 4px; border-radius: 4px; font-size: 10.5px; }
.mic-test-box { display: grid; gap: 8px; justify-items: start; padding: 12px; border-radius: 13px; background: rgba(124, 231, 192, .06); border: 1px solid rgba(124, 231, 192, .18); }
.mic-test-box .mic-meter { width: 100%; }

/* Locked / join */
.locked-card, .join-room-card { text-align: center; justify-items: center; display: grid; gap: 10px; }
.locked-emoji { font-size: 46px; line-height: 1; }
.locked-card h1, .join-room-card h1 { font-size: 26px; }
.locked-card p, .join-room-card p { color: var(--muted); font-size: 12.5px; max-width: 42ch; }
.locked-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.join-room-poster { width: 104px; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; border: 1px solid var(--card-line); box-shadow: 0 14px 30px rgba(0, 0, 0, .4); }
.join-room-poster img { width: 100%; height: 100%; object-fit: cover; }
.join-room-card .form-grid { width: 100%; }

/* Ended banner */
.room-ended-banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 16px 18px; border-radius: 16px;
  border: 1px solid rgba(255, 107, 122, .35); background: rgba(255, 107, 122, .08);
}
.room-ended-banner strong { font-size: 13px; }
.room-ended-banner span { color: var(--muted); font-size: 11.5px; flex: 1; min-width: 180px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .rooms-hero { grid-template-columns: 1fr; }
  .rooms-hero-art { min-height: 260px; order: -1; }
  .rooms-layout { grid-template-columns: 1fr; }
  .room-layout { grid-template-columns: 1fr; }
  .room-sidebar { position: static; height: 520px; }
}
@media (max-width: 900px) {
  .room-hero { grid-template-columns: auto minmax(0, 1fr); }
  .room-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .privacy-grid, .privacy-grid-compact { grid-template-columns: 1fr; }
  .privacy-card { grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; }
  .privacy-emoji { grid-row: span 2; margin: 0; }
  .privacy-card small { grid-column: 2; }
}
@media (max-width: 720px) {
  .rooms-page { padding: 20px 0 50px; }
  .rooms-hero { padding: 26px 20px; border-radius: 24px; }
  .rooms-hero-art { min-height: 220px; }
  .art-card { display: none; }
  .room-hero { grid-template-columns: 1fr; }
  .room-poster { width: 64px; }
  .room-actions { grid-column: auto; }
  .sync-dock-actions { margin-left: 0; width: 100%; }
  .sync-btn { flex: 1; }
  .room-sidebar { height: 480px; }
  .custom-source-row { grid-template-columns: 1fr; }
  .volume-wrap { display: none; }
  .room-info-card { align-items: flex-start; }
}
@media (max-width: 480px) {
  .rooms-hero-copy h1 { font-size: 32px; }
  .rooms-hero-art { display: none; }
  .room-hero-copy h1 { font-size: 23px; }
  .room-code-pill b { font-size: 12px; }
  .reaction-btn { width: 32px; height: 32px; font-size: 15px; }
  .voice-actions { margin-left: 0; width: 100%; }
  .voice-actions .btn { flex: 1; }
  .mic-select { max-width: 100%; width: 100%; }
  .sync-clock b { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .art-blob, .art-heart, .hero-paw-row i, .countdown-overlay b, .reaction-float { animation: none !important; }
}
