@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');
:root { color-scheme: dark; font-family: "DM Sans", system-ui, sans-serif; background: #100d18; color: #fbf7ff; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 50% 12%, #2a1646, transparent 65%); }
.top { min-height: 75px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px max(5vw, 20px); border-bottom: 1px solid #ffffff19; }
a { color: #e1c9ff; }
.brand { color: white; text-decoration: none; font-size: 1.13rem; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.brand-icon { background: #cba5ff; color: #201334; border-radius: 10px; display: grid; place-items: center; width: 34px; height: 34px; font-size: .8rem; }
.connection { color: #e5d3ff; font-size: .9rem; text-align: right; }
main { width: min(1050px, 92vw); margin: auto; padding: 32px 0 50px; }
.lobby { text-align: center; max-width: 620px; margin: auto; padding: clamp(22px, 5vh, 64px) 0; }
.ticket { background: linear-gradient(135deg, #ebd2ff, #9860f2); color: #241238; border-radius: 20px; transform: rotate(-10deg); width: 108px; height: 72px; display: grid; place-items: center; margin: 0 auto 34px; box-shadow: 0 0 75px #aa69ff62; font-size: 27px; }
h1, h2, .brand { font-family: Manrope, system-ui, sans-serif; }
h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.6rem); letter-spacing: -.055em; line-height: 1.04; }
.lobby h1 { font-size: clamp(3.25rem, 10vw, 6.2rem); }
em { font-style: normal; color: #cfabff; }
.lobby p { max-width: 400px; margin: 24px auto; }
p, small { color: #d2c2df; }
button, input { font: inherit; }
button { border: 1px solid #ffffff29; background: #2b2039; color: white; padding: 10px 15px; border-radius: 10px; font-weight: 700; cursor: pointer; }
button:hover { filter: brightness(1.17); }
button:disabled { opacity: .55; cursor: wait; }
.primary { background: #cba5ff; color: #211231; border-color: transparent; }
#create { padding: 13px 30px; }
form { display: grid; gap: 9px; background: #1e172a; border: 1px solid #ffffff18; border-radius: 16px; padding: 18px; }
#join-form { margin: 30px auto 0; max-width: 430px; text-align: left; }
label { font-weight: 700; }
.row { display: flex; gap: 8px; }
input:not([type=range]) { min-width: 0; width: 100%; border-radius: 10px; border: 1px solid #ffffff2c; background: #140f1e; color: #fff; padding: 10px 12px; }
button, output { flex-shrink: 0; }
.room-title { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.room-title a { display: inline-block; margin-bottom: 7px; font-size: .9rem; }
.screen { aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #08070b; border: 1px solid #ffffff25; }
video { width: 100%; height: 100%; display: block; }
.empty { height: 100%; display: grid; align-content: center; text-align: center; background: radial-gradient(ellipse at center, #34214d, #100d18 75%); }
.empty span { font-size: 1.5rem; color: #d4afff; }
.empty h2 { margin: 10px 0 0; }
.empty p { margin: 5px 0; }
.controls { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin: 12px 0; }
#seek { flex: 1; min-width: 65px; accent-color: #cba5ff; }
#video-form { margin-top: 16px; }
#notice { background: #2b2039; border-radius: 10px; padding: 12px 16px; }
:focus-visible { outline: 2px solid #e3c5ff; outline-offset: 3px; }
@media (max-width: 470px) { .room-title { align-items: start; flex-direction: column; } #video-form .row { flex-direction: column; } }
.screen { position: relative; }
.empty { position: absolute; inset: 0; }
.empty p { padding: 0 14px; }
.sources { display: grid; grid-template-columns: minmax(0, 3fr) minmax(240px, 2fr); gap: 12px; margin-top: 16px; }
#video-form { margin: 0; }
.file-source { display: flex; align-content: center; align-items: center; flex-wrap: wrap; gap: 9px; background: #1e172a; border: 1px solid #ffffff18; border-radius: 16px; padding: 18px; }
.file-source small, .file-source progress { width: 100%; }
.file-source progress { accent-color: #cba5ff; }
#source-label { margin: 12px 0 0; overflow-wrap: anywhere; }
.source-error { color: #ffd1d9; margin: 2px 0 0; }
@media (max-width: 720px) { .sources { grid-template-columns: 1fr; } }
.share-panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; margin-bottom: 14px; border: 1px solid #ffffff25; border-radius: 16px; background: #1e172a; }
.share-panel h2 { font-size: 1rem; margin: 0 0 4px; }
.share-panel p { margin: 0; font-size: .9rem; }
.live-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.identity { max-width: 400px; margin: clamp(36px, 12vh, 120px) auto; }
.identity form { gap: 16px; padding: clamp(22px, 6vw, 36px); border-color: #c9a3ff38; box-shadow: 0 16px 56px #08060e70; }
.identity .brand-icon { width: 42px; height: 42px; }
.identity p { margin: 8px 0 0; }
.room-layout, .room-stage { min-width: 0; }
.room-layout { display: grid; gap: 18px; align-items: start; }
.live-player { background: #150f20; border: 1px solid #ffffff24; border-radius: 17px; overflow: hidden; }
.live-player .screen { border: 0; border-radius: 0; }
.live-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px; }
#controller-state { color: #d6c8e6; margin-left: auto; font-size: .84rem; }
#film-help { border-top: 1px solid #ffffff1c; padding: 12px; color: #dacfea; }
#film-help summary { cursor: pointer; font-weight: 700; }
#film-help p { margin: 10px 0; overflow-wrap: anywhere; }
.chat { border: 1px solid #c9a3ff29; border-radius: 17px; background: #171222; min-width: 0; block-size: clamp(19rem, 44dvh, 25rem); display: flex; flex-direction: column; overflow: hidden; }
.chat-header { flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid #ffffff15; }
.chat-header h2 { margin: 0; font-size: 1.02rem; }
.chat-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #34244a; color: #e6d0ff; }
.chat-empty { flex: 1; display: grid; place-items: center; margin: 0; padding: 24px; color: #b8a9c8; }
.chat ol { flex: 1; min-height: 0; overflow-y: auto; overflow-anchor: none; overscroll-behavior: contain; list-style: none; margin: 0; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.chat li { flex-shrink: 0; align-self: flex-start; min-width: 0; max-width: 86%; }
.chat li:first-child { margin-top: auto; }
.chat li.own-message { align-self: flex-end; }
.chat-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin: 0 3px 4px; font-size: .81rem; }
.own-message .chat-meta { justify-content: flex-end; }
.chat time { color: #ab9bbb; font-size: .76rem; }
.chat li p { margin: 0; padding: 8px 12px; border-radius: 13px 13px 13px 4px; background: #292036; color: #f3eafa; overflow-wrap: anywhere; white-space: pre-wrap; }
.chat li.own-message p { background: #553575; border-radius: 13px 13px 4px 13px; }
.chat form { flex-shrink: 0; gap: 6px; padding: 12px 14px; border: 0; border-radius: 0; border-top: 1px solid #ffffff15; background: #1b1527; }
.chat-composer { display: flex; gap: 7px; min-width: 0; }
#chat-status:empty { display: none; }
@media (min-width: 1050px) {
  .room-layout { grid-template-columns: minmax(0, 1fr) minmax(275px, 30%); }
  .chat { position: sticky; top: 18px; block-size: clamp(23rem, 60dvh, 31rem); }
}

.invite-panel { display: grid; gap: 7px; padding: 14px 16px; margin: 0 0 16px; border: 1px solid #c9a3ff29; border-radius: 14px; background: #1e172a; }
#copy-status { color: #e7cfff; }
#copy-status:empty { display: none; }

:root { background: #0e1017; color: #f7f6fa; }
body { background: radial-gradient(ellipse at 46% 0%, #262341 0%, transparent 37rem), #0e1017; }
.top { background: #11131c; border-bottom-color: #ffffff13; }
.brand-icon, .primary { background: #bab7ff; color: #191636; }
button { background: #212231; border-color: #ffffff1f; }
button.primary { background: #bab7ff; }
form, .file-source, .share-panel, .invite-panel, .live-player { background: #161824; border-color: #ffffff17; }
.chat { background: #151722; border-color: #ffffff1b; }
.chat form, .chat-header { background: #191b28; }
.chat li p { background: #252738; }
.chat li.own-message p { background: #454474; }
.screen { border-color: #ffffff17; }
.empty { background: radial-gradient(ellipse at center, #292640, #13141f 75%); }
.room-title h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
.live-toolbar button { min-height: 42px; }

.quality-choice { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: #d9d5ea; }
.quality-choice select { appearance: none; color: #f7f6fa; background: #212231; border: 1px solid #ffffff25; border-radius: 9px; min-height: 42px; padding: 0 11px; font: inherit; cursor: pointer; }
.quality-choice select:focus-visible { outline: 2px solid #bab7ff; outline-offset: 2px; }

.public-info { width: min(100%, 660px); margin: 32px auto 12px; padding: 24px; border-top: 1px solid #ffffff20; }
.public-info h2 { font-size: clamp(1.3rem, 3vw, 1.75rem); margin: 0 0 12px; }
.public-info p, .public-info ol { color: #dad5e7; line-height: 1.65; }
.public-info ol { padding-left: 24px; }
.public-info li + li { margin-top: 8px; }
