
:root {
  --bg-dark: #08111b;
  --bg-panel: rgba(12, 20, 32, 0.88);
  --bg-panel-2: rgba(9, 16, 27, 0.95);
  --accent: #00d8ff;
  --accent-2: #21b8ff;
  --text-main: #eef7ff;
  --text-soft: #9fb8cc;
  --border: rgba(0, 216, 255, 0.18);
  --ok: #78f5b0;
  --bad: #ff7f96;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Arial, sans-serif; background: radial-gradient(circle at top, #0b1c2f, #08111b 55%); color: var(--text-main); }
body.login-page { background: url('/static/bg.png') center center / cover no-repeat fixed; }
a { color: var(--accent); text-decoration: none; }
.container { max-width: 1360px; margin: 0 auto; padding: 2rem; }
.topbar { display:flex; justify-content:space-between; align-items:center; padding:1rem 1.5rem; background: rgba(4,10,18,.9); border-bottom:1px solid var(--border); position:sticky; top:0; z-index:20; }
.topbar nav { display:flex; gap:1rem; }
.brand { display:flex; align-items:center; gap:.75rem; color:var(--text-main); font-weight:700; }
.brand img { height:38px; }
.card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 20px; padding: 1.2rem; box-shadow: 0 0 40px rgba(0,0,0,.18); }
.narrow { max-width: 520px; margin: 2rem auto; }
.page-header { display:flex; justify-content:space-between; align-items:center; gap:1rem; margin-bottom:1.25rem; }
.button, button { border:0; border-radius:14px; padding:.85rem 1.15rem; cursor:pointer; font-weight:700; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color:#03111a; }
.button.secondary, button.secondary { background: rgba(255,255,255,.06); color: var(--text-main); border:1px solid var(--border); }
.form-grid { display:grid; gap:1rem; }
label { display:grid; gap:.35rem; color:var(--text-soft); }
input, textarea, select { width:100%; padding:.9rem 1rem; border-radius:14px; border:1px solid var(--border); background: rgba(0,0,0,.25); color:var(--text-main); }
textarea { min-height: 120px; }
.flash { padding: .9rem 1rem; border-radius: 12px; margin-bottom: 1rem; }
.flash.success { background:#173726; color:#a9f3c7; }
.flash.error { background:#3c1920; color:#ffc1cf; }
.login-wrap { min-height: calc(100vh - 96px); display:grid; place-items:center; }
.login-card { width:min(480px, 92vw); padding:2rem; border-radius:26px; background: rgba(8, 17, 27, .74); border:1px solid var(--border); backdrop-filter: blur(14px); }
.login-logo { width: 100%; max-width: 240px; display:block; margin:0 auto 1rem; }
.login-links { margin-top: 1rem; text-align:center; }
.muted { color:var(--text-soft); }
.stream-table { width:100%; border-collapse: collapse; }
.stream-table th, .stream-table td { padding:.85rem .75rem; border-bottom:1px solid rgba(255,255,255,.08); text-align:left; vertical-align:middle; }
.space-top { margin-top: 1rem; }
.detail-layout { display:grid; grid-template-columns:1.45fr .75fr; gap:1rem; }
.lower-gap { margin-top: 1rem; }
.streamer-layout-fixed { display:grid; grid-template-columns:1.45fr .75fr; gap:1rem; }
.panel-head { display:flex; justify-content:space-between; align-items:center; gap:1rem; margin-bottom:1rem; }
.video-frame { background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.08); border-radius:16px; padding:.5rem; overflow:hidden; }
.video-frame video { width:100%; display:block; border-radius:12px; min-height:320px; background:#000; }
.video-frame.large video { min-height:430px; }
.stats-grid { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:.75rem; }
.compact-top { margin-top:1rem; }
.mini-stat { background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.06); border-radius:14px; padding:.8rem; }
.mini-stat span { display:block; opacity:.72; font-size:.85rem; margin-bottom:.2rem; }
.badge { display:inline-flex; align-items:center; justify-content:center; padding:.35rem .75rem; border-radius:999px; font-weight:700; }
.badge.live { background:#183d27; color:var(--ok); }
.badge.offline { background:#3c1d24; color:var(--bad); }
.stack-actions { display:grid; gap:.75rem; margin-top:1rem; }
.chat-frame { width:100%; min-height:720px; border:none; border-radius:12px; background:#0b0f16; }
@media (max-width:1100px) { .detail-layout, .streamer-layout-fixed { grid-template-columns:1fr; } .stats-grid { grid-template-columns:1fr 1fr; } }
@media (max-width:700px) { .container { padding: 1rem; } .page-header, .topbar { display:grid; grid-template-columns:1fr; } .stats-grid { grid-template-columns:1fr; } }
