/* ============================================================
   Shorts & Reels — UI Stylesheet (cleaned-up layout)
   Single primary action: live FYP-share. Queue/Discover are
   opt-in panels behind a small menu, not in the user's face.
   ============================================================ */

:root {
    --sh-bg-0: #0a0608;
    --sh-bg-1: #15090c;
    --sh-bg-2: #1f1116;
    --sh-bg-3: #2c1820;
    --sh-fg:    #f4ecdf;
    --sh-fg-50: rgba(244, 236, 223, 0.55);
    --sh-fg-30: rgba(244, 236, 223, 0.30);
    --sh-fg-15: rgba(244, 236, 223, 0.15);
    --sh-fg-08: rgba(244, 236, 223, 0.08);
    --sh-accent:  #ff5e7a;
    --sh-accent-2:#ff9c5e;
    --sh-accent-3:#7c5cff;
    --sh-yt:      #ff3b3b;
    --sh-success: #4ade80;
    --sh-warn:    #facc15;

    --sh-radius-md: 12px;
    --sh-radius-lg: 18px;
    --sh-radius-xl: 26px;

    --sh-trans-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
    --sh-trans-mid:  220ms cubic-bezier(0.4, 0, 0.2, 1);
    --sh-trans-slow: 380ms cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    background: var(--sh-bg-0);
    color: var(--sh-fg);
    font-family: 'Outfit', 'Inter', system-ui, sans-serif;
    font-size: 16px;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    -webkit-font-smoothing: antialiased;
}

.sh-body {
    min-height: 100dvh;
    /* Warm/purple ambient — same vibe as WatchTogether body but with a
       Shorts-typical purple/pink tint so the page still feels distinct. */
    background:
        radial-gradient(ellipse at 20% 0%, rgba(167, 139, 250, 0.10), transparent 55%),
        radial-gradient(ellipse at 85% 100%, rgba(212, 160, 83, 0.06), transparent 60%),
        var(--bg, var(--sh-bg-0));
}

/* ============================
   View toggle
   ============================ */
.sh-view { display: block; }
.sh-view[hidden] { display: none !important; }

/* ============================
   LOBBY — WatchTogether-style hero + centred card
   ============================ */
.sh-lobby {
    min-height: calc(100dvh - var(--kkh-height, 62px));
    padding: 0 18px 60px;
}
.sh-lobby-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex; flex-direction: column;
    align-items: center;
    gap: 28px;
    animation: shFadeIn var(--sh-trans-slow) both;
}

/* Page Hero — uses .kk-hero from panel.css with purple tint.
   We just need to position it nicely above the lobby card. */
.sh-page-hero {
    max-width: 1200px;
    width: calc(100% - 4px);
    margin: 24px auto 8px !important;
    position: relative;
}
@media (max-width: 640px) {
    .sh-page-hero { margin: 16px auto 4px !important; }
}
.sh-page-hero .kk-hero-text h1 {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Beta badge — exact same look as the Game-Zone nav-arcade-beta. */
.sh-beta-badge {
    display: inline-block;
    padding: 2px 7px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.10em;
    color: #1a0f08;
    background: linear-gradient(135deg, #ffd76b, #d4a053);
    border-radius: 5px;
    line-height: 1.3;
    text-transform: uppercase;
    box-shadow: 0 1px 4px rgba(212, 160, 83, 0.35);
    vertical-align: middle;
    transform: translateY(-2px);
}

/* ---------- Main Lobby Card (mirrors w2g-lobby-card) ---------- */
.sh-lobby-card {
    width: 100%;
    max-width: 480px;
    background: var(--surface, #141010);
    border: 1px solid var(--border, rgba(244, 232, 212, 0.06));
    border-radius: var(--radius-lg, 16px);
    padding: 32px 30px;
    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(167, 139, 250, 0.06) inset;
    position: relative;
    overflow: hidden;
    animation: shFadeIn var(--sh-trans-mid) both;
}
.sh-lobby-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(167, 139, 250, 0.06), transparent 45%);
    pointer-events: none;
    border-radius: inherit;
}
.sh-lobby-card > * { position: relative; z-index: 1; }

.sh-lobby-logo {
    width: 60px; height: 60px;
    border-radius: 16px;
    display: block;
    margin: 0 auto 16px;
    filter: drop-shadow(0 6px 18px rgba(167, 139, 250, 0.28));
}
.sh-lobby-card h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.7rem;
    font-weight: 800;
    text-align: center;
    background: linear-gradient(135deg, #f4e8d4 0%, #c4b5fd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 6px;
}
.sh-lobby-sub {
    text-align: center;
    color: var(--cream-50, var(--sh-fg-50));
    font-size: 0.9rem;
    margin: 0 auto 26px;
    max-width: 360px;
    line-height: 1.5;
}

.sh-lobby-section { margin-bottom: 18px; }
.sh-lobby-label {
    display: block;
    font-size: 0.72rem;
    color: var(--cream-50, var(--sh-fg-50));
    text-transform: uppercase;
    letter-spacing: 0.10em;
    font-weight: 700;
    margin-bottom: 10px;
}

/* Inputs inside the lobby card — match WatchTogether's hub style */
.sh-lobby-card .sh-input {
    width: 100%;
    height: 46px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--border, var(--sh-fg-08));
    border-radius: 12px;
    color: var(--cream, var(--sh-fg));
    padding: 0 16px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.sh-lobby-card .sh-input:focus {
    border-color: #a78bfa;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.18);
    outline: none;
}

.sh-lobby-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.sh-lobby-actions .sh-btn-big {
    width: 100%;
    height: 50px;
    font-size: 0.98rem;
}

/* Divider with "oder" text */
.sh-lobby-divider {
    display: flex; align-items: center; gap: 10px;
    color: var(--cream-30, var(--sh-fg-30));
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    margin: 2px 0;
}
.sh-lobby-divider::before,
.sh-lobby-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border, var(--sh-fg-08));
}

/* Join row: code input + button side-by-side */
.sh-lobby-join-row {
    display: flex;
    gap: 8px;
}
.sh-lobby-join-row .sh-input { flex: 1; }
.sh-lobby-join-row .sh-btn { flex: 0 0 auto; }

/* Lobby footer with support pills */
.sh-lobby-footer {
    margin-top: 22px;
    text-align: center;
}
.sh-support {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}
.sh-support-pill {
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border, var(--sh-fg-08));
    border-radius: 999px;
    font-size: 0.72rem;
    color: var(--cream-50, var(--sh-fg-50));
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Primary-button override — use the purple→gold WatchTogether-aligned
   gradient instead of pink so the whole lobby reads as one design.   */
.sh-lobby-card .sh-btn-primary,
.sh-lobby-card .sh-btn-primary:hover {
    background: linear-gradient(135deg, #a78bfa 0%, #d4a053 100%);
    box-shadow: 0 8px 22px rgba(167, 139, 250, 0.35);
}
.sh-lobby-card .sh-btn-primary:hover { filter: brightness(1.08); }

.sh-lobby-card .sh-btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border, var(--sh-fg-08));
    color: var(--cream, var(--sh-fg));
    font-weight: 700;
}
.sh-lobby-card .sh-btn-ghost:hover {
    background: rgba(167, 139, 250, 0.08);
    border-color: rgba(167, 139, 250, 0.4);
    color: #ddd6fe;
}

/* ---------- Active Rooms ---------- */
.sh-lobby-rooms {
    width: 100%;
    max-width: 880px;
    margin-top: 4px;
}
.sh-rooms-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.sh-section-h {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--cream-50, var(--sh-fg-50));
    margin: 0;
    font-weight: 700;
}
.sh-section-hint {
    font-size: 0.78rem;
    color: var(--cream-30, var(--sh-fg-30));
}

.sh-rooms-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.sh-rooms-empty {
    color: var(--cream-30, var(--sh-fg-30));
    padding: 22px 4px;
    text-align: center;
    font-style: italic;
    border: 1px dashed var(--border, var(--sh-fg-08));
    border-radius: var(--sh-radius-md);
    grid-column: 1 / -1;
}
.sh-room-pill {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border, var(--sh-fg-08));
    border-radius: 12px;
    cursor: pointer;
    transition: transform var(--sh-trans-fast), border-color var(--sh-trans-fast), background var(--sh-trans-fast);
}
.sh-room-pill:hover {
    transform: translateY(-2px);
    border-color: rgba(167, 139, 250, 0.4);
    background: rgba(167, 139, 250, 0.06);
}
.sh-room-pill-thumb {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: rgba(167, 139, 250, 0.12);
    border: 1px solid rgba(167, 139, 250, 0.2);
    flex: 0 0 auto;
    display: grid; place-items: center;
    font-size: 1.1rem;
    overflow: hidden;
    color: #c4b5fd;
}
.sh-room-pill-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sh-room-pill-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sh-room-pill-name {
    font-weight: 700; font-size: 0.92rem;
    color: var(--cream, var(--sh-fg));
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sh-room-pill-meta {
    font-size: 0.74rem;
    color: var(--cream-50, var(--sh-fg-50));
}

@media (max-width: 480px) {
    .sh-lobby-card { padding: 26px 20px; }
    .sh-lobby-card h1 { font-size: 1.45rem; }
    .sh-lobby-logo { width: 52px; height: 52px; }
}

/* ============================
   ROOM — Theater layout
   Desktop ≥900px: top-bar + (stage left | chat right)
   Mobile <900px:  top-bar + stage (chat as slide-up overlay)
   ============================ */
.sh-room {
    position: relative;
    width: 100%;
    height: calc(100dvh - var(--kkh-height, 62px));
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr;
    grid-template-columns: 1fr;
    grid-template-areas:
        "top"
        "stage";
}
.sh-top   { grid-area: top; }
.sh-stage { grid-area: stage; }

@media (min-width: 900px) {
    .sh-room {
        grid-template-columns: 1fr 360px;
        grid-template-areas:
            "top   top"
            "stage chat";
    }
    .sh-chat { grid-area: chat; }
}

.sh-top {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    background: linear-gradient(180deg, rgba(0,0,0,0.65), transparent);
    z-index: 30;
}
.sh-room-meta {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 6px 10px 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--sh-fg-08);
}
.sh-room-code {
    font-family: monospace;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.06em;
}
.sh-presence {
    margin-left: auto;
    /* WICHTIG: max-width + min-width:0 sonst expandiert das Element mit jedem
       neuen Avatar-Chip und drückt den Settings-Button rechts aus dem Header
       raus (war der Grund warum nur 2 Avatare sichtbar waren). Mit cap und
       overflow-x scrollt es jetzt intern wenn viele User da sind. */
    flex: 0 1 auto;
    min-width: 0;
    max-width: min(60vw, 320px);
    display: flex; align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    gap: 5px;
    padding: 0 4px;
    scrollbar-width: none;
}
.sh-presence::-webkit-scrollbar { display: none; }
.sh-pres-chip {
    flex: 0 0 auto;
    width: 30px; height: 30px;
    border-radius: 50%;
    display: grid; place-items: center;
    font-size: 0.95rem;
    background: var(--sh-bg-3);
    border: 2px solid transparent;
    overflow: hidden;
    position: relative;
    transition: transform var(--sh-trans-fast);
}
.sh-pres-chip:hover { transform: scale(1.1); z-index: 1; }
.sh-pres-chip.is-host    { border-color: var(--sh-accent); }
.sh-pres-chip.is-mod     { border-color: var(--sh-accent-3); }
.sh-pres-chip.is-sharer::after {
    content: '';
    position: absolute;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--sh-success);
    box-shadow: 0 0 0 2px var(--sh-bg-0);
    transform: translate(11px, -11px);
}
.sh-pres-chip img { width: 100%; height: 100%; object-fit: cover; }

.sh-icon-btn {
    flex: 0 0 auto;
    width: 38px; height: 38px;
    display: grid; place-items: center;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--sh-fg-08);
    border-radius: 50%;
    color: var(--sh-fg);
    cursor: pointer;
    transition: transform var(--sh-trans-fast), background var(--sh-trans-fast);
    position: relative;
}
.sh-icon-btn:hover { transform: scale(1.05); background: rgba(0,0,0,0.6); }
.sh-icon-btn:active { transform: scale(0.96); }
.sh-icon-btn-badge {
    position: absolute;
    top: -2px; right: -2px;
    background: var(--sh-accent);
    color: #fff;
    font-size: 0.62rem;
    min-width: 16px; height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    display: grid; place-items: center;
    font-weight: 700;
}

/* ============================
   STAGE — full-bleed video / empty state
   ============================ */
.sh-stage {
    position: relative;
    overflow: hidden;
    background: #000;
}
.sh-empty {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center;
    /* `safe center` = zentriert wenn's reinpasst, sonst flex-start (kein Clip)  */
    justify-content: safe center;
    text-align: center;
    gap: 14px;
    padding: 32px 22px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: shFadeIn var(--sh-trans-slow) both;
    /* Subtle purple glow matching the lobby hero */
    background:
        radial-gradient(ellipse 600px 400px at 50% 30%, rgba(167, 139, 250, 0.10), transparent 60%),
        radial-gradient(ellipse 500px 300px at 50% 90%, rgba(212, 160, 83, 0.06), transparent 60%);
}
/* WICHTIG: ohne diese Regel überschreibt `display: flex` oben die UA-default
   für [hidden], und das Empty-Overlay bleibt sichtbar wenn der Player läuft. */
.sh-empty[hidden] { display: none !important; }
.sh-player-frame[hidden] { display: none !important; }
.sh-empty-icon {
    width: 78px; height: 78px;
    display: grid; place-items: center;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.28), rgba(167, 139, 250, 0.10));
    border: 1px solid rgba(167, 139, 250, 0.45);
    box-shadow: 0 8px 28px rgba(167, 139, 250, 0.25);
    font-size: 2.6rem;
    line-height: 1;
}
.sh-empty > * { flex-shrink: 0; }
.sh-empty h2 {
    margin: 4px 0 0;
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f4e8d4 0%, #c4b5fd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.01em;
}
.sh-empty p { color: var(--sh-fg-50); margin: 0; max-width: 460px; line-height: 1.45; font-size: 0.92rem; }
.sh-empty-hint {
    font-size: 0.82rem;
    color: var(--sh-fg-30);
    font-style: italic;
    margin-top: 4px;
    max-width: 380px;
}
.sh-link {
    background: none;
    border: 0;
    padding: 4px 8px;
    color: var(--sh-fg-50);
    font-size: 0.85rem;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    cursor: pointer;
    margin-top: 8px;
    transition: color var(--sh-trans-fast);
    font-family: inherit;
}
.sh-link:hover { color: var(--sh-fg); }

/* Platform launchers — primary CTAs in the empty state.
   Horizontal row when there's room (3 columns), wraps to 1 column on narrow. */
.sh-launchers {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 560px;
    margin-top: 4px;
}
@media (max-width: 520px) {
    .sh-launchers { grid-template-columns: 1fr; }
}
.sh-launcher {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px;
    padding: 14px 10px;
    border: 1px solid var(--sh-fg-08);
    border-radius: var(--sh-radius-lg);
    background: rgba(255,255,255,0.04);
    color: var(--sh-fg);
    cursor: pointer;
    font-family: inherit;
    transition: transform var(--sh-trans-fast), border-color var(--sh-trans-fast), background var(--sh-trans-fast);
    min-height: 0;
}
.sh-launcher:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.07);
}
.sh-launcher-icon {
    font-size: 1.5rem;
    width: 44px; height: 44px;
    border-radius: 12px;
    display: grid; place-items: center;
    color: #fff;
    flex-shrink: 0;
}
.sh-launcher-tt:hover { border-color: rgba(255,255,255,0.35); }
.sh-launcher-tt .sh-launcher-icon {
    background: linear-gradient(135deg, #25F4EE, #FE2C55);
}
.sh-launcher-ig:hover { border-color: #dc2743; }
.sh-launcher-ig .sh-launcher-icon {
    background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}
.sh-launcher-yt:hover { border-color: var(--sh-yt); }
.sh-launcher-yt .sh-launcher-icon {
    background: var(--sh-yt);
}
.sh-launcher-label {
    font-weight: 600;
    font-size: 0.88rem;
    text-align: center;
    line-height: 1.25;
}
.sh-launcher-label small {
    display: block;
    color: var(--sh-fg-50);
    font-weight: 400;
    font-size: 0.7rem;
    margin-top: 2px;
}

/* Quick-switch FAB — opens the captured popup window again */
.sh-fab-focus {
    background: rgba(255,255,255,0.12) !important;
    color: #fff;
    border-color: var(--sh-fg-15);
    font-weight: 700;
}

/* Player frame */
.sh-player-frame {
    position: absolute; inset: 0;
    background: #000;
    animation: shSlideUp var(--sh-trans-mid) both;
}
.sh-player-mount {
    position: relative;
    width: 100%; height: 100%;
    overflow: hidden;
}
.sh-player-mount iframe,
.sh-player-mount video {
    border: 0;
    width: 100%;
    height: 100%;
    display: block;
}
.sh-player-mount video { object-fit: contain; background: #000; }

.sh-player-overlay {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 16px 16px 22px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    pointer-events: none;
    background: linear-gradient(0deg, rgba(0,0,0,0.78), transparent 90%);
    z-index: 5;
}
.sh-player-overlay > * { pointer-events: auto; }
.sh-player-meta { min-width: 0; align-self: end; }
.sh-player-source {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    background: rgba(255,255,255,0.1);
    border-radius: 999px;
    padding: 3px 9px;
    margin-bottom: 6px;
}
.sh-player-source[data-source="youtube"]   { background: rgba(255, 59, 59, 0.85); }
.sh-player-source[data-source="tiktok"]    { background: rgba(0, 0, 0, 0.85); }
.sh-player-source[data-source="instagram"] { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.sh-player-source[data-source="live"] {
    background: var(--sh-yt);
    color: #fff;
    display: inline-flex; align-items: center; gap: 6px;
    animation: shLivePulse 1.6s ease-in-out infinite;
}
.sh-player-source[data-source="live"]::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 6px #fff;
}
@keyframes shLivePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 59, 59, 0.4); }
    50%      { box-shadow: 0 0 0 8px rgba(255, 59, 59, 0); }
}
.sh-player-title {
    font-size: 1.05rem; font-weight: 600;
    margin: 0;
    overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.sh-player-channel { margin: 4px 0 0; color: var(--sh-fg-50); font-size: 0.85rem; }

/* Volume bar — appears in the meta area when a live <video> is mounted */
.sh-volume {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 4px 10px 4px 6px;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--sh-fg-08);
    border-radius: 999px;
    margin-bottom: 8px;
    width: fit-content;
}
.sh-volume[hidden] { display: none !important; }
.sh-mute-btn {
    width: 30px; height: 30px;
    border: 0; background: transparent; color: #fff;
    cursor: pointer; font-size: 1.1rem;
    display: grid; place-items: center;
    border-radius: 50%;
    transition: background var(--sh-trans-fast);
}
.sh-mute-btn:hover { background: rgba(255,255,255,0.1); }
.sh-volume-range {
    appearance: none;
    -webkit-appearance: none;
    width: 110px;
    height: 4px;
    background: rgba(255,255,255,0.18);
    border-radius: 999px;
    outline: none;
    cursor: pointer;
}
.sh-volume-range::-webkit-slider-thumb {
    appearance: none; -webkit-appearance: none;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 0;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}
.sh-volume-range::-moz-range-thumb {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 0;
    cursor: pointer;
}
.sh-player-actions {
    display: flex; flex-direction: column; gap: 12px;
    align-self: end;
}

.sh-fab {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    border: 1px solid var(--sh-fg-15);
    color: var(--sh-fg);
    font-size: 1.25rem;
    display: grid; place-items: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform var(--sh-trans-fast), background var(--sh-trans-fast);
}
.sh-fab:hover { transform: scale(1.05); background: rgba(0,0,0,0.7); }
.sh-fab:active { transform: scale(0.92); }
/* WICHTIG: ohne diese Regel überschreibt `display: grid` von `.sh-fab`
   die UA-default `[hidden] { display: none }` — der versteckte Stop-Live-
   Button bleibt dann neben dem Trending-Stop-Button sichtbar. */
.sh-fab[hidden] { display: none !important; }
.sh-fab-live {
    background: linear-gradient(135deg, #ff5e5e, #ff3b3b) !important;
    color: #fff;
    box-shadow: 0 6px 22px rgba(255, 59, 59, 0.45);
}
.sh-fab-stop {
    background: rgba(255, 59, 59, 0.9) !important;
    color: #fff;
    border-color: rgba(255, 59, 59, 0.6);
}
.sh-fab-skip {
    background: linear-gradient(135deg, var(--sh-accent), var(--sh-accent-3)) !important;
    color: #fff;
    border: 0;
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: 0 6px 22px rgba(255, 94, 122, 0.4);
}
.sh-fab-skip:hover { filter: brightness(1.1); }

/* Helpful hint right below the launcher buttons */
.sh-launcher-hint {
    display: flex; align-items: center; gap: 8px;
    margin: -4px 0 4px;
    padding: 8px 12px;
    background: rgba(124, 92, 255, 0.12);
    border: 1px solid rgba(124, 92, 255, 0.28);
    border-radius: 10px;
    color: var(--sh-fg);
    font-size: 0.8rem !important;
    line-height: 1.4;
    max-width: 460px;
    text-align: left;
}
.sh-launcher-hint[hidden] { display: none !important; }
.sh-launcher-hint > span:first-child { font-size: 1rem; flex-shrink: 0; }

/* Subtle "or" divider between the in-page CTA and the popup-share options */
.sh-empty-divider {
    display: flex; align-items: center; gap: 12px;
    width: 100%; max-width: 360px;
    color: var(--sh-fg-30);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin: 4px 0 -2px;
}
.sh-empty-divider::before,
.sh-empty-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--sh-fg-08);
}

/* Direct-paste row for individual TikTok/IG/YT URLs in empty state */
.sh-empty-paste {
    width: 100%;
    max-width: 560px;
    margin-top: 8px;
    display: flex; flex-direction: column;
    gap: 8px;
    align-items: center;
}
.sh-empty-paste-or {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--sh-fg-30);
}
.sh-empty-paste-row {
    width: 100%;
    display: flex; gap: 8px;
}
.sh-empty-paste-row .sh-input { flex: 1; }
.sh-empty-paste-hint {
    font-size: 0.78rem !important;
    color: var(--sh-fg-30) !important;
    margin: 0 !important;
    max-width: 460px;
    line-height: 1.4 !important;
}

/* "Erweitert" details/summary block in empty state */
.sh-advanced {
    width: 100%;
    max-width: 560px;
    margin-top: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--sh-fg-08);
    border-radius: var(--sh-radius-md);
    padding: 0;
    text-align: left;
}
.sh-advanced > summary {
    cursor: pointer;
    padding: 12px 16px;
    font-size: 0.85rem;
    color: var(--sh-fg-50);
    list-style: none;
    user-select: none;
}
.sh-advanced > summary::-webkit-details-marker { display: none; }
.sh-advanced > summary::before {
    content: '▸ ';
    transition: transform 0.2s;
    display: inline-block;
}
.sh-advanced[open] > summary::before { content: '▾ '; }
.sh-advanced > summary:hover { color: var(--sh-fg); }
.sh-advanced-body {
    padding: 0 16px 16px;
    display: flex; flex-direction: column;
    gap: 12px;
    align-items: center;
}
.sh-advanced-body p {
    font-size: 0.82rem !important;
    color: var(--sh-fg-50);
    line-height: 1.5;
    margin: 0;
}
.sh-advanced-body code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    background: rgba(255,255,255,0.06);
    padding: 1px 5px;
    border-radius: 4px;
}

/* Stream status pill */
.sh-stream-stat {
    position: absolute;
    top: 14px; right: 14px;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--sh-fg-08);
    font-size: 0.72rem;
    z-index: 8;
    pointer-events: none;
}
.sh-stream-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--sh-warn);
    animation: shPulse 1.6s ease-in-out infinite;
}
.sh-stream-stat[data-state="connected"] .sh-stream-dot { background: var(--sh-success); animation: none; }
.sh-stream-stat[data-state="failed"] .sh-stream-dot,
.sh-stream-stat[data-state="disconnected"] .sh-stream-dot { background: var(--sh-yt); animation: none; }

/* Reactions overlay — Insta-Live-Style: Emojis poppen unten rechts auf,
   bouncen kurz, steigen nach oben mit leichter Drift + Sway, faden aus. */
.sh-reactions-layer {
    position: absolute; inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 6;
}
.sh-reaction-fly {
    position: absolute;
    bottom: 110px;
    /* Outer: drift nach links/oben + leichtes hin-her Sway */
    animation: shReactionRise var(--sh-react-dur, 2.6s) cubic-bezier(0.16, 0.62, 0.32, 1) forwards;
    will-change: transform, opacity;
    --sh-react-drift-x: -60px;
    --sh-react-sway: 16px;
    --sh-react-rot-start: 0deg;
    --sh-react-rot-mid: 0deg;
}
.sh-reaction-emoji {
    display: inline-block;
    font-size: 2.2rem;
    line-height: 1;
    /* Inner: bounce-in dann sanftes Pulsieren */
    animation: shReactionPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both,
               shReactionFloatRotate var(--sh-react-dur, 2.6s) ease-in-out forwards;
    filter: drop-shadow(0 4px 12px rgba(255,80,120,0.45)) drop-shadow(0 2px 4px rgba(0,0,0,0.4));
    transform-origin: center bottom;
    will-change: transform;
}
/* Pop-In: aus dem Nichts auf 1.3x bouncen, dann auf 1x */
@keyframes shReactionPop {
    0%   { transform: scale(0) rotate(var(--sh-react-rot-start)); opacity: 0; }
    50%  { transform: scale(1.3) rotate(0deg); opacity: 1; }
    70%  { transform: scale(0.95) rotate(0deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
/* Während des Aufstiegs leichtes Rotieren / Wackeln */
@keyframes shReactionFloatRotate {
    0%   { transform: rotate(0deg); }
    25%  { transform: rotate(var(--sh-react-rot-mid)); }
    50%  { transform: rotate(calc(var(--sh-react-rot-mid) * -1)); }
    75%  { transform: rotate(var(--sh-react-rot-mid)); }
    100% { transform: rotate(0deg); }
}
/* Outer rise: schräg nach oben + hin-her Sway */
@keyframes shReactionRise {
    0%   {
        transform: translate(0, 0);
        opacity: 0;
    }
    15%  {
        transform: translate(calc(var(--sh-react-drift-x) * 0.15), -40px) translateX(var(--sh-react-sway));
        opacity: 1;
    }
    40%  {
        transform: translate(calc(var(--sh-react-drift-x) * 0.4), -25vh) translateX(calc(var(--sh-react-sway) * -1));
        opacity: 1;
    }
    65%  {
        transform: translate(calc(var(--sh-react-drift-x) * 0.65), -45vh) translateX(var(--sh-react-sway));
        opacity: 0.85;
    }
    100% {
        transform: translate(var(--sh-react-drift-x), -75vh) translateX(0);
        opacity: 0;
    }
}

/* Scroll controller — sharer-side remote for popup feed */
.sh-scroll-ctrl {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 8px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--sh-fg-08);
    border-radius: var(--sh-radius-lg);
    animation: shSlideUp var(--sh-trans-mid) both;
}
.sh-scroll-ctrl[hidden] { display: none !important; }

.sh-scroll-ctrl-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--sh-fg-50);
    font-weight: 700;
    white-space: nowrap;
    padding: 0 2px 2px;
}

.sh-scroll-btn {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    border: 1px solid var(--sh-fg-15);
    background: rgba(255, 255, 255, 0.07);
    color: var(--sh-fg);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: transform var(--sh-trans-fast), background var(--sh-trans-fast), border-color var(--sh-trans-fast);
}
.sh-scroll-btn:hover {
    transform: scale(1.06);
    background: rgba(255, 255, 255, 0.14);
    border-color: var(--sh-accent);
}
.sh-scroll-btn:active {
    transform: scale(0.94);
    background: rgba(255, 94, 122, 0.2);
}

/* Quick-switch to popup (↗) — smaller accent button */
.sh-scroll-switch {
    font-size: 1.1rem;
    font-weight: 700;
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    background: rgba(124, 92, 255, 0.2) !important;
    border-color: rgba(124, 92, 255, 0.4) !important;
    color: #c4b5fd;
}
.sh-scroll-switch:hover {
    background: rgba(124, 92, 255, 0.35) !important;
    border-color: rgba(124, 92, 255, 0.6) !important;
    color: #fff;
}

.sh-scroll-ctrl-collapse {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 0;
    background: transparent;
    color: var(--sh-fg-30);
    cursor: pointer;
    font-size: 0.7rem;
    display: grid;
    place-items: center;
    transition: color var(--sh-trans-fast), transform var(--sh-trans-fast);
    margin-top: 2px;
}
.sh-scroll-ctrl-collapse:hover {
    color: var(--sh-fg);
    transform: scale(1.1);
}

/* On narrow screens, make scroll buttons slightly smaller */
@media (max-width: 520px) {
    .sh-scroll-ctrl { left: 8px; padding: 8px 6px; }
    .sh-scroll-btn { width: 44px; height: 44px; border-radius: 12px; }
}

/* ============================
   CHAT — desktop sidebar / mobile slide-up overlay
   ============================ */
.sh-chat {
    display: flex; flex-direction: column;
    background: var(--sh-bg-1);
    border-left: 1px solid var(--sh-fg-08);
    overflow: hidden;
}

/* Mobile: chat is hidden by default, opens as full-screen overlay */
@media (max-width: 899px) {
    .sh-chat {
        position: fixed;
        left: 0; right: 0; bottom: 0; top: auto;
        max-height: 75dvh;
        border-top: 1px solid var(--sh-fg-08);
        border-left: 0;
        border-radius: var(--sh-radius-xl) var(--sh-radius-xl) 0 0;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
        z-index: 25;
        transform: translateY(100%);
        transition: transform var(--sh-trans-mid);
        will-change: transform;
    }
    .sh-chat.is-open {
        transform: translateY(0);
    }
}

.sh-chat-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px 10px;
    border-bottom: 1px solid var(--sh-fg-08);
}
.sh-chat-head h3 { margin: 0; font-size: 1rem; font-weight: 700; }
@media (min-width: 900px) {
    .sh-chat-close { display: none; }
}

.sh-chat-form {
    display: flex; gap: 8px;
    padding: 10px 12px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--sh-fg-08);
    background: rgba(10, 6, 8, 0.6);
    flex-shrink: 0;
}
.sh-chat-form .sh-input { flex: 1; height: 40px; }
.sh-btn-send {
    flex: 0 0 auto;
    width: 40px; height: 40px;
    border-radius: 50%;
    padding: 0;
    background: linear-gradient(135deg, var(--sh-accent), var(--sh-accent-3));
    color: #fff;
    border: 0;
    cursor: pointer;
    display: grid; place-items: center;
    box-shadow: 0 4px 14px rgba(255, 94, 122, 0.35);
    transition: transform var(--sh-trans-fast), filter var(--sh-trans-fast);
}
.sh-btn-send:hover { filter: brightness(1.06); }
.sh-btn-send:active { transform: scale(0.95); }

/* Floating chat-toggle FAB — mobile only */
.sh-chat-fab {
    position: fixed;
    right: 14px; bottom: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    width: 52px; height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sh-accent), var(--sh-accent-3));
    color: #fff;
    border: 0;
    cursor: pointer;
    display: grid; place-items: center;
    box-shadow: 0 8px 22px rgba(255, 94, 122, 0.45);
    z-index: 22;
    transition: transform var(--sh-trans-fast);
}
.sh-chat-fab:active { transform: scale(0.94); }
@media (min-width: 900px) {
    .sh-chat-fab { display: none; }
}
.sh-chat-fab .sh-icon-btn-badge { top: -2px; right: -2px; }

/* ============================
   SLIDE-UP PANELS (chat / queue / discover)
   ============================ */
.sh-panel {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    max-height: 75dvh;
    background: var(--sh-bg-1);
    border-top: 1px solid var(--sh-fg-08);
    border-radius: var(--sh-radius-xl) var(--sh-radius-xl) 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    z-index: 25;
    display: flex; flex-direction: column;
    animation: shSlideUp var(--sh-trans-mid) both;
}
.sh-panel[hidden] { display: none; }
.sh-panel-handle {
    width: 44px; height: 4px;
    border-radius: 2px;
    background: var(--sh-fg-15);
    margin: 8px auto 4px;
}
.sh-panel-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 18px 10px;
}
.sh-panel-head h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.sh-panel-hint {
    margin: 0 18px 12px;
    color: var(--sh-fg-50);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Queue */
.sh-add-row {
    display: flex; gap: 8px;
    padding: 0 16px 12px;
}
.sh-queue-list {
    list-style: none;
    margin: 0; padding: 0 12px 16px;
    overflow-y: auto;
    flex: 1;
    display: flex; flex-direction: column; gap: 8px;
}
.sh-queue-empty {
    text-align: center;
    color: var(--sh-fg-30);
    padding: 18px;
    font-style: italic;
    font-size: 0.92rem;
}
.sh-queue-item {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 10px; align-items: center;
    padding: 8px 10px;
    border-radius: var(--sh-radius-md);
    background: rgba(255,255,255,0.03);
    border: 1px solid transparent;
    transition: transform var(--sh-trans-fast), border-color var(--sh-trans-fast);
    animation: shFadeIn var(--sh-trans-mid) both;
}
.sh-queue-item:hover { border-color: var(--sh-fg-15); }
.sh-queue-thumb {
    width: 60px; height: 60px;
    border-radius: 8px;
    background: var(--sh-bg-3);
    overflow: hidden;
    display: grid; place-items: center;
    font-size: 1.4rem;
}
.sh-queue-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sh-queue-info { min-width: 0; }
.sh-queue-title {
    font-weight: 500; font-size: 0.92rem;
    overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    line-height: 1.3;
}
.sh-queue-meta { color: var(--sh-fg-30); font-size: 0.74rem; margin-top: 3px; }
.sh-queue-source {
    text-transform: uppercase; letter-spacing: 0.08em;
    padding: 1px 6px; border-radius: 999px;
    background: rgba(255,255,255,0.06);
    font-size: 0.66rem;
    margin-right: 6px;
}
.sh-queue-actions { display: flex; gap: 4px; }
.sh-queue-item-draggable { cursor: grab; }
.sh-queue-item.is-dragging { opacity: 0.4; }
.sh-queue-item.is-drop-before { box-shadow: inset 0 3px 0 var(--sh-accent); }
.sh-queue-item.is-drop-after { box-shadow: inset 0 -3px 0 var(--sh-accent); }

/* Discover */
.sh-discover-search { display: flex; gap: 8px; padding: 0 16px 12px; }
.sh-discover-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    padding: 0 14px 16px;
    overflow-y: auto;
    flex: 1;
    align-content: start;
}
.sh-discover-empty {
    text-align: center;
    color: var(--sh-fg-30);
    font-size: 0.92rem;
    font-style: italic;
    padding: 22px;
}
.sh-discover-card {
    position: relative;
    aspect-ratio: 9 / 16;
    border-radius: var(--sh-radius-md);
    overflow: hidden;
    background: var(--sh-bg-3);
    cursor: pointer;
    transition: transform var(--sh-trans-fast);
    animation: shFadeIn var(--sh-trans-mid) both;
}
.sh-discover-card:hover { transform: translateY(-2px) scale(1.02); }
.sh-discover-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sh-discover-card-overlay {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 10px 10px 8px;
    background: linear-gradient(0deg, rgba(0,0,0,0.92), transparent);
    pointer-events: none;
}
.sh-discover-card-title {
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.25;
    overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.sh-discover-card-channel { font-size: 0.68rem; color: var(--sh-fg-50); margin-top: 2px; }
.sh-discover-card-add {
    position: absolute;
    top: 8px; right: 8px;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.65);
    border: 1px solid var(--sh-fg-15);
    color: #fff;
    display: grid; place-items: center;
    cursor: pointer;
    transition: transform var(--sh-trans-fast);
    font-size: 1rem;
}
.sh-discover-card-add.is-added { background: var(--sh-success); color: #0a0608; pointer-events: none; }
.sh-discover-skeleton {
    aspect-ratio: 9 / 16;
    border-radius: var(--sh-radius-md);
    background: linear-gradient(110deg, rgba(255,255,255,0.04), rgba(255,255,255,0.07), rgba(255,255,255,0.04));
    background-size: 200% 100%;
    animation: shShimmer 1.4s ease-in-out infinite;
}
@keyframes shShimmer {
    0%   { background-position: -100% 0; }
    100% { background-position:  100% 0; }
}

/* Chat panel */
.sh-chat-list {
    list-style: none;
    margin: 0; padding: 0 16px 16px;
    overflow-y: auto;
    flex: 1;
    display: flex; flex-direction: column; gap: 8px;
}
.sh-chat-msg {
    display: flex; gap: 8px; align-items: flex-start;
    padding: 6px 0;
    animation: shFadeIn var(--sh-trans-fast) both;
}
.sh-chat-avatar {
    flex: 0 0 auto;
    width: 28px; height: 28px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: var(--sh-bg-3);
    font-size: 0.95rem;
    overflow: hidden;
}
.sh-chat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sh-chat-body { min-width: 0; flex: 1; }
.sh-chat-name { font-size: 0.78rem; font-weight: 600; color: var(--sh-fg-50); margin-bottom: 1px; }
.sh-chat-text { font-size: 0.95rem; line-height: 1.4; word-wrap: break-word; overflow-wrap: anywhere; }
.sh-chat-msg.is-system .sh-chat-name { color: var(--sh-accent-2); }
.sh-chat-msg.is-system .sh-chat-text { color: var(--sh-fg-50); font-style: italic; }

/* ============================
   FORMS / BUTTONS
   ============================ */
.sh-input {
    width: 100%;
    height: 44px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--sh-fg-08);
    border-radius: var(--sh-radius-md);
    color: var(--sh-fg);
    font-family: inherit;
    font-size: 0.95rem;
    padding: 0 14px;
    transition: border-color var(--sh-trans-fast), background var(--sh-trans-fast);
}
.sh-input:focus {
    outline: none;
    border-color: var(--sh-accent);
    background: rgba(255,255,255,0.08);
}
.sh-input::placeholder { color: var(--sh-fg-30); }

.sh-btn {
    height: 44px;
    padding: 0 18px;
    border: none;
    border-radius: var(--sh-radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px;
    transition: transform var(--sh-trans-fast), filter var(--sh-trans-fast);
}
.sh-btn:active { transform: scale(0.97); }
.sh-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.sh-btn-primary {
    background: linear-gradient(135deg, var(--sh-accent), var(--sh-accent-3));
    color: #fff;
    box-shadow: 0 6px 22px rgba(255, 94, 122, 0.35);
}
.sh-btn-primary:hover { filter: brightness(1.05); }
.sh-btn-ghost {
    background: rgba(255,255,255,0.05);
    color: var(--sh-fg);
    border: 1px solid var(--sh-fg-08);
}
.sh-btn-ghost:hover { background: rgba(255,255,255,0.08); border-color: var(--sh-fg-15); }
.sh-btn-danger {
    background: rgba(255, 59, 59, 0.15);
    color: #ffb8b8;
    border: 1px solid rgba(255, 59, 59, 0.4);
    height: 36px;
    padding: 0 14px;
    font-size: 0.85rem;
}
.sh-btn-danger:hover { background: rgba(255, 59, 59, 0.25); }
.sh-btn-live {
    background: linear-gradient(135deg, #ff5e5e, #ff3b3b);
    color: #fff;
    box-shadow: 0 6px 22px rgba(255, 59, 59, 0.45);
}
.sh-btn-live:hover { filter: brightness(1.08); }
.sh-btn-big {
    height: 46px;
    font-size: 0.95rem;
    padding: 0 22px;
    border-radius: 12px;
}

/* Trending Shorts CTA — extra prominent, purple→gold gradient.
   Targets the empty-state primary button specifically so the lobby
   buttons keep their own size/weight from .sh-lobby-actions. */
#shEmptyFeedBtn.sh-btn-big {
    height: 56px;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 0 28px;
    border-radius: 14px;
    background: linear-gradient(135deg, #a78bfa 0%, #d4a053 100%);
    box-shadow:
        0 10px 28px rgba(167, 139, 250, 0.4),
        0 0 0 1px rgba(212, 160, 83, 0.25) inset;
    letter-spacing: 0.01em;
}
#shEmptyFeedBtn.sh-btn-big:hover { filter: brightness(1.08); transform: translateY(-1px); }
#shEmptyFeedBtn.sh-btn-big:disabled { filter: grayscale(0.4); opacity: 0.75; }
#shEmptyFeedBtn.sh-btn-big > span:first-child { font-size: 1.2rem; }

/* Trending Controls — Button + Region-Select nebeneinander */
.sh-trending-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    width: 100%;
    max-width: 460px;
}
.sh-trending-controls[hidden] { display: none !important; }
.sh-trending-controls #shEmptyFeedBtn { width: 100%; }

.sh-region-select {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--sh-fg-08);
    border-radius: 999px;
    color: var(--sh-fg);
    font-size: 0.85rem;
    transition: border-color var(--sh-trans-fast), background var(--sh-trans-fast);
}
.sh-region-select:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(167, 139, 250, 0.4);
}
.sh-region-label {
    color: var(--sh-fg-50);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.sh-region-select select {
    background: transparent;
    border: 0;
    color: var(--sh-fg);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    outline: none;
    /* Eigenes Caret damit es zur Pill passt */
    appearance: none;
    -webkit-appearance: none;
    padding-right: 22px;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--sh-fg-50) 50%),
        linear-gradient(135deg, var(--sh-fg-50) 50%, transparent 50%);
    background-position:
        calc(100% - 12px) calc(50% - 2px),
        calc(100% - 7px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}
.sh-region-select select option {
    background: var(--sh-bg-1);
    color: var(--sh-fg);
}
.sh-region-select select:focus {
    background-color: rgba(167, 139, 250, 0.08);
}

/* Stop-Feed Button im Player-Overlay — rot, klare Abbruch-Geste */
.sh-fab-stop#shStopFeedBtn {
    background: rgba(239, 68, 68, 0.85) !important;
    color: #fff;
    border-color: rgba(239, 68, 68, 0.6);
    font-size: 1.2rem;
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.35);
}
.sh-fab-stop#shStopFeedBtn:hover {
    background: rgba(239, 68, 68, 1) !important;
    transform: scale(1.06);
}
.sh-live-dot {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #fff;
    animation: shDotPulse 1.4s ease-in-out infinite;
    flex: 0 0 auto;
}
@keyframes shDotPulse {
    0%, 100% { transform: scale(1);   box-shadow: 0 0 0 0   rgba(255, 255, 255, 0.7); }
    50%      { transform: scale(1.3); box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);   }
}

/* ============================
   SETTINGS MENU (popover from ⋮)
   ============================ */
.sh-menu {
    position: fixed;
    top: 56px; right: 14px;
    z-index: 40;
    min-width: 220px;
    background: var(--sh-bg-1);
    border: 1px solid var(--sh-fg-08);
    border-radius: var(--sh-radius-md);
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    padding: 6px;
    animation: shFadeIn var(--sh-trans-fast) both;
}
.sh-menu[hidden] { display: none !important; }
.sh-menu-item {
    width: 100%;
    display: flex; align-items: center; gap: 10px;
    background: transparent;
    border: 0;
    color: var(--sh-fg);
    padding: 10px 14px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.92rem;
    text-align: left;
    cursor: pointer;
    transition: background var(--sh-trans-fast);
}
.sh-menu-item:hover { background: rgba(255,255,255,0.06); }
.sh-menu-item-danger { color: #ffb8b8; }

/* ============================
   MODAL (Settings)
   ============================ */
.sh-modal {
    position: fixed; inset: 0;
    z-index: 50;
    display: grid; place-items: center;
    padding: 24px 16px;
    animation: shFadeIn var(--sh-trans-mid) both;
}
.sh-modal[hidden] { display: none !important; }
.sh-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.sh-modal-card {
    position: relative;
    width: min(420px, 100%);
    max-height: min(80dvh, 640px);
    background: var(--sh-bg-1);
    border: 1px solid var(--sh-fg-08);
    border-radius: var(--sh-radius-lg);
    box-shadow: 0 12px 38px rgba(0,0,0,0.55);
    display: flex; flex-direction: column;
    overflow: hidden;
    animation: shSlideUp var(--sh-trans-mid) both;
}
.sh-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--sh-fg-08);
}
.sh-modal-head h3 { margin: 0; font-size: 1.05rem; }
.sh-modal-foot {
    padding: 10px 18px 14px;
    border-top: 1px solid var(--sh-fg-08);
}
.sh-settings-body {
    padding: 14px 18px;
    overflow-y: auto;
    display: flex; flex-direction: column; gap: 14px;
}
.sh-settings-row { display: flex; flex-direction: column; gap: 6px; }
.sh-settings-row label { font-size: 0.85rem; color: var(--sh-fg-50); }
.sh-settings-row select {
    height: 40px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--sh-fg-08);
    border-radius: var(--sh-radius-md);
    color: var(--sh-fg);
    padding: 0 12px;
    font-family: inherit; font-size: 0.92rem;
}
.sh-settings-row-toggle { flex-direction: row; align-items: center; justify-content: space-between; }
.sh-settings-row-toggle label, .sh-settings-row-toggle span { color: var(--sh-fg); font-size: 0.92rem; }
.sh-settings-section-h {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--sh-fg-50);
    font-weight: 700;
    margin-top: 8px;
}
.sh-settings-hint { margin: 0; font-size: 0.78rem; color: var(--sh-fg-30); text-align: center; font-style: italic; }

.sh-switch { display: inline-block; position: relative; width: 42px; height: 24px; flex: 0 0 auto; }
.sh-switch input { position: absolute; opacity: 0; pointer-events: none; }
.sh-switch-track {
    position: absolute; inset: 0;
    background: var(--sh-fg-15);
    border-radius: 999px;
    cursor: pointer;
    transition: background var(--sh-trans-fast);
}
.sh-switch-track::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform var(--sh-trans-fast);
}
.sh-switch input:checked + .sh-switch-track { background: var(--sh-accent); }
.sh-switch input:checked + .sh-switch-track::after { transform: translateX(18px); }
.sh-switch input:disabled + .sh-switch-track { opacity: 0.5; cursor: not-allowed; }

.sh-members-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 6px;
}
.sh-member-row {
    display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center;
    padding: 8px 10px;
    background: rgba(255,255,255,0.03);
    border-radius: var(--sh-radius-md);
}
.sh-member-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--sh-bg-3);
    overflow: hidden;
}
.sh-member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sh-member-info { min-width: 0; }
.sh-member-name { font-size: 0.92rem; font-weight: 500; }
.sh-member-role { font-size: 0.74rem; color: var(--sh-fg-50); }
.sh-member-actions select {
    height: 32px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--sh-fg-08);
    border-radius: 8px;
    color: var(--sh-fg);
    font-size: 0.82rem;
    padding: 0 8px;
}

/* ============================
   REACTION PICKER
   ============================ */
.sh-react-picker {
    position: fixed;
    z-index: 45;
    display: flex;
    gap: 4px;
    padding: 8px 10px;
    background: rgba(0,0,0,0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--sh-fg-08);
    border-radius: 999px;
    box-shadow: 0 12px 38px rgba(0,0,0,0.55);
    animation: shSlideUp 0.18s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.sh-react-picker[hidden] { display: none !important; }
.sh-react-picker button {
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 0;
    background: transparent;
    font-size: 1.4rem;
    cursor: pointer;
    transition: transform var(--sh-trans-fast);
}
.sh-react-picker button:hover { transform: scale(1.25); }

/* ============================
   CONNECTION PILL + TOASTS
   ============================ */
.sh-conn {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--sh-fg-08);
    font-size: 0.75rem;
    z-index: 35;
    transition: opacity var(--sh-trans-mid);
}
.sh-conn[data-state="ok"] { opacity: 0; pointer-events: none; }
/* Verbindungs-Status komplett verstecken — bleibt nur bei harten Fehlern sichtbar */
.sh-conn[data-state="connecting"] { opacity: 0; pointer-events: none; }
.sh-conn-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--sh-warn);
    animation: shPulse 1.6s ease-in-out infinite;
}
.sh-conn[data-state="ok"]    .sh-conn-dot { background: var(--sh-success); animation: none; }
.sh-conn[data-state="error"] .sh-conn-dot { background: var(--sh-yt); }

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

.sh-toasts {
    position: fixed;
    left: 50%;
    bottom: 90px;
    transform: translateX(-50%);
    display: flex; flex-direction: column-reverse;
    gap: 8px;
    z-index: 40;
    pointer-events: none;
    width: min(96vw, 420px);
}
.sh-toast {
    pointer-events: auto;
    padding: 10px 14px;
    border-radius: var(--sh-radius-md);
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--sh-fg-08);
    font-size: 0.9rem;
    animation: shToastIn 0.22s var(--sh-trans-mid) both, shToastOut 0.22s var(--sh-trans-mid) 4.6s both;
}
.sh-toast.is-error { border-color: var(--sh-yt); }
.sh-toast.is-success { border-color: var(--sh-success); }
@keyframes shToastIn  { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shToastOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-12px); } }

@keyframes shFadeIn  { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes shSlideUp { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
