.stream-toggle {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    align-items: center;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    outline: none;
}

.stream-toggle-inner {
    display: flex;
    align-items: center;
    gap: 0;
    background: linear-gradient(180deg, rgba(18,12,8,0.95) 0%, rgba(10,6,4,0.98) 100%);
    border: 0.0625rem solid #3a1a0e;
    border-right: none;
    border-radius: 0.5rem 0 0 0.5rem;
    padding: 0.75rem 0.625rem 0.75rem 0.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23,1,0.32,1);
    box-shadow: -0.25rem 0 1rem rgba(0,0,0,0.4);
}

.stream-toggle-inner:hover {
    border-color: #5c2a12;
    box-shadow: -0.25rem 0 1.5rem rgba(0,0,0,0.5), 0 0 1rem rgba(255,70,20,0.08);
}

/* top fire accent */
.stream-toggle-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0.0625rem;
    background: linear-gradient(90deg, #ff5a1f, #ff7a00, #ff5a1f);
    opacity: 0.6;
}

/* icon container */
.stream-icon {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* live dot */
.stream-icon::after {
    content: '';
    position: absolute;
    top: -0.125rem;
    right: -0.125rem;
    width: 0.4375rem;
    height: 0.4375rem;
    background: #ff2e00;
    border-radius: 50%;
    border: 0.0625rem solid rgba(10,6,4,0.9);
    animation: liveDot 1.5s ease-in-out infinite;
}

@keyframes liveDot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0.25rem rgba(255,46,0,0.6); }
    50% { opacity: 0.4; box-shadow: 0 0 0.125rem rgba(255,46,0,0.3); }
}

.stream-icon svg {
    width: 1.75rem;
    height: 1.75rem;
    fill: #ff5a1f;
    filter: drop-shadow(0 0 0.25rem rgba(255,90,31,0.3));
    transition: filter 0.3s ease;
}

.stream-toggle-inner:hover .stream-icon svg {
    filter: drop-shadow(0 0 0.5rem rgba(255,90,31,0.5));
}

/* vertical text */
.stream-label {
    font-family: 'Cinzel', serif;
    font-weight: 900;
    font-size: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #8a5a3a;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    margin-left: 0.25rem;
    transition: color 0.3s ease;
}

.stream-toggle-inner:hover .stream-label {
    color: #c47830;
}

/* pulse ring behind button */
.stream-pulse {
    position: absolute;
    inset: -0.25rem;
    border-radius: 0.625rem 0 0 0.625rem;
    border: 0.0625rem solid rgba(255,90,31,0.1);
    animation: btnPulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes btnPulse {
    0%, 100% { opacity: 0; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* ══ OVERLAY ══ */
.stream-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.stream-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ══ PANEL ══ */
.stream-panel {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 22rem;
    max-width: 90vw;
    z-index: 10000;
    background: linear-gradient(180deg, rgba(14,10,8,0.98) 0%, rgba(8,6,4,0.99) 100%);
    border-left: 0.0625rem solid #3a1a0e;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.23,1,0.32,1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: -0.5rem 0 2rem rgba(0,0,0,0.6);
}

.stream-panel.open {
    transform: translateX(0);
}

/* top fire line */
.stream-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0.125rem;
    background: linear-gradient(90deg, #ff5a1f, #ff7a00, #ff5a1f);
    box-shadow: 0 0 0.75rem rgba(255,90,31,0.3);
    z-index: 2;
}

/* left border glow */
.stream-panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 0.0625rem;
    background: linear-gradient(180deg, #ff5a1f, rgba(255,90,31,0.2) 30%, rgba(255,90,31,0.05) 70%, #ff5a1f);
    z-index: 2;
}

/* ── PANEL HEADER ── */
.sp-header {
    padding: 1.25rem 1.25rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 0.0625rem solid rgba(58,26,14,0.3);
    flex-shrink: 0;
}

.sp-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sp-title svg {
    width: 1.125rem;
    height: 1.125rem;
    fill: #ff5a1f;
    filter: drop-shadow(0 0 0.25rem rgba(255,90,31,0.3));
}

.sp-title span {
    font-family: 'Cinzel', serif;
    font-weight: 900;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #d4a880;
}

.sp-live-badge {
    display: flex;
    align-items: center;
    gap: 0.3125rem;
    padding: 0.25rem 0.625rem;
    background: rgba(255,46,0,0.12);
    border: 0.0625rem solid rgba(255,46,0,0.25);
    border-radius: 1rem;
    font-family: 'Cinzel', serif;
    font-size: 0.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #ff5a1f;
}

.sp-live-badge::before {
    content: '';
    width: 0.375rem;
    height: 0.375rem;
    background: #ff2e00;
    border-radius: 50%;
    animation: liveDot 1.5s ease-in-out infinite;
}

.sp-close {
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.03);
    border: 0.0625rem solid rgba(58,26,14,0.3);
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6b4a30;
}

.sp-close:hover {
    border-color: rgba(255,90,31,0.3);
    color: #ff5a1f;
    background: rgba(255,90,31,0.05);
}

.sp-close svg {
    width: 0.875rem;
    height: 0.875rem;
    stroke: currentColor;
}

/* ── STREAM LIST ── */
.sp-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

/* scrollbar */
.sp-list::-webkit-scrollbar { width: 0.25rem; }
.sp-list::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
.sp-list::-webkit-scrollbar-thumb { background: #3a1a0e; border-radius: 0.125rem; }

/* ── STREAM CARD ── */
.stream-card {
    background: rgba(18,12,8,0.6);
    border: 0.0625rem solid rgba(58,26,14,0.25);
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.35s ease;
}

.stream-card:hover {
    border-color: rgba(255,90,31,0.2);
    box-shadow: 0 0 0.75rem rgba(255,70,20,0.06);
}

/* thumbnail */
.sc-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0a0604;
    overflow: hidden;
}

.sc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8);
    transition: filter 0.35s ease, transform 0.35s ease;
}

.stream-card:hover .sc-thumb img {
    filter: brightness(0.95);
    transform: scale(1.03);
}

/* overlay gradient */
.sc-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(14,10,8,0.8) 0%, transparent 50%);
    pointer-events: none;
}

/* live tag */
.sc-live {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1875rem 0.5rem;
    background: rgba(255,30,0,0.85);
    border-radius: 0.1875rem;
    font-family: 'Cinzel', serif;
    font-size: 0.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    z-index: 1;
}

/* viewers */
.sc-viewers {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-family: 'Crimson Pro', serif;
    font-size: 0.6875rem;
    color: #9a8a7a;
    z-index: 1;
}

.sc-viewers svg {
    width: 0.6875rem;
    height: 0.6875rem;
    fill: currentColor;
    opacity: 0.6;
}

/* info */
.sc-info {
    padding: 0.625rem 0.75rem;
}

.sc-name {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 0.75rem;
    color: #c8b89a;
    margin-bottom: 0.25rem;
    transition: color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stream-card:hover .sc-name {
    color: #ff9a50;
}

.sc-game {
    font-family: 'Crimson Pro', serif;
    font-size: 0.6875rem;
    color: #5a4a3a;
}

/* ── EMPTY STATE ── */
.sp-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.sp-empty svg {
    width: 2.5rem;
    height: 2.5rem;
    fill: #2a1a10;
    margin-bottom: 1rem;
}

.sp-empty p {
    font-family: 'Cinzel', serif;
    font-size: 0.6875rem;
    color: #4a3a2a;
    letter-spacing: 0.1em;
}

/* ── PANEL FOOTER ── */
.sp-footer {
    padding: 0.75rem 1.25rem;
    border-top: 0.0625rem solid rgba(58,26,14,0.2);
    text-align: center;
    flex-shrink: 0;
}

.sp-footer a {
    font-family: 'Cinzel', serif;
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #6b4a30;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sp-footer a:hover { color: #ff5a1f; }

/* ── HIDE BUTTON WHEN PANEL OPEN ── */
.stream-toggle.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(100%);
}