:root {
    --bg: #08111f;
    --panel: rgba(15, 25, 43, .88);
    --panel2: rgba(18, 31, 53, .72);
    --line: rgba(148, 163, 184, .16);
    --text: #e9f3ff;
    --muted: #91a3bd;
    --brand: #20d7b5;
    --brand2: #38bdf8;
    --danger: #fb7185;
    --warning: #fbbf24;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(32, 215, 181, .16), transparent 34rem),
        radial-gradient(circle at top right, rgba(56, 189, 248, .14), transparent 32rem),
        linear-gradient(135deg, #060b14, #0b1526 42%, #101827);
    font-family: Manrope, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
}

a { color: inherit; text-decoration: none; }
.auth-shell, .install-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 30px;
}
.card {
    width: min(1040px, 100%);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 26px;
    box-shadow: 0 28px 80px rgba(0,0,0,.35);
    backdrop-filter: blur(18px);
}
.narrow { width: min(460px, 100%); }
h1, h2, h3 { margin: 0 0 14px; line-height: 1.1; }
p { color: var(--muted); line-height: 1.65; }
.layout { display: grid; grid-template-columns: 270px 1fr; min-height: 100vh; }
.sidebar {
    padding: 22px;
    border-right: 1px solid var(--line);
    background: rgba(5, 10, 20, .52);
    position: sticky;
    top: 0;
    height: 100vh;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    font-weight: 900;
    letter-spacing: -.03em;
    font-size: 22px;
}
.brand::before {
    content: '';
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), var(--brand2));
    box-shadow: 0 12px 24px rgba(32, 215, 181, .2);
}
.nav { display: grid; gap: 8px; }
.nav a {
    padding: 12px 14px;
    border-radius: 16px;
    color: var(--muted);
    font-weight: 800;
}
.nav a:hover, .nav a.active {
    color: var(--text);
    background: rgba(255,255,255,.07);
}
.main { padding: 28px; }
.topbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 22px;
}
.grid { display: grid; gap: 18px; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat, .panel {
    background: var(--panel2);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 20px;
}
.stat strong { display: block; font-size: 32px; margin-top: 8px; }
.muted { color: var(--muted); }
label { display: grid; gap: 7px; color: #bed0e8; font-weight: 800; font-size: 13px; margin-bottom: 12px; }
input, textarea, select {
    width: 100%;
    border: 1px solid rgba(148,163,184,.22);
    background: rgba(2,6,23,.42);
    color: var(--text);
    border-radius: 14px;
    padding: 12px 13px;
    outline: none;
}
textarea { min-height: 180px; resize: vertical; }
button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 14px;
    padding: 11px 15px;
    color: #031019;
    background: linear-gradient(135deg, var(--brand), var(--brand2));
    font-weight: 900;
    cursor: pointer;
}
.btn.secondary, button.secondary { color: var(--text); background: rgba(255,255,255,.08); border: 1px solid var(--line); }
.btn.danger, button.danger { color: #fff; background: linear-gradient(135deg, #ef4444, #be123c); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 10px; border-bottom: 1px solid rgba(148,163,184,.12); text-align: left; vertical-align: top; }
th { color: #9bb0ca; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.flash { padding: 12px 14px; border-radius: 16px; margin: 0 0 16px; background: rgba(32, 215, 181, .13); border: 1px solid rgba(32, 215, 181, .24); }
.error { background: rgba(251, 113, 133, .13); border-color: rgba(251, 113, 133, .24); }
.player-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.player-wrap { width: min(1100px, 100%); }
.player-card { background: #000; border-radius: 26px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 90px rgba(0,0,0,.45); }
video { width: 100%; display: block; background: #000; }
.embed { padding: 0; background: #000; }
.embed .player-wrap, .embed .player-card { width: 100%; height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
.embed video { height: 100vh; object-fit: contain; }
.copy-input { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
@media (max-width: 920px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .main { padding: 18px; }
    .stats { grid-template-columns: 1fr; }
}

