* { box-sizing: border-box; }
html, body { margin: 0; background: transparent; color: #f3eefb; font-family: 'Inter', Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { padding: 4px 0 0; }

.room { position: relative; width: 100%; aspect-ratio: 600 / 470; }
.room__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

/* TV sits in the SVG's coordinate space: x 30..570, y 12..318 (bezel included), wall-mounted */
.tv { position: absolute; left: 5%; width: 90%; top: 2.55%; height: 65.1%;
  background: #0b0a10; border: 2px solid #2c2a3a; border-radius: 10px; padding: 1.4%;
  box-shadow: 0 0 50px rgba(47,211,255,.14), 0 18px 40px rgba(0,0,0,.55); }
.tv__screen { position: relative; width: 100%; height: 100%; border-radius: 4px; overflow: hidden; background: #000; }
.tv__screen video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tv__live { position: absolute; top: 8px; left: 10px; display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
  background: rgba(8,8,14,.6); padding: 4px 9px; border-radius: 12px; }
.tv__live .dot { width: 7px; height: 7px; border-radius: 50%; background: #ff4d6d; }
.room.is-live .tv__live .dot { background: #2EE6A6; box-shadow: 0 0 0 3px rgba(46,230,166,.25); }

.tv__qr { position: absolute; top: 5%; bottom: 5%; right: 3%; aspect-ratio: 1 / 1.12; padding: 6px 6px 8px;
  background: rgba(18,18,27,.95); border: 1px solid #2c2a3a; border-radius: 10px; text-align: center;
  display: grid; grid-template-rows: auto minmax(0, 1fr); justify-items: center; gap: 4px; animation: pop .3s ease; }
.tv__qr[hidden] { display: none; }
.tv__qr-cta { font-size: clamp(11px, 1.6vw, 15px); font-weight: 800; line-height: 1.1; }
.tv__qr canvas { height: 100%; width: auto; max-width: 100%; min-width: 0; min-height: 0; aspect-ratio: 1; background: #fff; border-radius: 6px; image-rendering: pixelated; }
@keyframes pop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }

/* lines: blue, flowing once a session is live */
.lines path { fill: none; stroke: #2FD3FF; stroke-width: 1.6; opacity: .55; }
.room.is-live .lines path { stroke-dasharray: 6 6; opacity: .95; animation: flow 1s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -12; } }
.hub { fill: #FF1FA0; }
.hub-ring { fill: none; stroke: #FF1FA0; stroke-opacity: .5; stroke-width: 1.5; }
.room.is-live .hub-ring { animation: ring 1.6s ease-out infinite; transform-origin: 300px 336px; }
@keyframes ring { from { transform: scale(1); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
.room.is-live .phone { animation: glow 2.4s ease-in-out infinite; }
.room.is-live .phone:nth-child(2) { animation-delay: .3s; }
.room.is-live .phone:nth-child(3) { animation-delay: .6s; }
.room.is-live .phone:nth-child(4) { animation-delay: .9s; }
@keyframes glow { 0%,100% { filter: none; } 50% { filter: drop-shadow(0 0 6px rgba(47,211,255,.7)); } }

.cta { text-align: center; margin-top: 4px; }
.cta__btn { border: 1.5px solid #B14BFF; background: rgba(177,75,255,.12); color: #fff; font-weight: 800; font-size: 15px;
  border-radius: 26px; padding: 12px 24px; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.cta__btn:hover { transform: translateY(-2px); background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.5);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.cta__btn[disabled] { opacity: .6; cursor: default; transform: none; }
.cta__btn[hidden] { display: none; }
.cta__note { margin: 10px 0 0; font-size: 13px; font-weight: 700; color: #cfcbe0; }

@media (prefers-reduced-motion: reduce) {
  .room.is-live .lines path, .room.is-live .hub-ring, .room.is-live .phone { animation: none; }
}
