:root {
    --bg: #090b10;
    --bg-soft: #0e1118;
    --panel: #121620;
    --panel-raised: #171c29;
    --panel-hover: #1c2231;
    --border: #252c3d;
    --border-soft: rgba(255, 255, 255, 0.07);
    --text: #f2f4fa;
    --muted: #9199ad;
    --muted-strong: #b6bdcf;
    --accent: #a970ff;
    --accent-strong: #8b4dff;
    --accent-soft: rgba(169, 112, 255, 0.14);
    --green: #3ddc97;
    --green-soft: rgba(61, 220, 151, 0.13);
    --blue: #64a8ff;
    --blue-soft: rgba(100, 168, 255, 0.13);
    --violet: #b58cff;
    --violet-soft: rgba(181, 140, 255, 0.14);
    --cyan: #56d9e8;
    --cyan-soft: rgba(86, 217, 232, 0.13);
    --red: #ff6b7d;
    --red-soft: rgba(255, 107, 125, 0.13);
    --slate: #9aa4bb;
    --slate-soft: rgba(154, 164, 187, 0.12);
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    --radius: 18px;
    --radius-sm: 12px;
    --font: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    color-scheme: dark;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(1000px 600px at 8% -10%, rgba(139, 77, 255, 0.18), transparent 55%),
        radial-gradient(800px 500px at 95% 0%, rgba(61, 220, 151, 0.08), transparent 50%),
        var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: #fff;
}

img,
svg {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

::selection {
    color: #fff;
    background: var(--accent);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.container {
    width: min(1220px, calc(100% - 48px));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(9, 11, 16, 0.78);
    backdrop-filter: blur(18px);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 70px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand__mark {
    position: relative;
    display: grid;
    width: 35px;
    height: 35px;
    place-items: center;
    border: 1px solid rgba(169, 112, 255, 0.45);
    border-radius: 11px;
    background: linear-gradient(145deg, rgba(169, 112, 255, 0.3), rgba(169, 112, 255, 0.08));
    box-shadow: inset 0 0 24px rgba(169, 112, 255, 0.13);
}

.brand__mark::before {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 14px var(--accent);
    content: "";
}

.brand__mark::after {
    position: absolute;
    inset: 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 7px;
    content: "";
}

.brand__text {
    font-size: 16px;
    line-height: 1.1;
}

.brand__text span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-nav__link {
    padding: 9px 13px;
    border-radius: 9px;
    color: var(--muted-strong);
    font-size: 13px;
    font-weight: 600;
    transition: 0.18s ease;
}

.site-nav__link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.site-nav__link--accent {
    color: var(--text);
    border: 1px solid var(--border);
    background: var(--panel);
}

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 107, 125, 0.24);
    border-radius: 999px;
    color: #ffb3bd;
    background: var(--red-soft);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.live-dot {
    position: relative;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 0 4px rgba(255, 107, 125, 0.12);
}

.live-dot::after {
    position: absolute;
    inset: -4px;
    border: 1px solid var(--red);
    border-radius: 50%;
    content: "";
    animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
    0% {
        opacity: 0.7;
        transform: scale(0.6);
    }
    70%,
    100% {
        opacity: 0;
        transform: scale(1.6);
    }
}

.main {
    padding: 54px 0 78px;
}

.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
    gap: 35px;
    align-items: end;
    padding: 12px 0 38px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eyebrow::before {
    width: 24px;
    height: 1px;
    background: var(--accent);
    content: "";
}

.hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    font-weight: 800;
    letter-spacing: -0.055em;
    line-height: 0.98;
}

.hero h1 em {
    color: transparent;
    background: linear-gradient(100deg, #d8c4ff 0%, var(--accent) 50%, #7ee8c4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    font-style: normal;
}

.hero__copy {
    max-width: 590px;
    margin: 20px 0 0;
    color: var(--muted-strong);
    font-size: 16px;
}

.hero__aside {
    display: grid;
    gap: 12px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(150deg, rgba(23, 28, 41, 0.92), rgba(13, 16, 24, 0.85));
    box-shadow: var(--shadow);
}

.hero-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-soft);
}

.hero-stat:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.hero-stat__label {
    color: var(--muted);
    font-size: 12px;
}

.hero-stat__value {
    font-family: var(--mono);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.hero-stats-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(18, 22, 32, 0.8);
    font-size: 11px;
    font-weight: 600;
}

.stat-chip b {
    color: var(--text);
    font-family: var(--mono);
}

.section {
    padding: 38px 0 0;
}

.section__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.section__head h2 {
    margin: 0;
    font-size: 24px;
    letter-spacing: -0.035em;
}

.section__head p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.section__label {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.grid {
    display: grid;
    gap: 16px;
}

.grid--streamers {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--recordings {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(160deg, rgba(23, 28, 41, 0.9), rgba(14, 17, 24, 0.92));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.streamer-card {
    position: relative;
    overflow: hidden;
    padding: 19px;
    transition: 0.2s ease;
}

.streamer-card:hover {
    border-color: rgba(169, 112, 255, 0.4);
    transform: translateY(-2px);
}

.streamer-card--live {
    border-color: rgba(255, 107, 125, 0.3);
}

.streamer-card--live::after {
    position: absolute;
    top: -45px;
    right: -45px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 107, 125, 0.16), transparent 68%);
    content: "";
    pointer-events: none;
}

.streamer-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.avatar {
    display: grid;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(169, 112, 255, 0.35);
    border-radius: 13px;
    color: #e6d8ff;
    background: linear-gradient(135deg, rgba(169, 112, 255, 0.3), rgba(169, 112, 255, 0.07));
    font-family: var(--mono);
    font-size: 16px;
    font-weight: 800;
}

.avatar--live {
    border-color: rgba(255, 107, 125, 0.45);
    color: #ffd4d9;
    background: linear-gradient(135deg, rgba(255, 107, 125, 0.28), rgba(255, 107, 125, 0.06));
}

.streamer-card__identity {
    min-width: 0;
    flex: 1;
}

.streamer-card__name {
    overflow: hidden;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.streamer-card__login {
    overflow: hidden;
    margin: 1px 0 0;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.streamer-card__meta {
    display: grid;
    gap: 7px;
    margin-top: 17px;
}

.streamer-card__title {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--muted-strong);
    font-size: 13px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.streamer-card__game {
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
}

.streamer-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding-top: 13px;
    border-top: 1px solid var(--border-soft);
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 600;
    transition: color 0.18s ease;
}

.text-link:hover {
    color: var(--accent);
}

.text-link--accent {
    color: var(--accent);
}

.recording-card {
    display: flex;
    min-height: 245px;
    flex-direction: column;
    overflow: hidden;
    padding: 19px;
}

.recording-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.recording-card__channel {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.recording-card__channel .avatar {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    font-size: 11px;
}

.recording-card__channel-name {
    overflow: hidden;
    color: var(--muted-strong);
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recording-card__title {
    display: -webkit-box;
    overflow: hidden;
    margin: 17px 0 7px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.38;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.recording-card__game {
    color: var(--muted);
    font-size: 11px;
}

.recording-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 13px;
    margin-top: 13px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 10px;
}

.recording-card__meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.recording-card__body {
    margin-top: auto;
    padding-top: 16px;
}

.recording-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.parts-links {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: max-content;
    padding: 5px 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge::before {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.badge--green {
    border-color: rgba(61, 220, 151, 0.2);
    color: var(--green);
    background: var(--green-soft);
}

.badge--blue {
    border-color: rgba(100, 168, 255, 0.2);
    color: var(--blue);
    background: var(--blue-soft);
}

.badge--violet {
    border-color: rgba(181, 140, 255, 0.2);
    color: var(--violet);
    background: var(--violet-soft);
}

.badge--cyan {
    border-color: rgba(86, 217, 232, 0.2);
    color: var(--cyan);
    background: var(--cyan-soft);
}

.badge--amber {
    border-color: rgba(245, 182, 92, 0.22);
    color: #f5b65c;
    background: rgba(245, 182, 92, 0.12);
}

.badge--red {
    border-color: rgba(255, 107, 125, 0.2);
    color: var(--red);
    background: var(--red-soft);
}

.badge--slate {
    border-color: rgba(154, 164, 187, 0.18);
    color: var(--slate);
    background: var(--slate-soft);
}

.badge--live {
    border-color: rgba(255, 107, 125, 0.2);
    color: var(--red);
    background: var(--red-soft);
}

.progress {
    width: 100%;
}

.progress__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 10px;
}

.progress__value {
    color: var(--muted-strong);
    font-family: var(--mono);
    font-size: 9px;
    white-space: nowrap;
}

.progress__track {
    position: relative;
    height: 5px;
    overflow: hidden;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.07);
}

.progress__bar {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent-strong), var(--accent));
    transition: width 0.45s ease;
}

.progress__bar--blue {
    background: linear-gradient(90deg, #387adf, var(--blue));
}

.progress__bar--violet {
    background: linear-gradient(90deg, #7c4bea, var(--violet));
}

.progress__bar--cyan {
    background: linear-gradient(90deg, #269aaa, var(--cyan));
}

.progress__bar--amber {
    background: linear-gradient(90deg, #c88a34, #f5b65c);
}

.progress__bar--indeterminate {
    width: 38% !important;
    animation: indeterminate 1.4s ease-in-out infinite;
}

@keyframes indeterminate {
    0% {
        transform: translateX(-110%);
    }
    100% {
        transform: translateX(350%);
    }
}

.hero__live {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 8px 13px;
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--text);
    background: var(--panel-raised);
    font-size: 12px;
    font-weight: 700;
    transition: 0.18s ease;
    white-space: nowrap;
}

.button:hover {
    border-color: #3a4358;
    background: var(--panel-hover);
    color: #fff;
    transform: translateY(-1px);
}

.button--primary {
    border-color: rgba(169, 112, 255, 0.55);
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 7px 22px rgba(139, 77, 255, 0.24);
}

.button--primary:hover {
    border-color: var(--accent);
    background: linear-gradient(135deg, #b984ff, #9256ff);
}

.button--ghost {
    border-color: transparent;
    color: var(--muted-strong);
    background: transparent;
}

.button--ghost:hover {
    border-color: var(--border);
    background: var(--panel);
}

.button--small {
    min-height: 29px;
    padding: 5px 9px;
    font-size: 10px;
}

.button--danger {
    border-color: rgba(255, 107, 125, 0.25);
    color: #ffb0b9;
    background: var(--red-soft);
}

.button--danger:hover {
    border-color: rgba(255, 107, 125, 0.5);
    background: rgba(255, 107, 125, 0.2);
}

.button--success {
    border-color: rgba(61, 220, 151, 0.3);
    color: #8af1c4;
    background: var(--green-soft);
}

.button[disabled] {
    cursor: not-allowed;
    opacity: 0.45;
    transform: none;
}

.icon {
    width: 13px;
    height: 13px;
    flex: 0 0 auto;
}

.empty {
    padding: 46px 24px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--muted);
    text-align: center;
    background: rgba(18, 22, 32, 0.45);
}

.empty__title {
    margin: 0 0 6px;
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
}

.empty p {
    margin: 0;
    font-size: 13px;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--muted-strong);
    background: var(--panel);
    font-size: 13px;
}

.alert--success {
    border-color: rgba(61, 220, 151, 0.28);
    color: #a9f5d3;
    background: var(--green-soft);
}

.alert--error {
    border-color: rgba(255, 107, 125, 0.28);
    color: #ffc0c7;
    background: var(--red-soft);
}

.alert__icon {
    flex: 0 0 auto;
    margin-top: 1px;
    font-family: var(--mono);
    font-weight: 800;
}

.alert ul {
    margin: 0;
    padding-left: 17px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 26px;
    color: var(--muted);
    font-size: 12px;
}

.pagination__pages {
    display: flex;
    align-items: center;
    gap: 9px;
}

.pagination__link {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 11px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted-strong);
    background: var(--panel);
    font-size: 11px;
    font-weight: 600;
}

.pagination__link:hover {
    border-color: var(--accent);
    color: var(--text);
}

.pagination__link--disabled {
    pointer-events: none;
    opacity: 0.35;
}

.site-footer {
    border-top: 1px solid var(--border-soft);
    padding: 25px 0;
    color: var(--muted);
    font-size: 11px;
}

.site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-footer__meta {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.refresh-hint {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.refresh-hint__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
}

/* Public streamer page */
.channel-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 27px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        linear-gradient(120deg, rgba(169, 112, 255, 0.12), transparent 55%),
        var(--panel);
}

.channel-hero .avatar {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    font-size: 25px;
}

.channel-hero__body {
    min-width: 0;
    flex: 1;
}

.channel-hero h1 {
    margin: 0;
    font-size: clamp(24px, 4vw, 36px);
    letter-spacing: -0.04em;
}

.channel-hero__login {
    margin: 2px 0 0;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 11px;
}

.channel-hero__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Authentication */
.auth-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 30px;
}

.auth-card {
    width: min(430px, 100%);
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(24, 29, 43, 0.97), rgba(13, 16, 24, 0.96));
    box-shadow: var(--shadow);
}

.auth-card .brand {
    margin-bottom: 26px;
}

.auth-card h1 {
    margin: 0;
    font-size: 28px;
    letter-spacing: -0.04em;
}

.auth-card__subtitle {
    margin: 7px 0 24px;
    color: var(--muted);
    font-size: 13px;
}

.auth-card__back {
    display: inline-flex;
    margin-top: 20px;
    color: var(--muted);
    font-size: 11px;
}

/* Forms */
.form {
    display: grid;
    gap: 17px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.field {
    display: grid;
    gap: 6px;
}

.field--full {
    grid-column: 1 / -1;
}

.field label {
    color: var(--muted-strong);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field select,
.field textarea {
    width: 100%;
    min-height: 41px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--text);
    background: #0d1017;
    outline: none;
    transition: 0.18s ease;
}

.field textarea {
    min-height: 90px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(169, 112, 255, 0.13);
}

.field small,
.field__hint {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.field__error {
    color: var(--red);
    font-size: 11px;
}

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(13, 16, 23, 0.55);
}

.checkbox input {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: var(--accent);
}

.checkbox span {
    color: var(--muted-strong);
    font-size: 12px;
}

.checkbox small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.mode-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mode-options .checkbox {
    cursor: pointer;
}

.mode-options input[type="radio"] {
    accent-color: var(--accent);
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-top: 4px;
}

/* Admin shell */
.admin-shell {
    display: grid;
    grid-template-columns: 235px minmax(0, 1fr);
    min-height: 100vh;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    height: 100vh;
    flex-direction: column;
    padding: 22px 15px;
    border-right: 1px solid var(--border-soft);
    background: rgba(10, 12, 18, 0.92);
}

.admin-sidebar .brand {
    padding: 2px 9px 24px;
}

.admin-nav {
    display: grid;
    gap: 4px;
}

.admin-nav__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    transition: 0.16s ease;
}

.admin-nav__link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.admin-nav__link--active {
    border-color: rgba(169, 112, 255, 0.2);
    color: var(--text);
    background: var(--accent-soft);
}

.admin-nav__icon {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 11px;
}

.admin-nav__link--active .admin-nav__icon {
    color: var(--accent);
}

.admin-sidebar__bottom {
    display: grid;
    gap: 12px;
    margin-top: auto;
    padding: 16px 9px 2px;
    border-top: 1px solid var(--border-soft);
}

.admin-user {
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-user b {
    display: block;
    overflow: hidden;
    color: var(--muted-strong);
    font-size: 11px;
    text-overflow: ellipsis;
}

.admin-main {
    min-width: 0;
    padding: 28px 34px 60px;
}

.admin-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.admin-topbar h1 {
    margin: 0;
    font-size: 28px;
    letter-spacing: -0.04em;
}

.admin-topbar p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.stat-card {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: linear-gradient(150deg, var(--panel-raised), var(--panel));
}

.stat-card__label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
}

.stat-card__value {
    margin-top: 5px;
    font-family: var(--mono);
    font-size: 27px;
    font-weight: 700;
    letter-spacing: -0.06em;
}

.stat-card__hint {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
}

.stat-card--accent {
    border-color: rgba(169, 112, 255, 0.28);
    background: linear-gradient(150deg, rgba(169, 112, 255, 0.16), rgba(18, 22, 32, 0.9));
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
    gap: 16px;
    align-items: start;
}

.panel {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--panel);
}

.panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-soft);
}

.panel__head h2 {
    margin: 0;
    font-size: 13px;
    letter-spacing: -0.01em;
}

.panel__head p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 10px;
}

.panel__body {
    padding: 16px;
}

.health-list {
    display: grid;
    gap: 0;
}

.health-item {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border-soft);
}

.health-item:first-child {
    padding-top: 0;
}

.health-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.health-item__dot {
    display: grid;
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    margin-top: 2px;
    place-items: center;
    border-radius: 50%;
    font-family: var(--mono);
    font-size: 8px;
    font-weight: 800;
}

.health-item__dot--ok {
    color: var(--green);
    background: var(--green-soft);
}

.health-item__dot--error {
    color: var(--red);
    background: var(--red-soft);
}

.health-item b {
    display: block;
    color: var(--muted-strong);
    font-size: 11px;
}

.health-item small {
    display: block;
    margin-top: 1px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.4;
}

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.table th {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-soft);
    color: var(--muted-strong);
    vertical-align: middle;
}

.table tr:last-child td {
    border-bottom: 0;
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.018);
}

.table__title {
    display: block;
    max-width: 320px;
    overflow: hidden;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table__sub {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 9px;
}

.table__actions {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.inline-form {
    display: inline;
}

.table-progress {
    min-width: 125px;
}

.status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.error-box {
    margin-top: 7px;
    padding: 9px 10px;
    border: 1px solid rgba(255, 107, 125, 0.2);
    border-radius: 8px;
    color: #ffb3bc;
    background: rgba(255, 107, 125, 0.07);
    font-family: var(--mono);
    font-size: 9px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

details.error-details summary {
    cursor: pointer;
    color: var(--red);
    font-size: 10px;
    font-weight: 600;
}

.filters {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--panel);
}

.filters .field {
    min-width: 180px;
}

.filters .field label {
    font-size: 9px;
}

.filters .field select {
    min-height: 34px;
    padding: 6px 9px;
    font-size: 11px;
}

.muted {
    color: var(--muted);
}

.mono {
    font-family: var(--mono);
}

.nowrap {
    white-space: nowrap;
}

.stack {
    display: grid;
    gap: 10px;
}

.boot-note {
    margin-bottom: 16px;
    padding: 11px 14px;
    border: 1px solid rgba(100, 168, 255, 0.22);
    border-radius: 10px;
    color: #b8d5ff;
    background: var(--blue-soft);
    font-size: 11px;
}

.boot-note code {
    padding: 1px 4px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.25);
    font-family: var(--mono);
    font-size: 10px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

@media (max-width: 1050px) {
    .grid--streamers,
    .grid--recordings {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 24px;
        align-items: start;
    }

    .hero__aside {
        max-width: 480px;
    }

    .admin-shell {
        display: block;
    }

    .admin-sidebar {
        position: static;
        display: block;
        height: auto;
        padding: 14px 18px;
        border-right: 0;
        border-bottom: 1px solid var(--border-soft);
    }

    .admin-sidebar .brand {
        padding: 0 0 12px;
    }

    .admin-nav {
        display: flex;
        overflow-x: auto;
        gap: 5px;
        padding-bottom: 2px;
    }

    .admin-nav__link {
        flex: 0 0 auto;
        padding: 7px 9px;
    }

    .admin-sidebar__bottom {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-top: 10px;
        padding: 10px 0 0;
    }

    .admin-main {
        padding: 22px 18px 50px;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 28px, 1220px);
    }

    .site-header__inner {
        min-height: 60px;
    }

    .site-nav__link {
        padding: 7px 8px;
        font-size: 11px;
    }

    .site-nav__link--hide-mobile {
        display: none;
    }

    .brand__text span {
        display: none;
    }

    .main {
        padding: 34px 0 55px;
    }

    .grid--streamers,
    .grid--recordings {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-bottom: 24px;
    }

    .hero h1 {
        font-size: 41px;
    }

    .hero__copy {
        font-size: 14px;
    }

    .section__head {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .recording-card {
        min-height: 0;
    }

    .channel-hero {
        align-items: flex-start;
        flex-direction: column;
        padding: 20px;
    }

    .channel-hero__actions {
        width: 100%;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .mode-options {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .admin-topbar {
        flex-direction: column;
    }

    .admin-actions {
        width: 100%;
    }

    .filters {
        align-items: stretch;
        flex-direction: column;
    }

    .filters .field {
        width: 100%;
    }

    .pagination {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-footer__inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .auth-page {
        padding: 14px;
    }

    .auth-card {
        padding: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
