/* Liquid Glass treatment adapted from the user's testdub.html reference.
   Existing gameplay selectors/geometry remain in styles.css. */
:root {
  --ink: #fff;
  --muted: rgba(255,255,255,.76);
  --surface: rgba(28,34,52,.4);
  --surface-2: rgba(255,255,255,.12);
  --line: rgba(255,255,255,.25);
  --violet: #b2b9ff;
  --violet-soft: #e0e4ff;
  --coral: #ff7b79;
  --glass-shadow: 0 24px 60px rgba(0,0,0,.2), inset 0 1px 1px rgba(255,255,255,.45);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  background: #0b0f19;
}
body { background: #0b0f19; -webkit-font-smoothing: antialiased; }
.liquid-background { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; filter: blur(80px); }
.blob { position: absolute; border-radius: 50%; opacity: .7; animation: glass-float 22s ease-in-out infinite alternate; }
.blob-one { width: 550px; height: 550px; top: -140px; left: -140px; background: radial-gradient(circle,#ff3b30,#ff9500); }
.blob-two { width: 650px; height: 650px; top: 30%; right: -240px; background: radial-gradient(circle,#5856d6,#af52de); animation-delay: -7s; }
.blob-three { width: 500px; height: 500px; bottom: -200px; left: 18%; background: radial-gradient(circle,#007aff,#00c7be); animation-delay: -14s; }
.topbar { position: sticky; top: max(16px,env(safe-area-inset-top)); z-index: 20; width: min(860px,calc(100% - 40px)); height: auto; min-height: 66px; padding: 9px 22px; margin: 24px auto 0; border: 1px solid var(--line); border-top-color: rgba(255,255,255,.6); border-radius: 999px; background: rgba(37,42,57,.45); -webkit-backdrop-filter: blur(35px) saturate(180%); backdrop-filter: blur(35px) saturate(180%); box-shadow: var(--glass-shadow); }
.brand { font-size: 16px; font-weight: 650; letter-spacing: -.02em; }
.brand-mark { width: 38px; height: 38px; }
.brand-logo { width: 42px; height: 42px; }
.mode-pill { color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.header-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: rgba(255,255,255,.08); color: white; font: inherit; font-size: 13px; cursor: pointer; min-height: 44px; padding: 10px 15px; }
.header-button:hover { background: rgba(255,255,255,.18); }
.header-button[hidden] { display: none; }
.header-button:disabled { opacity: .5; cursor: wait; }
#settings-dialog { width: min(480px,calc(100% - 28px)); max-height: calc(100svh - 48px); overflow-y: auto; padding: 26px; border: 1px solid rgba(255,255,255,.4); border-radius: 30px; background: rgba(25,30,48,.96); color: #fff; box-shadow: var(--glass-shadow); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
#settings-dialog::backdrop { background: rgba(5,8,18,.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.settings-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.settings-heading h2 { font-size: 28px; margin: 0; }
.settings-copy { color: var(--muted); font-size: 14px; line-height: 1.5; }
#settings-dialog .sound-mixer { margin: 24px 0; padding: 20px; box-shadow: none; }
#app { width: min(1080px,calc(100% - 48px)); min-height: calc(100svh - 100px); padding-bottom: env(safe-area-inset-bottom); perspective: 1200px; }
#app:focus { outline: none; }
.hero { min-height: auto; width: 100%; padding: 64px 0 80px; gap: 24px; }
.hero-panel, .feature-card, .form-card, .roles-card, .line-card, .pack-card, .sound-mixer, .empty-state, .premiere-ready {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-top-color: rgba(255,255,255,.55); border-radius: 32px; box-shadow: var(--glass-shadow); -webkit-backdrop-filter: blur(32px) saturate(180%); backdrop-filter: blur(32px) saturate(180%);
}
.hero-panel { width: 100%; padding: 64px 32px; display: flex; flex-direction: column; align-items: center; overflow: hidden; }
.eyebrow, .step { display: inline-block; width: fit-content; padding: 7px 15px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.1); color: var(--ink); font-size: 11px; font-weight: 600; letter-spacing: .05em; }
h1 { font-size: clamp(42px,6.6vw,76px); line-height: 1.04; letter-spacing: -.055em; font-weight: 700; }
h1 em { color: #fff; background: none; -webkit-text-fill-color: inherit; }
.hero-copy { max-width: 560px; margin: 24px auto; line-height: 1.5; font-size: 18px; }
.primary, .secondary, .record-button { border-radius: 999px; padding: 15px 25px; font-weight: 600; min-height: 48px; }
.primary { background: rgba(255,255,255,.94); color: #141824; box-shadow: 0 10px 25px rgba(0,0,0,.18); }
.primary:hover { background: #fff; }
.secondary { background: rgba(255,255,255,.1); color: var(--ink); border: 1px solid var(--line); }
.secondary:hover { background: rgba(255,255,255,.2); }
.hero-action { width: 230px; }
.online-entry { justify-content: center; text-decoration: none; }
.hero-action + .hero-action { margin-top: 12px; width: auto; font-size: 14px; }
.login-card { max-width: 520px; margin: 0 auto; gap: 16px; text-align: center; }
.login-card a { text-decoration: none; text-align: center; }
.login-note { color: var(--muted); font-size: 14px; line-height: 1.6; }
.login-google { display: flex; align-items: center; justify-content: center; gap: 12px; background: white; color: #1f1f1f; border: 1px solid #747775; font: 500 14px/20px Arial,sans-serif; }
.login-google img { width: 20px; height: 20px; object-fit: contain; }
.account-actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-bottom: 22px; color: var(--muted); font-size: 14px; }
.invite-fallback { grid-template-columns: 1fr; margin-bottom: 20px; }
.telegram-entry { padding: 13px 22px; border: 1px solid var(--line); background: rgba(255,255,255,.08); border-radius: 999px; margin-top: 14px; color: white; font-size: 14px; }
.telegram-entry:hover { background: rgba(255,255,255,.17); text-decoration: none; }
.quick-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; gap: 24px; margin: 0; text-align: left; color: var(--ink); }
.feature-card { padding: 28px 24px; overflow: hidden; }
.feature-icon { display: grid; place-items: center; width: 48px; height: 48px; background: rgba(255,255,255,.12); border: 1px solid var(--line); border-radius: 16px; font-size: 23px; }
.feature-card h3 { margin: 20px 0 10px; font-size: 19px; font-weight: 600; letter-spacing: -.025em; }
.feature-card p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
.flow-screen { width: min(960px,100%); padding: 56px 0 70px; }
h2 { font-size: clamp(34px,5.4vw,58px); line-height: 1.06; font-weight: 650; }
h2 em { color: #e0e4ff; }
.screen-head > p:last-child { line-height: 1.5; }
.form-card input { background: rgba(8,15,29,.35); border-radius: 17px; }
.form-card input:focus { border-color: rgba(255,255,255,.8); box-shadow: 0 0 0 3px rgba(255,255,255,.14); }
.form-card label { color: var(--muted); }
.role-row { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); border-radius: 20px; }
.role-row strong, .role-row > b { font-weight: 600; }
.pack-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.pack-card { grid-template-columns: 1fr; gap: 0; align-content: start; text-align: left; border-radius: 28px; transition: transform .3s ease,border-color .3s ease,background .3s ease; }
.pack-card:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.65); }
.pack-poster { width: 100%; height: auto; aspect-ratio: 16/9; border-bottom: 1px solid var(--line); }
.pack-info { min-width: 0; padding: 20px 22px 24px; }
.pack-info h3 { font-size: 21px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; margin: 8px 0; }
.pack-info p { line-height: 1.45; }
.pack-card > b { display: none; }
.line-card { padding: 32px; }
blockquote { font-weight: 600; line-height: 1.18; }
.record-button { background: rgba(255,94,100,.86); border: 1px solid rgba(255,255,255,.3); box-shadow: 0 10px 28px rgba(170,30,60,.2); }
.record-status.ready { color: #91f7c6; }
.cinema-frame { border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 24px 70px rgba(0,0,0,.4); }
.cinema-overlay { background: rgba(8,12,24,.8); }
.premiere-mask { background:#0b101d; z-index:2; padding:24px; text-align:center; }
.premiere-mask strong { font-size:clamp(22px,4vw,36px); line-height:1.15; }
.premiere-mask span { max-width:340px; line-height:1.5; font-size:13px; }
#app.is-premiere { perspective:none; }
#app.is-premiere .flow-screen { animation:none; transform:none; }
#app.is-recording { perspective:none; }
#app.is-recording .line-card { backdrop-filter:none; -webkit-backdrop-filter:none; background:rgba(28,34,52,.72); }
#app.is-recording .flow-screen { transform:none; }
.sound-mixer { max-width: 100%; padding: 24px; }
.sound-mixer input { accent-color: #dce1ff; }
.sound-mixer label { color: var(--ink); font-size: 14px; }
.sound-mixer output { color: var(--muted); }
.premiere-ready { min-height: auto; padding: 52px 28px; margin-top: 56px; }
.toast { max-width: calc(100% - 32px); width: max-content; border-radius: 20px; background: rgba(22,28,44,.95); color: #fff; border: 1px solid var(--line); box-shadow: var(--glass-shadow); }
:is(button,a,input):focus-visible { outline: 3px solid #c8d5ff; outline-offset: 4px; }
.hero-panel, .feature-card { transition: transform .5s cubic-bezier(.16,1,.3,1); }
.hero-panel::after, .feature-card::after, .pack-card::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: radial-gradient(circle at var(--glare-x,50%) var(--glare-y,50%),rgba(255,255,255,.17),transparent 60%); opacity: var(--glare-opacity,0); transition: opacity .3s; }
@keyframes glass-float { from { transform: translate(0,0) scale(1); } to { transform: translate(70px,55px) scale(1.08); } }
@media (max-width: 640px) {
  .liquid-background { filter: blur(50px); }
  .blob-one { width: 360px; height: 360px; opacity: .5; }
  .blob-two { width: 460px; height: 460px; right: -260px; opacity: .65; }
  .blob-three { width: 350px; height: 350px; left: -100px; opacity: .5; }
  .topbar { width: calc(100% - 24px); margin-top: 12px; top: max(8px,env(safe-area-inset-top)); min-height: 56px; padding: 8px 14px; gap: 8px; }
  .brand { gap: 7px; font-size: 14px; }
  .brand-mark, .brand-logo { width: 32px; height: 32px; }
  .topbar-actions { gap: 6px; }
  .header-button { padding: 9px 11px; font-size: 12px; }
  #open-settings > span:last-child { display: none; }
  #open-settings { width: 44px; }
  #settings-dialog { padding: 22px 18px; }
  .mode-pill { display: block; font-size: 8px; letter-spacing: 0; }
  #app { width: calc(100% - 28px); }
  .hero { padding: 28px 0 40px; gap: 16px; }
  .hero-panel { padding: 42px 20px; border-radius: 28px; }
  .eyebrow { font-size: 9px; padding: 7px 10px; letter-spacing: .02em; }
  .hero-copy { font-size: 16px; }
  .telegram-entry { font-size: 13px; text-align: center; }
  .quick-facts { grid-template-columns: 1fr; gap: 14px; }
  .feature-card { border-radius: 24px; padding: 24px; }
  .flow-screen { padding: 30px 0 50px; }
  .form-card, .roles-card, .line-card { padding: 22px 18px; border-radius: 26px; }
  .pack-grid { grid-template-columns: 1fr; gap: 16px; }
  .pack-card { grid-template-columns: 1fr; gap: 0; }
  .pack-poster { height: auto; }
  .record-tools .secondary, .record-button { padding: 13px 17px; }
  .actions > button { padding: 14px 16px; font-size: 14px; }
  .sound-mixer { padding: 20px; border-radius: 24px; }
  .sound-mixer label { font-size: 13px; }
}
.role-choice { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:20px 12px; border-bottom:1px solid rgba(255,255,255,.12); }
.voice-timeline { margin:24px 0; padding:18px; border:1px solid rgba(255,255,255,.22); border-radius:18px; background:rgba(8,13,23,.65); }
.voice-track-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; color:var(--muted); font:12px/1.5 ui-monospace,SFMono-Regular,monospace; text-transform:uppercase; letter-spacing:.07em; }
.voice-track-state { font-weight:600; text-align:right; }
.voice-timeline.is-recording .voice-track-state { color:#ff9292; }
.voice-track-canvas { display:block; width:100%; height:142px; margin-top:14px; border:1px solid rgba(255,255,255,.14); border-radius:6px; }
.voice-track-help, .voice-track-duration { margin:12px 0 0; font-size:13px; line-height:1.5; color:var(--muted); }
.voice-track-duration { color:#dce9e3; }
.room-roster { margin:24px 0; padding:22px; border:1px solid var(--line); border-radius:26px; background:var(--surface); box-shadow:var(--glass-shadow); }
.room-roster-heading { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:18px; }
.room-roster-heading h3 { margin:0; font-size:18px; }
.room-roster-heading > span { color:var(--muted); font-size:13px; white-space:nowrap; }
.room-members { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.room-member { display:flex; align-items:flex-start; gap:12px; padding:18px; border-radius:18px; border:1px solid rgba(255,255,255,.16); background:rgba(255,255,255,.06); position:relative; min-width:0; }
.room-member > div:nth-child(2) { min-width:0; padding-bottom:26px; }
.member-avatar { flex:0 0 42px; height:42px; display:grid; place-items:center; background:rgba(165,181,255,.15); border-radius:50%; font-size:20px; color:#e3e8ff; }
.room-member strong { display:block; overflow-wrap:anywhere; }
.room-member strong small { font-weight:400; color:var(--muted); margin-left:6px; }
.room-member p { margin:7px 0; color:var(--muted); font-size:13px; overflow-wrap:anywhere; }
.member-status { color:#a0ebd2; font-size:12px; }
.member-tag { position:absolute; bottom:14px; left:72px; font-size:11px; color:var(--muted); }
.room-member.waiting { border-style:dashed; background:rgba(255,255,255,.025); }
.room-member.is-me { border-color:rgba(170,187,255,.42); }
.role-selection-title { margin:32px 0 16px; font-size:20px; }
#room-dialog { width:min(800px,calc(100% - 28px)); max-height:calc(100svh - 48px); overflow:auto; padding:28px; border:1px solid rgba(255,255,255,.35); border-radius:30px; background:rgba(20,23,37,.96); color:var(--ink); box-shadow:var(--glass-shadow); }
#room-dialog::backdrop { background:rgba(4,8,16,.7); backdrop-filter:blur(12px); }
.room-link-label { display:block; margin:20px 0 10px; color:var(--muted); font-size:13px; }
.room-link-input { width:100%; min-height:44px; background:rgba(255,255,255,.05); color:var(--ink); border:1px solid var(--line); border-radius:12px; padding:12px; font:inherit; font-size:13px; }
@media (max-width:640px) { .room-members { grid-template-columns:1fr; } .room-roster { padding:18px; } #room-dialog { padding:22px 18px; } .has-online-room .brand > span:last-child { display:none; } #open-room { font-size:12px; padding:10px; } .voice-timeline { padding:14px 10px; } .voice-track-heading { font-size:10px; letter-spacing:.025em; } }
#scenes-dialog, #next-scene-dialog { color:var(--ink); width:min(820px, calc(100% - 28px)); max-height:calc(100svh - 48px); overflow:auto; padding:28px; border:1px solid rgba(255,255,255,.35); border-radius:30px; background:rgba(20,23,37,.96); box-shadow:0 24px 80px rgba(0,0,0,.4); }
#scenes-dialog::backdrop, #next-scene-dialog::backdrop { background:rgba(4,8,16,.7); backdrop-filter:blur(12px); }
.saved-scene { display:grid; grid-template-columns:180px 1fr; gap:20px; margin-top:20px; padding:18px; border:1px solid rgba(255,255,255,.18); border-radius:24px; background:rgba(255,255,255,.05); }
.saved-scene img { width:100%; border-radius:14px; }
.saved-scene h3 { margin:0 0 8px; }
.saved-scene p { font-size:14px; color:var(--muted); }
.scene-expiry { font-size:12px!important; }
@media (max-width:640px) { .topbar { gap:8px; padding-left:14px; padding-right:14px; } .brand { gap:6px; } .brand > span:last-child { font-size:12px; } .topbar-actions { gap:6px; } #open-scenes { font-size:12px; padding:10px; } #logout-online { padding:10px; font-size:12px; } #scenes-dialog, #next-scene-dialog { padding:22px 18px; } .saved-scene { grid-template-columns:1fr; } }
.role-choice:last-child { border-bottom:0; }
.role-choice.selected { background:rgba(148,137,255,.12); border-radius:18px; }
.role-choice p { color:var(--muted); margin:8px 0; font-size:14px; }
.role-choice small { color:var(--muted); }
.role-choice button { flex-shrink:0; padding:12px 16px; font-size:14px; }
@media (max-width:480px) { .role-choice { align-items:stretch; flex-direction:column; } }
@media (hover:none), (pointer:coarse), (prefers-reduced-motion:reduce) {
  .blob { animation: none; }
  .hero-panel, .feature-card, .pack-card { transform: none !important; }
}
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
