@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

:root{
    --bg:#f6f7fb;
    --ink:#101827;
    --muted:#6b7280;
    --card:#ffffff;
    --line:#e5e7eb;
    --blue:#2563eb;
    --dark:#0f172a;
    --green:#16a34a;
    --red:#ef4444;
    --shadow:0 18px 50px rgba(15,23,42,.12);
    --radius:26px;
}
*{box-sizing:border-box}
html{height:100%;-webkit-text-size-adjust:100%}
body{
    margin:0;
    min-height:100%;
    font-family:Inter,system-ui,-apple-system,Segoe UI,Arial,sans-serif;
    background:var(--bg);
    color:var(--ink);
}
a{color:var(--blue);text-decoration:none}
button,input{font:inherit}
.authbg{
    background:
        radial-gradient(circle at 12% 8%, rgba(37,99,235,.35), transparent 32%),
        radial-gradient(circle at 85% 20%, rgba(14,165,233,.26), transparent 28%),
        linear-gradient(135deg,#0f172a 0%,#111827 45%,#1e293b 100%);
}
.auth{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:20px}
.card,.sheet,.roomcard,.emptycard{
    background:rgba(255,255,255,.92);
    border:1px solid rgba(226,232,240,.9);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
}
.glass{
    background:rgba(255,255,255,.82);
    backdrop-filter:blur(18px);
}
.authcard{
    width:min(440px,100%);
    padding:24px;
}
.brandrow{display:flex;gap:14px;align-items:center;margin-bottom:18px}
.brandmark{
    width:54px;height:54px;border-radius:18px;
    display:grid;place-items:center;
    background:linear-gradient(135deg,#2563eb,#06b6d4);
    color:#fff;font-size:24px;
    box-shadow:0 12px 24px rgba(37,99,235,.28);
}
.authcard h1,.mobilehero h1,.roomhero h1{margin:0;font-size:28px;letter-spacing:-.04em}
.authcard p,.mobilehero p,.roomhero p{margin:4px 0 0;color:var(--muted)}
.stack{display:grid;gap:9px}
label{font-weight:700;font-size:13px;color:#334155}
input{
    width:100%;
    border:1px solid var(--line);
    background:#fff;
    border-radius:17px;
    padding:14px 15px;
    outline:none;
}
input:focus{border-color:var(--blue);box-shadow:0 0 0 4px rgba(37,99,235,.12)}
.btn{
    border:0;
    border-radius:17px;
    padding:14px 18px;
    background:linear-gradient(135deg,#2563eb,#1d4ed8);
    color:#fff;
    font-weight:800;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    cursor:pointer;
    box-shadow:0 12px 26px rgba(37,99,235,.22);
}
.btn:disabled{opacity:.55;cursor:not-allowed}
.btn.full{width:100%;margin-top:8px}
.btn.ghost{
    background:#eef2ff;
    color:#1d4ed8;
    box-shadow:none;
}
.center{text-align:center}.smalltext{font-size:14px}
.alert,.success{
    margin:14px 0;
    padding:13px 15px;
    border-radius:18px;
    font-weight:700;
}
.alert{background:#fee2e2;color:#991b1b}
.success{background:#dcfce7;color:#166534}
.codebox{background:#f8fafc;border:1px solid var(--line);border-radius:18px;padding:14px;margin:16px 0;font-family:ui-monospace,monospace}

.app,.roomapp{
    width:min(1120px,100%);
    margin:0 auto;
    padding:16px 16px calc(94px + env(safe-area-inset-bottom));
}
.mobilehero,.roomhero{
    border-radius:0 0 34px 34px;
    margin:-16px -16px 18px;
    padding:calc(20px + env(safe-area-inset-top)) 18px 24px;
    background:
        radial-gradient(circle at 85% 15%, rgba(56,189,248,.32), transparent 30%),
        linear-gradient(135deg,#0f172a,#1e3a8a);
    color:#fff;
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:16px;
    box-shadow:0 22px 60px rgba(15,23,42,.25);
}
.mobilehero p,.roomhero p{color:#dbeafe}
.eyebrow{
    display:inline-flex;
    color:#bfdbfe;
    font-size:12px;
    font-weight:800;
    letter-spacing:.12em;
    text-transform:uppercase;
    margin-bottom:6px;
}
.circlebtn{
    min-width:48px;height:48px;border-radius:18px;
    display:grid;place-items:center;
    color:#fff;background:rgba(255,255,255,.16);
    border:1px solid rgba(255,255,255,.24);
    font-weight:800;
}
.circlebtn.subtle{font-size:32px;line-height:1}
.sheet{padding:18px;margin:14px 0}
.sheet h2{margin:0 0 12px;font-size:20px;letter-spacing:-.03em}
.createbar{display:grid;grid-template-columns:1fr auto;gap:10px}
.hint{font-size:13px;color:var(--muted);margin-top:10px}
.sectiontitle{
    display:flex;justify-content:space-between;align-items:center;
    margin:22px 2px 12px;
}
.sectiontitle h2{margin:0;font-size:22px;letter-spacing:-.04em}
.sectiontitle span{color:var(--muted);font-weight:700}
.sectiontitle.compact{margin:0 0 12px}
.groupgrid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:14px;
}
.roomcard{padding:16px;overflow:hidden}
.roomtop{display:flex;gap:13px;align-items:center}
.roomicon{
    width:52px;height:52px;border-radius:18px;
    display:grid;place-items:center;
    background:#eff6ff;font-size:24px;
}
.roommeta h3{margin:0;font-size:17px;letter-spacing:-.03em}
.roommeta p{margin:4px 0 0;color:var(--muted);font-size:13px}
.roommeta b{color:var(--green)}
.roomactions{display:flex;gap:10px;margin-top:16px}
.roomactions .btn{flex:1}
.qrpreview{
    margin-top:14px;
    display:flex;gap:10px;align-items:center;
    background:#f8fafc;border-radius:18px;padding:10px;
    color:var(--muted);font-weight:700;font-size:13px;
}
.qrpreview img{width:64px;height:64px;border-radius:12px;background:#fff}
.emptycard{padding:18px;color:var(--muted);text-align:center}
.bottomnav{
    position:fixed;
    left:50%;
    bottom:calc(12px + env(safe-area-inset-bottom));
    transform:translateX(-50%);
    width:min(520px,calc(100% - 24px));
    background:rgba(15,23,42,.92);
    color:#fff;
    border:1px solid rgba(255,255,255,.12);
    backdrop-filter:blur(18px);
    border-radius:24px;
    display:flex;
    justify-content:space-around;
    padding:10px;
    box-shadow:0 24px 60px rgba(15,23,42,.35);
    z-index:50;
}
.bottomnav a{
    color:#cbd5e1;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:3px;
    font-size:18px;
    min-width:70px;
    padding:8px 10px;
    border-radius:18px;
}
.bottomnav span{font-size:11px;font-weight:800}
.bottomnav a.active{background:#2563eb;color:#fff}

.roombody{
    background:
        radial-gradient(circle at 50% 0%, rgba(37,99,235,.18), transparent 30%),
        #f6f7fb;
}
.roomhero{align-items:center}
.livepanel{
    margin-top:-4px;
    padding:24px 18px;
    border-radius:34px;
    color:#fff;
    text-align:center;
    background:
        radial-gradient(circle at 50% 35%, rgba(34,197,94,.25), transparent 26%),
        linear-gradient(135deg,#111827,#0f172a);
    box-shadow:var(--shadow);
}
.livepanel h2{margin:14px 0 4px;font-size:28px;letter-spacing:-.04em}
.livepanel p{margin:0;color:#bfdbfe;font-weight:800}
.pulsewrap{position:relative;width:112px;height:112px;margin:0 auto;display:grid;place-items:center}
.pulse{
    position:absolute;width:94px;height:94px;border-radius:999px;background:rgba(37,99,235,.25);
    animation:pulse 1.8s infinite ease-out;
}
.connected .pulse{background:rgba(22,163,74,.28)}
.muted .pulse{background:rgba(239,68,68,.24)}
.micicon{
    width:82px;height:82px;border-radius:30px;
    display:grid;place-items:center;
    font-size:36px;
    background:linear-gradient(135deg,#2563eb,#06b6d4);
    box-shadow:0 18px 42px rgba(37,99,235,.34);
    z-index:2;
}
@keyframes pulse{
    0%{transform:scale(.85);opacity:.9}
    100%{transform:scale(1.38);opacity:0}
}
.people{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
    gap:10px;
}
.person{
    display:flex;align-items:center;gap:10px;
    border:1px solid var(--line);
    background:#fff;
    border-radius:20px;
    padding:12px;
}
.avatar{
    width:40px;height:40px;border-radius:15px;
    display:grid;place-items:center;
    background:#eff6ff;color:#1d4ed8;font-weight:900;
}
.person b{display:block;font-size:14px}
.person span{display:block;font-size:12px;color:var(--green);font-weight:800}
.person.me{border-color:#bfdbfe;background:#eff6ff}
.qrmini{display:flex;gap:14px;align-items:center}
.qrmini img{width:116px;height:116px;border-radius:18px;background:#fff}
.qrmini p{margin:0;color:var(--muted)}
.audioBox{
    display:flex;align-items:center;justify-content:space-between;gap:12px;
    border:1px solid var(--line);
    border-radius:20px;
    padding:12px;
    margin:10px 0;
    background:#fff;
}
.audioBox b{font-size:14px}
.audioBox span{color:var(--muted);font-size:12px}
audio{width:230px;max-width:100%}
.debug{margin-top:10px;color:var(--muted)}
.log{max-height:150px;overflow:auto;background:#f8fafc;border-radius:16px;padding:10px;font-size:12px;margin-top:8px}
.callbar{
    position:fixed;
    left:50%;
    bottom:calc(12px + env(safe-area-inset-bottom));
    transform:translateX(-50%);
    width:min(540px,calc(100% - 24px));
    background:rgba(15,23,42,.94);
    border:1px solid rgba(255,255,255,.12);
    backdrop-filter:blur(18px);
    border-radius:30px;
    padding:10px;
    display:grid;
    grid-template-columns:1fr 1.2fr 1fr;
    gap:8px;
    box-shadow:0 24px 60px rgba(15,23,42,.35);
    z-index:80;
}
.callbtn{
    border:0;
    border-radius:22px;
    padding:12px 8px;
    color:#fff;
    font-weight:900;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    gap:3px;
    font-size:20px;
}
.callbtn span{font-size:11px}
.callbtn.mute{background:#334155}
.callbtn.connect{background:#2563eb}
.callbtn.end{background:#dc2626}
.adminCreate{
    display:grid;
    grid-template-columns:1fr 110px 90px auto;
    gap:10px;
}
.tablewrap{overflow:auto;border-radius:18px;border:1px solid var(--line)}
table{width:100%;border-collapse:collapse;background:#fff;font-size:14px}
th,td{padding:12px;border-bottom:1px solid var(--line);text-align:left;white-space:nowrap}
th{background:#f8fafc;color:#475569;font-size:12px;text-transform:uppercase;letter-spacing:.06em}
.inline{display:inline}
.smallbtn{
    border:0;border-radius:12px;padding:8px 10px;font-weight:800;color:#fff;background:#2563eb;
}
.smallbtn.danger{background:#dc2626}
@media(max-width:760px){
    .auth{align-items:flex-end;padding:14px}
    .authcard{border-radius:30px;padding:22px}
    .createbar,.adminCreate{grid-template-columns:1fr}
    .mobilehero h1,.roomhero h1{font-size:25px}
    .groupgrid{grid-template-columns:1fr}
    .roomapp,.app{padding-left:14px;padding-right:14px}
    .roomhero,.mobilehero{margin-left:-14px;margin-right:-14px}
    .qrmini{display:block;text-align:center}
    .qrmini img{margin-bottom:10px}
    .audioBox{display:block}
    .audioBox audio{margin-top:10px}
}


.noMargin{margin-top:0!important;margin-bottom:12px!important}
.joinSheet{border:1px solid rgba(37,99,235,.14);background:linear-gradient(180deg,#ffffff,#eef6ff)}
.joincodebar{display:grid;grid-template-columns:1fr auto;gap:10px}
.inviteCodeBox{margin:14px 0 0;padding:14px;border-radius:20px;background:#0f172a;color:#fff;display:flex;align-items:center;justify-content:space-between;gap:12px}
.inviteCodeBox span{font-size:12px;color:#bfdbfe;font-weight:800;text-transform:uppercase;letter-spacing:.08em}
.inviteCodeBox strong{font-size:24px;letter-spacing:.14em;font-weight:950}
.inviteCodeLarge{font-size:42px;font-weight:950;letter-spacing:.18em;text-align:center;background:#0f172a;color:#fff;border-radius:26px;padding:24px 12px;box-shadow:0 18px 45px rgba(15,23,42,.22);user-select:all;cursor:pointer}
.codepill{background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.24);color:#fff;border-radius:999px;padding:10px 13px;font-weight:950;letter-spacing:.12em;white-space:nowrap}
.powered{text-align:center;color:#64748b;font-size:12px;font-weight:800;margin:18px 0 92px}.powered b{color:#0f172a}.auth .powered{margin:18px 0 0}.roomPowered{margin:12px 0 110px;color:#94a3b8}.roomPowered b{color:#fff}
@media(max-width:760px){.joincodebar{grid-template-columns:1fr}.inviteCodeLarge{font-size:34px}.inviteCodeBox{display:block;text-align:center}.inviteCodeBox strong{display:block;margin-top:8px}.codepill{display:inline-block;margin-top:10px}.powered{margin-bottom:100px}}
