:root {
    --bg-0: #0d0d0f;
    --bg-1: #131317;
    --bg-2: #1a1a1f;
    --bg-3: #22222a;
    --bg-4: #2c2c35;
    --border: #2e2e36;
    --border-strong: #3a3a45;
    --text-0: #ffffff;
    --text-1: #e8e8ec;
    --text-2: #a8a8b3;
    --text-3: #6f6f7a;
    --accent: #ffffff;
    --live: #f5f5f7;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.25);
    --radius: 10px;
    --radius-lg: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    background: var(--bg-0);
    color: var(--text-1);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

#kategorien {
    scroll-margin-top: 76px;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

input {
    font-family: inherit;
    border: none;
    outline: none;
    background: none;
    color: inherit;
}

/* ─── Topbar ─────────────────────────────── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 60px;
    background: var(--bg-1);
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 20px;
    gap: 20px;
    backdrop-filter: blur(20px);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.topbar-center {
    display: flex;
    justify-content: center;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.logo-mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #a8a8b3 100%);
    color: var(--bg-0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
}

.logo-mark.small {
    width: 22px;
    height: 22px;
    font-size: 12px;
    border-radius: 6px;
}

.logo-text {
    color: var(--text-0);
}

.logo-big .logo-text {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.06em;
    background: linear-gradient(180deg, #ffffff 0%, #b8b8c0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 24px rgba(255,255,255,0.08);
}

.logo-tagline {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-left: 6px;
    align-self: center;
    padding-top: 4px;
    white-space: nowrap;
}

.topnav {
    display: flex;
    gap: 4px;
}

.topnav-link {
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 500;
    color: var(--text-2);
    transition: all 0.15s ease;
}

.topnav-link:hover {
    color: var(--text-0);
    background: var(--bg-3);
}

.topnav-link.active {
    color: var(--text-0);
    background: var(--bg-3);
}

.search {
    width: 440px;
    height: 38px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 10px;
    transition: border-color 0.15s ease;
}

.search:focus-within {
    border-color: var(--border-strong);
    background: var(--bg-3);
}

.search-icon {
    color: var(--text-3);
    flex-shrink: 0;
}

.search input {
    flex: 1;
    font-size: 14px;
    color: var(--text-1);
}

.search input::placeholder {
    color: var(--text-3);
}

.search-shortcut {
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 4px;
    background: var(--bg-3);
    color: var(--text-3);
    border: 1px solid var(--border);
}

.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.15s ease;
}

.icon-btn:hover {
    color: var(--text-0);
    background: var(--bg-3);
}

.icon-btn .dot {
    position: absolute;
    top: 8px;
    right: 9px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-0);
    border: 2px solid var(--bg-1);
}

.discord-btn {
    text-decoration: none;
    color: var(--text-2);
}

.discord-btn:hover {
    color: #5865F2;
}

.discord-btn-anchor {
    position: relative;
}

.discord-tip {
    position: absolute;
    top: 50%;
    right: calc(100% + 12px);
    transform: translateY(-50%) translateX(8px);
    background: linear-gradient(135deg, #5865F2 0%, #4752c4 100%);
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.16,1,0.3,1);
    box-shadow: 0 8px 24px rgba(88,101,242,0.35);
    z-index: 200;
    letter-spacing: 0.01em;
}

.discord-tip.show {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.discord-tip-arrow {
    position: absolute;
    top: 50%;
    right: -5px;
    transform: translateY(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #5865F2 0%, #4752c4 100%);
}

.ghost-btn {
    height: 36px;
    padding: 0 14px;
    border-radius: 8px;
    color: var(--text-1);
    font-weight: 500;
    transition: background 0.15s ease;
}

.ghost-btn:hover {
    background: var(--bg-3);
}

.primary-btn {
    height: 36px;
    padding: 0 16px;
    border-radius: 8px;
    background: var(--text-0);
    color: var(--bg-0);
    font-weight: 600;
    transition: transform 0.1s ease, opacity 0.15s ease;
}

.primary-btn:hover {
    opacity: 0.9;
}

.primary-btn:active {
    transform: scale(0.97);
}

.avatar-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a4a55 0%, #2a2a35 100%);
    color: var(--text-0);
    font-weight: 600;
    margin-left: 4px;
    transition: outline 0.15s ease;
    outline: 2px solid transparent;
    overflow: hidden;
    padding: 0;
}

.avatar-btn:hover {
    outline-color: var(--border-strong);
}

.avatar-btn-img {
    background: var(--bg-2);
}

.avatar-btn-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ─── User Drawer ────────────────────────── */
.user-drawer-wrap {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
}

.user-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: auto;
}

.user-drawer-wrap.open .user-drawer-backdrop {
    opacity: 1;
}

.user-drawer {
    position: absolute;
    top: 0;
    right: 0;
    height: 100vh;
    width: 380px;
    max-width: 100vw;
    background: var(--bg-1);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
    overflow: hidden;
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
}

.user-drawer-wrap.open .user-drawer {
    transform: translateX(0);
}

.user-drawer-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.25;
    filter: blur(40px) saturate(0.4);
    pointer-events: none;
    z-index: 0;
}

.user-drawer-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(19,19,23,0.3) 0%, var(--bg-1) 100%);
}

.user-drawer-head {
    position: relative;
    z-index: 1;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-drawer-id {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-drawer-mark {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #b8b8c0 100%);
    color: var(--bg-0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-drawer-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-0);
    letter-spacing: 0.04em;
}

.user-drawer-close {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: var(--text-1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.user-drawer-close:hover {
    background: var(--bg-3);
}

.user-drawer-level {
    position: relative;
    z-index: 1;
    padding: 0 20px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--border);
}

.user-drawer-level-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-0);
    flex-shrink: 0;
}

.user-drawer-progress {
    flex: 1;
    position: relative;
    height: 26px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-drawer-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, #3a3a45 0%, #5a5a65 100%);
    border-radius: 999px;
}

.user-drawer-progress-text {
    position: relative;
    z-index: 1;
    font-size: 12px;
    color: var(--text-1);
    font-weight: 500;
}

.user-drawer-stars {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-1);
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.user-drawer-menu {
    position: relative;
    z-index: 1;
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    display: flex;
    flex-direction: column;
}

.user-drawer-item {
    padding: 14px 22px;
    color: var(--text-1);
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
    text-decoration: none;
    width: 100%;
}

.user-drawer-item:hover {
    background: var(--bg-3);
    color: var(--text-0);
}

.user-drawer-logout {
    margin-top: auto;
    border-top: 1px solid var(--border);
    color: var(--text-2);
}

.user-drawer-logout:hover {
    color: var(--text-0);
}

@media (max-width: 480px) {
    .user-drawer {
        width: 100vw;
    }
    .user-drawer-name {
        font-size: 16px;
    }
    .user-drawer-level {
        flex-wrap: wrap;
        gap: 10px;
    }
    .user-drawer-progress {
        flex-basis: 100%;
        order: 3;
    }
    .user-drawer-item {
        padding: 13px 18px;
        font-size: 14px;
    }
}

/* ─── Ankündigungen ─────────────────────── */
.announce-wrap .announce-drawer {
    width: 460px;
}

.announce-head {
    position: relative;
    z-index: 1;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.announce-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-0);
    letter-spacing: -0.01em;
}

.announce-note {
    position: relative;
    z-index: 1;
    padding: 14px 22px 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-1);
}

.announce-list {
    position: relative;
    z-index: 1;
    flex: 1;
    overflow-y: auto;
    padding: 8px 14px 22px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.announce-row {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 12px;
    padding: 12px 8px;
    border-radius: 10px;
    align-items: flex-start;
}

.announce-row:hover {
    background: var(--bg-2);
}

.announce-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    margin-top: 2px;
}

.announce-content {
    min-width: 0;
}

.announce-sender {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-0);
    letter-spacing: 0.01em;
    line-height: 1.2;
}

.announce-date {
    font-size: 12px;
    color: var(--text-3);
    font-weight: 500;
    margin-top: 2px;
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
}

.announce-row-msg {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.announce-text {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 13px;
    color: var(--text-1);
    font-weight: 500;
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.announce-open {
    background: var(--text-0);
    color: var(--bg-0);
    border: none;
    padding: 7px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: opacity 0.15s ease;
    flex-shrink: 0;
}

.announce-open:hover {
    opacity: 0.88;
}

@media (max-width: 480px) {
    .announce-wrap .announce-drawer {
        width: 100vw;
    }
    .announce-row {
        grid-template-columns: 32px 1fr;
        padding: 10px 6px;
    }
    .announce-avatar {
        width: 32px;
        height: 32px;
    }
    .announce-text {
        font-size: 12px;
    }
    .announce-open {
        padding: 6px 11px;
        font-size: 12px;
    }
    .announce-row-msg {
        gap: 6px;
    }
}

/* ─── Codes Drawer ───────────────────────── */
.codes-wrap .codes-drawer {
    width: 460px;
}

.codes-head {
    position: relative;
    z-index: 1;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.codes-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-0);
}

.codes-tabs {
    position: relative;
    z-index: 1;
    padding: 0 22px 18px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border);
}

.codes-tab {
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--bg-3);
    color: var(--text-2);
    font-weight: 700;
    font-size: 13px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.15s ease;
}

.codes-tab:hover {
    background: var(--bg-4);
    color: var(--text-0);
}

.codes-tab.active {
    background: var(--text-0);
    color: var(--bg-0);
    border-color: var(--text-0);
}

.codes-info {
    position: relative;
    z-index: 1;
    padding: 20px 22px;
    border-bottom: 1px solid var(--border);
}

.codes-info-text {
    font-size: 14px;
    color: var(--text-1);
    line-height: 1.55;
    margin-bottom: 14px;
}

.codes-link-btn {
    height: 38px;
    padding: 0 16px;
    background: var(--text-0);
    color: var(--bg-0);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.codes-link-btn:hover {
    opacity: 0.9;
}

.codes-empty {
    position: relative;
    z-index: 1;
    padding: 32px 22px;
    color: var(--text-3);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 480px) {
    .codes-wrap .codes-drawer {
        width: 100vw;
    }
}

/* ─── Layout ─────────────────────────────── */
.layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: calc(100vh - 60px);
}

/* ─── Sidebar ────────────────────────────── */
.sidebar {
    background: var(--bg-1);
    border-right: 1px solid var(--border);
    padding: 20px 12px;
    overflow-y: auto;
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    align-self: start;
}

.sidebar-section {
    margin-bottom: 18px;
}

.sidebar-title {
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-3);
    letter-spacing: 0.08em;
    padding: 0 8px 8px;
}

.sidebar-title-live {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.sidebar-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #ff8888;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.sidebar-live-badge .live-indicator {
    width: 10px;
    height: 10px;
}

.sidebar-live-badge .live-indicator-dot {
    inset: 2px;
}

.channel-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.channel {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 9px;
    align-items: center;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    color: inherit;
    text-decoration: none;
}

.channel:hover {
    background: var(--bg-3);
}

.channel-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.channel-meta {
    min-width: 0;
}

.channel-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-game {
    font-size: 12px;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel.offline .channel-avatar {
    opacity: 0.4;
}

.channel.offline .channel-name {
    color: var(--text-3);
}

.channel-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-2);
    font-variant-numeric: tabular-nums;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff3b3b;
    box-shadow: 0 0 0 0 rgba(255, 59, 59, 0.7);
    animation: livePulse 1.6s ease-out infinite;
    flex-shrink: 0;
}

@keyframes livePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 59, 59, 0.7);
        transform: scale(1);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(255, 59, 59, 0);
        transform: scale(1);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 59, 59, 0);
        transform: scale(1);
    }
}

.viewer-count {
    font-weight: 500;
}

.hidden-extra {
    display: none;
}

#moreChannelsList.expanded .hidden-extra {
    display: list-item;
}

.show-more-channels {
    width: calc(100% - 16px);
    margin: 6px 8px 0;
    padding: 8px 10px;
    background: var(--bg-2);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.show-more-channels:hover {
    background: var(--bg-3);
    color: var(--text-0);
    border-color: var(--border-strong);
}

.collapse-btn {
    position: absolute;
    bottom: 16px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--bg-3);
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.collapse-btn:hover {
    background: var(--bg-4);
    color: var(--text-0);
}

/* ─── Content ────────────────────────────── */
.content {
    padding: 24px 32px 60px;
    max-width: 1600px;
}

/* ─── Hero ───────────────────────────────── */
.hero {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 28px;
    margin-bottom: 40px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease;
}

.hero:hover {
    border-color: var(--border-strong);
}

.hero-thumb-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-thumb .live-badge,
.hero-thumb .hero-viewers,
.hero-thumb .play-btn,
.hero-thumb .hero-overlay {
    z-index: 2;
}

.hero-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background:
        radial-gradient(circle at 30% 20%, #3a3a45 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, #4a4a55 0%, transparent 50%),
        linear-gradient(135deg, #1a1a1f 0%, #2a2a35 100%);
    overflow: hidden;
    cursor: pointer;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.5) 100%);
}

.hero-noise {
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.015) 2px, rgba(255,255,255,0.015) 4px);
    pointer-events: none;
}

.live-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--text-0);
    color: var(--bg-0);
    padding: 4px 10px 4px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
}

.live-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bg-0);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.hero-viewers {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    color: var(--text-0);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    font-variant-numeric: tabular-nums;
}

.play-btn {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.play-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    color: var(--bg-0);
    transform: scale(1.05);
}

.play-btn svg {
    margin-left: 4px;
}

.hero-meta {
    padding: 32px 32px 32px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}

.hero-tag {
    display: inline-block;
    width: fit-content;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-3);
    letter-spacing: 0.1em;
}

.hero-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-0);
}

.hero-streamer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

.streamer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.streamer-name {
    font-weight: 600;
    color: var(--text-0);
    font-size: 15px;
}

.streamer-game {
    font-size: 13px;
    color: var(--text-2);
}

.follow-btn {
    margin-left: auto;
    height: 36px;
    padding: 0 14px;
    border-radius: 8px;
    background: var(--text-0);
    color: var(--bg-0);
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.15s ease, transform 0.1s ease;
}

.follow-btn:hover {
    opacity: 0.9;
}

.follow-btn:active {
    transform: scale(0.97);
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.tag {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--bg-3);
    color: var(--text-2);
    font-weight: 500;
    border: 1px solid var(--border);
}

/* ─── Sections ───────────────────────────── */
.section {
    margin-bottom: 40px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-0);
    letter-spacing: -0.01em;
}

.section-title-live {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title-upcoming {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-1);
}

.upcoming-icon {
    color: var(--text-2);
    display: inline-flex;
}

.live-indicator {
    position: relative;
    width: 14px;
    height: 14px;
    display: inline-block;
}

.live-indicator-dot {
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: #ff3b3b;
    box-shadow: 0 0 12px rgba(255, 59, 59, 0.8);
    z-index: 2;
}

.live-indicator-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid #ff3b3b;
    animation: liveRing 1.8s ease-out infinite;
    opacity: 0.7;
}

@keyframes liveRing {
    0% {
        transform: scale(0.6);
        opacity: 0.9;
    }
    80% {
        transform: scale(1.8);
        opacity: 0;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

.live-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-2);
    background: var(--bg-3);
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    letter-spacing: 0.02em;
}

.section-more {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    transition: color 0.15s ease;
}

.section-more:hover {
    color: var(--text-0);
}

/* ─── Stream cards ───────────────────────── */
.stream-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.stream-card {
    cursor: pointer;
    transition: transform 0.15s ease;
    display: block;
    color: inherit;
    text-decoration: none;
}

.stream-card:hover {
    transform: translateY(-2px);
}

.stream-card:hover .stream-thumb {
    border-color: var(--border-strong);
}

.stream-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: border-color 0.15s ease;
    margin-bottom: 12px;
}

.stream-thumb-bg {
    position: absolute;
    inset: 0;
}

.stream-thumb-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ─── Live-frame highlight ───────────────── */
#liveGrid .stream-thumb {
    border-color: rgba(255, 59, 59, 0.55);
    box-shadow: 0 0 0 1px rgba(255, 59, 59, 0.25), 0 0 16px rgba(255, 59, 59, 0.18);
    animation: liveFrameGlow 2.6s ease-in-out infinite;
}

#liveGrid .stream-card:nth-child(2) .stream-thumb { animation-delay: -0.6s; }
#liveGrid .stream-card:nth-child(3) .stream-thumb { animation-delay: -1.2s; }
#liveGrid .stream-card:nth-child(4) .stream-thumb { animation-delay: -1.8s; }

#liveGrid .stream-card:hover .stream-thumb {
    border-color: rgba(255, 59, 59, 0.85);
    box-shadow: 0 0 0 1.5px rgba(255, 59, 59, 0.6), 0 0 28px rgba(255, 59, 59, 0.35);
    animation: none;
}

@keyframes liveFrameGlow {
    0%, 100% {
        box-shadow: 0 0 0 1px rgba(255, 59, 59, 0.25), 0 0 14px rgba(255, 59, 59, 0.16);
    }
    50% {
        box-shadow: 0 0 0 1.5px rgba(255, 59, 59, 0.55), 0 0 26px rgba(255, 59, 59, 0.34);
    }
}

#liveGrid .stream-card-badge {
    background: linear-gradient(180deg, #ff3b3b 0%, #d62525 100%);
    color: #fff;
    box-shadow: 0 0 12px rgba(255, 59, 59, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

#liveGrid .viewer-pulse {
    background: #ff3b3b;
    box-shadow: 0 0 6px rgba(255, 59, 59, 0.7);
    animation: livePulse 1.6s ease-out infinite;
}

.age-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(180deg, #d63131 0%, #a82323 100%);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 3px 7px;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 2px 6px rgba(214, 49, 49, 0.4);
    z-index: 3;
    line-height: 1;
}

.age-badge-bottom {
    top: auto;
    bottom: 8px;
    right: 8px;
}

.category-thumb .age-badge {
    top: 10px;
    right: 10px;
    font-size: 11px;
    padding: 4px 8px;
}

/* ─── Upcoming cards ─────────────────────── */
.upcoming-card .stream-thumb-img {
    filter: grayscale(0.35) brightness(0.7);
    transition: filter 0.2s ease;
}

.upcoming-card:hover .stream-thumb-img {
    filter: grayscale(0.15) brightness(0.85);
}

.upcoming-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(13,13,15,0.2) 0%, rgba(13,13,15,0.55) 100%);
    pointer-events: none;
}

.upcoming-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(13,13,15,0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-strong);
    color: var(--text-0);
    padding: 4px 10px 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 5px;
    font-variant-numeric: tabular-nums;
}

.upcoming-remind {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: rgba(13,13,15,0.7);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    color: var(--text-1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    cursor: pointer;
}

.upcoming-remind:hover {
    background: var(--text-0);
    color: var(--bg-0);
    border-color: var(--text-0);
}

.upcoming-remind.on {
    background: var(--text-0);
    color: var(--bg-0);
    border-color: var(--text-0);
}

.upcoming-remind.ringing {
    background: var(--text-0);
    color: var(--bg-0);
    border-color: var(--text-0);
    animation: bellRing 0.7s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
    box-shadow: 0 0 0 0 rgba(255,255,255,0.6);
}

@keyframes bellRing {
    0% {
        transform: rotate(0);
        box-shadow: 0 0 0 0 rgba(255,255,255,0.7);
    }
    10% { transform: rotate(-22deg); }
    20% { transform: rotate(18deg); }
    30% { transform: rotate(-14deg); }
    40% { transform: rotate(10deg); }
    50% {
        transform: rotate(-6deg);
        box-shadow: 0 0 0 14px rgba(255,255,255,0);
    }
    60% { transform: rotate(4deg); }
    70% { transform: rotate(-2deg); }
    100% {
        transform: rotate(0);
        box-shadow: 0 0 0 0 rgba(255,255,255,0);
    }
}

.remind-toast {
    position: absolute;
    top: 8px;
    right: 46px;
    background: var(--text-0);
    color: var(--bg-0);
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16,1,0.3,1);
    pointer-events: none;
    box-shadow: 0 4px 14px rgba(0,0,0,0.4);
    z-index: 4;
}

.remind-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.stream-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--text-0);
    color: var(--bg-0);
    padding: 3px 7px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.06em;
}

.stream-card-viewers {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    color: var(--text-0);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    display: flex;
    align-items: center;
    gap: 5px;
}

.viewer-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-0);
}

.stream-card-info {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 10px;
    padding: 0 4px;
}

.stream-card-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.stream-card-text {
    min-width: 0;
}

.stream-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-0);
    margin-bottom: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.stream-card-streamer {
    font-size: 13px;
    color: var(--text-2);
    margin-bottom: 4px;
    transition: color 0.15s ease;
}

.stream-card:hover .stream-card-streamer {
    color: var(--text-0);
}

.stream-card-game {
    font-size: 12px;
    color: var(--text-3);
}

.stream-card-tags {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.stream-card-tag {
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--bg-3);
    color: var(--text-2);
}

/* ─── Categories ─────────────────────────── */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.category-card {
    cursor: pointer;
    transition: transform 0.15s ease;
}

.category-card:hover {
    transform: translateY(-2px);
}

.category-thumb {
    aspect-ratio: 3 / 4;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
    border: 1px solid var(--border);
    transition: border-color 0.15s ease;
}

.category-card:hover .category-thumb {
    border-color: var(--border-strong);
}

.category-thumb-bg {
    position: absolute;
    inset: 0;
}

.category-thumb-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.category-card:hover .category-thumb-img {
    transform: scale(1.05);
}

.category-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-0);
    margin-bottom: 4px;
}

.category-viewers {
    font-size: 12px;
    color: var(--text-2);
}

.category-tags {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    flex-wrap: wrap;
}

/* ─── Footer ─────────────────────────────── */
.footer {
    margin-top: 60px;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-3);
    font-size: 13px;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-tagline {
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text-1);
    font-size: 13px;
}

.footer-heart {
    display: inline-flex;
    align-items: center;
    color: #ff3b3b;
    margin: 0 4px;
    animation: heartBeat 1.4s ease-in-out infinite;
    vertical-align: -2px;
}

.footer-heart svg {
    filter: drop-shadow(0 0 4px rgba(255,59,59,0.4));
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.18); }
    50% { transform: scale(1); }
    75% { transform: scale(1.18); }
}

.footer-right {
    display: flex;
    gap: 20px;
}

.footer-right a {
    transition: color 0.15s ease;
}

.footer-right a:hover {
    color: var(--text-1);
}

/* ─── Responsive ─────────────────────────── */
@media (max-width: 1100px) {
    .hero {
        grid-template-columns: 1fr;
    }
    .hero-meta {
        padding: 24px;
    }
    .topbar {
        height: auto;
        grid-template-columns: 1fr auto;
        grid-template-rows: 60px auto;
        grid-template-areas:
            "tb-left tb-right"
            "tb-center tb-center";
        padding-bottom: 10px;
        align-items: center;
    }
    .topbar-left { grid-area: tb-left; }
    .topbar-right { grid-area: tb-right; }
    .topbar-center {
        grid-area: tb-center;
        justify-content: stretch;
        margin-top: 0;
    }
    .search {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 900px) {
    .topnav {
        display: none;
    }
}

@media (max-width: 800px) {
    .layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none;
    }
    .content {
        padding: 16px 14px 40px;
        max-width: 100%;
    }
    .topbar {
        grid-template-columns: 1fr auto;
        padding: 0 12px 10px;
        gap: 8px;
    }
    .search {
        height: 36px;
    }
    .search-shortcut {
        display: none;
    }
    .ghost-btn {
        display: none;
    }
    .primary-btn {
        height: 32px;
        padding: 0 12px;
        font-size: 13px;
    }
    .topbar-left {
        gap: 0;
    }
    .topbar-right {
        gap: 4px;
    }
    .icon-btn {
        width: 36px;
        height: 36px;
    }
    .logo-big .logo-text {
        font-size: 22px;
        letter-spacing: 0.04em;
    }
    .logo-tagline {
        display: none;
    }
    .hero-meta {
        padding: 18px;
        gap: 12px;
    }
    .hero-title {
        font-size: 20px;
    }
    .hero-streamer {
        flex-wrap: wrap;
    }
    .follow-btn {
        margin-left: 0;
    }
    .stream-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .category-name {
        font-size: 13px;
    }
    .category-viewers {
        font-size: 11px;
    }
    .section {
        margin-bottom: 32px;
    }
    .section-title {
        font-size: 16px;
    }
    .section-head {
        flex-wrap: wrap;
        gap: 8px;
    }
    .footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 20px 0;
    }
    .footer-right {
        flex-wrap: wrap;
        gap: 12px;
    }
    .live-count {
        font-size: 11px;
        padding: 2px 7px;
    }
}

@media (max-width: 480px) {
    .topbar {
        height: 56px;
        padding: 0 10px;
    }
    .logo-big .logo-text {
        font-size: 20px;
    }
    .icon-btn,
    .avatar-btn {
        width: 34px;
        height: 34px;
    }
    .primary-btn {
        height: 30px;
        padding: 0 10px;
        font-size: 12px;
    }
    .hero-title {
        font-size: 18px;
    }
    .hero-thumb .live-badge,
    .hero-thumb .hero-viewers {
        top: 10px;
    }
    .hero-thumb .live-badge { left: 10px; }
    .hero-thumb .hero-viewers { right: 10px; }
    .play-btn {
        width: 60px;
        height: 60px;
    }
    .play-btn svg {
        width: 24px;
        height: 24px;
    }
    .stream-card-tags,
    .hero-tags {
        gap: 4px;
    }
    .tag {
        font-size: 11px;
        padding: 3px 8px;
    }
    .stream-card-title {
        font-size: 13px;
    }
    .stream-card-streamer {
        font-size: 12px;
    }
    .footer-tagline {
        font-size: 12px;
    }
    /* Discord tooltip stays inside viewport */
    .discord-tip {
        font-size: 11px;
        padding: 6px 10px;
    }
}

/* ─── Scrollbar ──────────────────────────── */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-0);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-3);
    border-radius: 10px;
    border: 2px solid var(--bg-0);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bg-4);
}
