* { box-sizing: border-box; }
:root { --bg: #0f1115; --card: #181b22; --line: #262a33; --text: #eef0f4; --muted: #9aa1ad; --accent: #4f7cff; --danger: #e5484d; --ok: #30a46c; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: 'Montserrat', sans-serif; font-size: 15px; }
a { color: var(--accent); text-decoration: none; }
.wrap { max-width: 880px; margin: 0 auto; padding: 24px 20px 60px; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.logo { font-weight: 700; font-size: 18px; color: var(--text); }
.logo span { color: var(--accent); }
.nav a { margin-left: 18px; color: var(--muted); font-weight: 500; }
.nav a.active, .nav a:hover { color: var(--text); }
h1 { font-size: 28px; margin: 24px 0 8px; }
h2 { font-size: 20px; margin: 28px 0 12px; }
.muted { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; }
.btn { display: inline-block; border: 0; border-radius: 10px; padding: 11px 18px; font: 600 14px 'Montserrat', sans-serif; cursor: pointer; background: var(--accent); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.danger { background: var(--danger); }
.btn.small { padding: 7px 12px; font-size: 13px; }
input[type=text], input[type=email], input[type=password] { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: #0b0d11; color: var(--text); font: 15px 'Montserrat', sans-serif; margin: 6px 0 14px; }
label { font-size: 13px; color: var(--muted); }
.error { background: rgba(229,72,77,.12); color: #ff8b8e; padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.link-box { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.link-box input { margin: 0; font-size: 13px; }
.hero { text-align: center; padding: 60px 0 30px; }
.hero h1 { font-size: 40px; }
.hero p { font-size: 18px; color: var(--muted); max-width: 560px; margin: 12px auto 28px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 30px; }
.auth { max-width: 400px; margin: 60px auto; }
table { width: 100%; border-collapse: collapse; }
td { padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.status { font-size: 12px; padding: 3px 8px; border-radius: 6px; background: var(--line); }
video.player { width: 100%; border-radius: 10px; background: #000; margin-top: 10px; }

/* комната */
body.room { overflow: hidden; }
.prejoin { max-width: 520px; margin: 40px auto; padding: 0 20px; }
.preview { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 14px; overflow: hidden; margin-bottom: 14px; }
.preview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.stage { position: fixed; inset: 0 0 76px 0; padding: 12px; display: grid; gap: 10px; align-content: center; }
.tile { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 16/9; border: 2px solid transparent; }
.tile.speaking { border-color: var(--ok); }
.tile video { width: 100%; height: 100%; object-fit: cover; }
.tile.local video { transform: scaleX(-1); }
.tile.screen video { object-fit: contain; transform: none; }
.tile .name { position: absolute; left: 10px; bottom: 8px; background: rgba(0,0,0,.6); padding: 4px 10px; border-radius: 8px; font-size: 13px; }
.tile .avatar { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 42px; font-weight: 700; color: var(--muted); }
.tile .mic-off { position: absolute; right: 10px; bottom: 8px; background: var(--danger); border-radius: 8px; padding: 3px 7px; font-size: 12px; }
.controls { position: fixed; left: 0; right: 0; bottom: 0; height: 76px; display: flex; gap: 10px; justify-content: center; align-items: center; background: var(--card); border-top: 1px solid var(--line); }
.controls .btn { min-width: 48px; }
.controls .btn.off { background: var(--danger); }
.rec-badge { position: fixed; top: 12px; left: 12px; background: var(--danger); padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 13px; display: none; z-index: 5; }
.toast { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); background: var(--card); border: 1px solid var(--line); padding: 10px 16px; border-radius: 10px; display: none; z-index: 6; }
@media (max-width: 640px) { .controls .label { display: none; } .hero h1 { font-size: 30px; } }
