:root {
    --font-main: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --bg: #070a12;
    --surface: #0d111c;
    --surface-2: #121827;
    --surface-3: #171f31;
    --text: #f7f4ff;
    --muted: #9aa3b8;
    --border: rgba(255, 255, 255, .08);
    --accent: #8b5cf6;
    --accent-2: #a78bfa;
    --accent-hover: #9f7aea;
    --accent-soft: rgba(139, 92, 246, .14);
    --danger: #ff2f57;
    --success: #23d18b;
    --shadow: 0 24px 80px rgba(0, 0, 0, .34);
    --radius-xl: 26px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --sidebar-width: 260px;
    color-scheme: dark;
}

html[data-theme="light"] {
    --bg: #f7f7fb;
    --surface: #ffffff;
    --surface-2: #f2f0f8;
    --surface-3: #ebe7f6;
    --text: #101321;
    --muted: #667085;
    --border: rgba(16, 19, 33, .10);
    --accent: #7c3aed;
    --accent-2: #6d28d9;
    --accent-hover: #8b5cf6;
    --accent-soft: rgba(124, 58, 237, .10);
    --shadow: 0 24px 80px rgba(16, 19, 33, .12);
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-main);
    background: var(--bg);
    color: var(--text);
}

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    grid-column: 1 / -1;
    height: 88px;
    display: grid;
    grid-template-columns: minmax(220px, 270px) max-content minmax(280px, 500px) max-content;
    align-items: center;
    column-gap: 24px;
    padding: 0 32px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 96%, #111827 4%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .14);
    backdrop-filter: blur(14px);
    overflow: visible;
}

.topbar > * {
    min-width: 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.brand img {
    display: block;
    height: 42px;
    width: auto;
    max-width: 100%;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    min-width: 0;
}

.main-nav a {
    position: relative;
    padding: 33px 0 29px;
    border-bottom: 0;
    color: var(--muted);
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.main-nav a.is-active,
.main-nav a:hover {
    color: var(--accent-2);
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 19px;
    height: 2px;
    border-radius: 999px;
    background: transparent;
}

.main-nav a.is-active::after,
.main-nav a:hover::after {
    background: var(--accent);
}

.search-bar {
    position: relative;
    width: 100%;
    max-width: 500px;
    min-width: 0;
    justify-self: end;
}

.search-bar svg {
    position: absolute;
    left: 20px;
    top: 50%;
    width: 22px;
    height: 22px;
    transform: translateY(-50%);
    fill: none;
    stroke: var(--muted);
    stroke-width: 2;
}

.search-bar input {
    width: 100%;
    height: 56px;
    padding: 0 18px 0 58px;
    border: 1px solid color-mix(in srgb, var(--border) 88%, var(--accent) 12%);
    border-radius: 14px;
    outline: 0;
    color: var(--text);
    background: color-mix(in srgb, var(--surface) 82%, var(--surface-2) 18%);
}

.search-bar input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.search-bar kbd {
    display: none;
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    min-width: max-content;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.theme-toggle,
.ghost-btn,
.primary-btn,
.outline-btn,
.premium-btn,
.wide-link,
.social-row a {
    border: 0;
    border-radius: 14px;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}

.theme-toggle:hover,
.ghost-btn:hover,
.primary-btn:hover,
.outline-btn:hover,
.premium-btn:hover,
.wide-link:hover,
.social-row a:hover {
    transform: translateY(-1px);
}

.theme-toggle,
.ghost-btn,
.outline-btn {
    border: 1px solid var(--border);
    color: var(--text);
    background: color-mix(in srgb, var(--surface) 88%, var(--surface-2) 12%);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
}

.primary-btn,
.premium-btn {
    color: #fff;
    background: var(--accent);
    box-shadow: none;
}

.primary-btn,
.ghost-btn,
.outline-btn,
.premium-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 22px;
    flex-shrink: 0;
}

.ghost-btn {
    min-width: 112px;
}

.primary-btn {
    min-width: 130px;
}

.primary-btn--large {
    min-height: 46px;
    padding-inline: 26px;
}

.premium-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 224px;
    flex: 0 0 auto;
    border: 1px solid color-mix(in srgb, var(--accent) 46%, var(--border));
    background: transparent;
    color: var(--accent-2);
    box-shadow: none;
}

.primary-btn:hover {
    background: var(--accent-hover);
}

.premium-btn:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.ghost-btn:hover,
.outline-btn:hover,
.theme-toggle:hover {
    border-color: color-mix(in srgb, var(--accent) 34%, var(--border));
    background: var(--surface-2);
}

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    font-weight: 800;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 4px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}

.mobile-menu span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
}

.sidebar {
    position: sticky;
    top: 88px;
    height: calc(100vh - 88px);
    padding: 22px 16px;
    border-right: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    overflow-y: auto;
}

.sidebar-section + .sidebar-section {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.sidebar-title {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.side-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    color: color-mix(in srgb, var(--text) 82%, var(--muted));
    font-size: 14px;
    font-weight: 700;
}

.side-link span {
    width: 24px;
    text-align: center;
}

.side-link i {
    width: 7px;
    height: 7px;
    margin-left: auto;
    border-radius: 999px;
    background: var(--accent-2);
}

.side-link.is-active,
.side-link:hover {
    color: var(--accent-2);
    background: var(--accent-soft);
}

.upgrade-card {
    margin-top: 26px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--surface) 88%, var(--accent-soft) 12%);
}

.upgrade-card span {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #fff;
    background: var(--accent);
    font-size: 12px;
    font-weight: 900;
}

.upgrade-card strong {
    display: block;
    margin-bottom: 8px;
}

.upgrade-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.content {
    min-width: 0;
    padding: 24px;
}

.notice {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-weight: 700;
}

.notice-warning {
    border: 1px solid rgba(255, 179, 71, .26);
    color: #ffbc6c;
    background: rgba(255, 179, 71, .12);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(350px, 1.25fr) minmax(280px, .95fr) minmax(300px, .72fr) minmax(250px, .58fr);
    gap: 18px;
    align-items: stretch;
}

.hero-card,
.hero-copy,
.chat-card,
.top-channels-card,
.stream-card,
.features-grid article,
.dashboard-card,
.modal-dialog {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: var(--shadow);
}

.hero-card {
    position: relative;
    min-height: 300px;
    overflow: hidden;
}

.stream-visual {
    position: relative;
    isolation: isolate;
    background:
        radial-gradient(circle at 18% 16%, rgba(255, 255, 255, .22), transparent 16%),
        radial-gradient(circle at 78% 20%, rgba(255, 47, 87, .26), transparent 18%),
        linear-gradient(135deg, #10162c, #10111e 42%, #2d124d);
}

.stream-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .85), transparent 78%);
}

.stream-visual::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(to top, rgba(0, 0, 0, .62), transparent);
}

.stream-visual--city { background: radial-gradient(circle at 50% 35%, rgba(255, 47, 87, .30), transparent 26%), linear-gradient(135deg, #081827, #151530 48%, #3b125e); }
.stream-visual--blue { background: radial-gradient(circle at 52% 35%, rgba(77, 166, 255, .36), transparent 28%), linear-gradient(135deg, #071a42, #1e2766, #48187e); }
.stream-visual--green { background: radial-gradient(circle at 40% 45%, rgba(66, 255, 184, .34), transparent 30%), linear-gradient(135deg, #071d18, #17263b, #1f4f39); }
.stream-visual--gray { background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .24), transparent 26%), linear-gradient(135deg, #111827, #2a303c, #19151f); }
.stream-visual--pink { background: radial-gradient(circle at 44% 38%, rgba(255, 83, 189, .35), transparent 26%), linear-gradient(135deg, #2b0e35, #241246, #681973); }
.stream-visual--sand { background: radial-gradient(circle at 50% 38%, rgba(255, 201, 121, .30), transparent 26%), linear-gradient(135deg, #33210c, #80562b, #e3b474); }

.live-badge,
.viewer-badge {
    position: absolute;
    z-index: 4;
    top: 16px;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 7px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.live-badge {
    left: 16px;
    background: var(--danger);
}

.viewer-badge {
    right: 16px;
    background: rgba(0, 0, 0, .65);
    text-transform: none;
}

.hero-art {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-orb {
    position: absolute;
    width: 210px;
    height: 210px;
    border-radius: 50%;
    filter: blur(28px);
    opacity: .55;
}

.hero-orb--one {
    left: 12%;
    top: 18%;
    background: #2d8bff;
}

.hero-orb--two {
    right: 8%;
    top: 24%;
    background: #f0227d;
}

.hero-character {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 108px;
    height: 220px;
    transform: translateX(-50%);
    border-radius: 56px 56px 14px 14px;
    background: linear-gradient(180deg, #1a1f2e, #05070f);
    box-shadow: 0 0 80px rgba(138, 53, 255, .44);
}

.hero-character::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -42px;
    width: 68px;
    height: 68px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: #121825;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 300px;
    padding: 26px;
    box-shadow: none;
}

.channel-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    background: var(--accent);
    font-weight: 900;
}

.avatar--small {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
    font-size: 13px;
}

.avatar--large {
    flex-basis: 72px;
    width: 72px;
    height: 72px;
    font-size: 28px;
}

.verified {
    color: var(--accent-2);
    font-weight: 900;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--muted);
    background: var(--surface-2);
    font-size: 12px;
    font-weight: 800;
}

.hero-copy h1 {
    margin: 18px 0 10px;
    font-size: clamp(29px, 2.1vw, 44px);
    line-height: 1.05;
}

.hero-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.chat-card,
.top-channels-card {
    display: flex;
    flex-direction: column;
    min-height: 300px;
    padding: 16px;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.panel-heading h2 {
    margin: 0;
    font-size: 15px;
    text-transform: uppercase;
}

.panel-heading button {
    border: 0;
    color: var(--muted);
    background: transparent;
}

.chat-list {
    flex: 1;
    display: grid;
    align-content: start;
    gap: 12px;
    overflow: hidden;
}

.chat-list p {
    margin: 0;
    color: var(--text);
    font-size: 14px;
    line-height: 1.45;
}

.chat-list b {
    color: var(--accent-2);
}

.chat-input {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 9px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
}

.chat-input input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.chat-input button {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: var(--accent);
}

.channel-list {
    display: grid;
    gap: 9px;
}

.channel-item {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 12px;
}

.channel-item:hover {
    background: var(--surface-2);
}

.channel-item strong,
.channel-item small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.channel-item strong {
    font-size: 13px;
}

.channel-item small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.channel-item em {
    color: var(--danger);
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
}

.channel-item em::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 5px;
    border-radius: 50%;
    background: var(--danger);
    vertical-align: middle;
}

.wide-link {
    display: flex;
    justify-content: center;
    margin-top: auto;
    padding: 12px 14px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    font-size: 14px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin: 34px 0 16px;
}

.section-heading span {
    color: var(--accent-2);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.section-heading h2 {
    margin: 5px 0 0;
    font-size: clamp(22px, 2vw, 32px);
}

.section-heading a {
    color: var(--accent-2);
    font-weight: 900;
}

.stream-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(170px, 1fr));
    gap: 16px;
}

.stream-card {
    overflow: hidden;
    box-shadow: none;
}

.stream-thumb {
    height: 112px;
    border-radius: 0 0 16px 16px;
    overflow: hidden;
}

.stream-thumb .live-badge,
.stream-thumb .viewer-badge {
    top: 10px;
    min-height: 23px;
    padding-inline: 8px;
    font-size: 10px;
}

.stream-thumb .live-badge { left: 10px; }
.stream-thumb .viewer-badge { right: 10px; }

.stream-card h3 {
    margin: 13px 12px 4px;
    font-size: 14px;
    line-height: 1.35;
}

.stream-card p {
    margin: 0 12px 8px;
    color: var(--muted);
    font-size: 13px;
}

.stream-card .tag-row {
    padding: 0 12px 14px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 34px;
}

.features-grid article {
    padding: 22px;
    box-shadow: none;
}

.features-grid span {
    display: inline-flex;
    margin-bottom: 18px;
    color: var(--accent-2);
    font-size: 13px;
    font-weight: 900;
}

.features-grid h2 {
    margin: 0 0 10px;
    font-size: 20px;
}

.features-grid p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    place-items: center;
    padding: 18px;
}

.modal.is-open {
    display: grid;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .68);
    backdrop-filter: blur(12px);
}

.modal-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 460px);
    padding: 28px;
}

.modal-close {
    position: absolute;
    right: 14px;
    top: 14px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    background: var(--surface-2);
    font-size: 24px;
    line-height: 1;
}

.modal-logo,
.dashboard-logo {
    height: 42px;
    width: auto;
}

.modal-dialog h2 {
    margin: 20px 0 8px;
    font-size: 28px;
}

.modal-dialog p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.55;
}

.social-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}

.social-row a {
    display: flex;
    justify-content: center;
    padding: 13px;
    border: 1px solid var(--border);
    background: var(--surface-2);
}

.auth-form {
    display: grid;
    gap: 12px;
}

.auth-form label {
    display: grid;
    gap: 7px;
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
}

.auth-form input:not([type="checkbox"]) {
    width: 100%;
    min-height: 46px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 11px;
    outline: 0;
    color: var(--text);
    background: var(--surface-2);
}

.auth-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.check-label {
    display: flex !important;
    grid-template-columns: none;
    align-items: flex-start;
    gap: 10px !important;
    color: var(--muted) !important;
    font-weight: 700 !important;
}

.check-label input {
    margin-top: 3px;
}

.form-message {
    min-height: 20px;
    margin: 0 !important;
    font-size: 13px;
    font-weight: 800;
}

.form-message.is-error { color: #ff6d8a; }
.form-message.is-success { color: var(--success); }

.switch-modal {
    width: 100%;
    margin-top: 12px;
    border: 0;
    color: var(--accent-2);
    background: transparent;
    font-weight: 900;
}

.dashboard-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 22px;
    background: var(--bg);
}

.dashboard-card {
    width: min(100%, 620px);
    padding: 34px;
    text-align: center;
}

.dashboard-card .avatar {
    margin: 28px auto 16px;
}

.dashboard-card h1 {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 44px);
}

.dashboard-card p {
    margin: 0 auto 24px;
    max-width: 520px;
    color: var(--muted);
    line-height: 1.7;
}

.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.logout-form {
    margin: 0;
}

@media (max-width: 1640px) {
    .topbar {
        grid-template-columns: minmax(190px, 235px) max-content minmax(240px, 420px) max-content;
        column-gap: 18px;
        padding-inline: 24px;
    }

    .brand img {
        height: 40px;
    }

    .main-nav {
        gap: 22px;
    }

    .search-bar {
        max-width: 420px;
        min-width: 0;
    }

    .primary-btn,
    .ghost-btn,
    .outline-btn,
    .premium-btn {
        padding-inline: 16px;
    }

    .premium-btn {
        min-width: 214px;
    }
}

@media (max-width: 1280px) {
    .topbar {
        grid-template-columns: minmax(170px, 220px) minmax(240px, 1fr) max-content;
    }

    .main-nav {
        display: none;
    }

    .search-bar {
        max-width: none;
        justify-self: stretch;
    }
}

@media (max-width: 1500px) {
    .hero-grid {
        grid-template-columns: minmax(330px, 1.1fr) minmax(270px, .9fr) minmax(290px, .72fr);
    }

    .top-channels-card {
        grid-column: 1 / -1;
    }

    .channel-list {
        grid-template-columns: repeat(4, 1fr);
    }

    .stream-grid {
        grid-template-columns: repeat(4, minmax(170px, 1fr));
    }
}

@media (max-width: 1180px) {
    .topbar {
        grid-template-columns: minmax(165px, 210px) minmax(220px, 1fr) max-content;
        column-gap: 14px;
    }

    .main-nav {
        display: none;
    }

    .premium-btn {
        display: none;
    }

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

    .chat-card,
    .top-channels-card {
        grid-column: auto;
    }

    .channel-list {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 900px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    grid-column: 1 / -1;
    height: 88px;
    display: grid;
    grid-template-columns: minmax(220px, 270px) max-content minmax(280px, 500px) max-content;
    align-items: center;
    column-gap: 24px;
    padding: 0 32px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 96%, #111827 4%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .14);
    backdrop-filter: blur(14px);
    overflow: visible;
}

@media (max-width: 560px) {
    .topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    min-width: max-content;
    flex-wrap: nowrap;
    white-space: nowrap;
}


/* WooStream V2/V3/V4 Big Pack */
.topbar {
    grid-template-columns: minmax(220px,270px) max-content minmax(280px,500px) max-content !important;
    overflow: visible !important;
}
.search-bar {
    max-width: 500px !important;
    min-width: 0 !important;
    justify-self: end !important;
}
.topbar-actions {
    min-width: max-content !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
}
.premium-btn {
    min-width: 214px !important;
    flex: 0 0 auto !important;
}
.search-results{position:absolute;left:0;right:0;top:calc(100% + 10px);z-index:80;padding:10px;border:1px solid var(--border);border-radius:16px;background:var(--surface);box-shadow:var(--shadow)}
.search-results a,.search-results p{display:grid;grid-template-columns:80px 1fr;gap:10px;padding:10px 12px;border-radius:12px;color:var(--text)}
.search-results a:hover{background:var(--surface-2)}
.search-results span{color:var(--muted);font-size:12px;text-transform:uppercase}
.creator-hero,.channel-public-hero,.empty-state-card,.player-card,.settings-card,.table-card{border:1px solid var(--border);border-radius:var(--radius-xl);background:var(--surface);box-shadow:var(--shadow)}
.creator-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:24px;padding:32px}
.creator-hero span,.section-heading span{color:var(--accent-2);font-weight:850}
.creator-hero h1{margin:8px 0 10px;font-size:clamp(32px,4vw,58px);letter-spacing:-.04em}
.creator-hero p{max-width:760px;color:var(--muted);line-height:1.7}
.settings-grid{display:grid;grid-template-columns:1.15fr .95fr .7fr;gap:18px;margin-bottom:26px}
.settings-card{padding:24px}
.settings-card form{display:grid;gap:14px}
.settings-card label{display:grid;gap:7px;color:var(--muted);font-weight:700}
.settings-card input,.settings-card textarea,.settings-card select{width:100%;border:1px solid var(--border);border-radius:12px;padding:13px 14px;color:var(--text);background:var(--surface-2);outline:0}
.settings-card code{display:block;overflow-x:auto;margin:8px 0 18px;padding:12px;border:1px solid var(--border);border-radius:12px;color:var(--accent-2);background:var(--bg)}
.money{display:block;margin-bottom:18px;font-size:32px}
.table-card{overflow-x:auto;padding:20px}
.table-card table{width:100%;border-collapse:collapse}
.table-card th,.table-card td{padding:13px 12px;border-bottom:1px solid var(--border);text-align:left}
.channel-public-hero{overflow:hidden;margin-bottom:24px}
.channel-banner{height:180px;background:radial-gradient(circle at 20% 20%,var(--accent-soft),transparent 32%),linear-gradient(135deg,var(--surface-2),var(--surface))}
.channel-public-row{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:20px;padding:24px}
.avatar--large{width:84px;height:84px;font-size:30px}
.live-dot{display:inline-flex;align-items:center;gap:6px;color:var(--muted);font-weight:850}
.live-dot:before{content:"";width:9px;height:9px;border-radius:50%;background:var(--muted)}
.live-dot.is-online:before{background:#22c55e}
.watch-layout{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:18px}
.player-card{padding:18px}
.video-player{position:relative;display:grid;place-items:center;min-height:520px;overflow:hidden;border-radius:20px;background:radial-gradient(circle at 30% 20%,rgba(124,60,255,.2),transparent 35%),#050711}
.video-player video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.player-placeholder{position:relative;z-index:2;text-align:center;color:#fff}
.player-placeholder strong{display:block;margin-bottom:8px;font-size:28px}
.stream-meta-row{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:18px}
.empty-state-card{padding:32px;color:var(--muted)}
.plan-card{padding:24px}
.plan-card strong{display:block;margin:18px 0;font-size:26px}
@media(max-width:1640px){.topbar{grid-template-columns:minmax(190px,235px) max-content minmax(240px,420px) max-content !important}.search-bar{max-width:420px !important}.premium-btn{min-width:214px !important}}
@media(max-width:1280px){.topbar{grid-template-columns:minmax(170px,220px) minmax(240px,1fr) max-content !important}.main-nav{display:none}.search-bar{max-width:none !important;justify-self:stretch !important}.watch-layout,.settings-grid{grid-template-columns:1fr}}
@media(max-width:1180px){.premium-btn{display:none !important}}
@media(max-width:900px){.creator-hero,.channel-public-row,.stream-meta-row{grid-template-columns:1fr;align-items:start}.video-player{min-height:280px}}
