/* dexhero-stream-view — live Cradle session panel.
 * Owner watches their dexhero playing in real time. Glass overlay
 * floating top-right by default, draggable later. */

#dexhero-stream-view {
    position: fixed;
    top: 88px;
    right: 24px;
    width: 420px;
    max-width: 92vw;
    max-height: calc(100dvh - 120px);
    z-index: 60;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(13,17,23,0.96), rgba(8,11,16,0.96));
    border: 1px solid var(--rule-strong, rgba(255,255,255,0.12));
    border-radius: 12px;
    box-shadow: 0 24px 48px rgba(0,0,0,0.6), 0 0 0 1px rgba(6,182,212,0.15);
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    font-family: var(--font-display, -apple-system, sans-serif);
}
#dexhero-stream-view[hidden] { display: none; }

#dexhero-stream-view .dxs__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--rule, rgba(255,255,255,0.08));
    background: rgba(0,0,0,0.25);
}
#dexhero-stream-view .dxs__title {
    flex: 1;
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: 11.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-2, rgba(255,255,255,0.7));
}
#dexhero-stream-view .dxs__title strong {
    color: var(--acc-cyan, #6ee7ff);
    margin-left: 4px;
}
#dexhero-stream-view .dxs__stop,
#dexhero-stream-view .dxs__close {
    appearance: none;
    border: 1px solid var(--rule-strong, rgba(255,255,255,0.18));
    background: transparent;
    color: var(--ink-1, rgba(255,255,255,0.85));
    border-radius: 999px;
    padding: 4px 10px;
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    cursor: pointer;
    transition: color 140ms, border-color 140ms, background 140ms;
}
#dexhero-stream-view .dxs__stop:hover {
    color: #ff8a8a;
    border-color: rgba(255,90,90,0.6);
}
#dexhero-stream-view .dxs__close { padding: 2px 8px; font-size: 14px; line-height: 1; }
#dexhero-stream-view .dxs__close:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

#dexhero-stream-view .dxs__stage {
    position: relative;
    background: #04060a;
    aspect-ratio: 4 / 5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
#dexhero-stream-view .dxs__frame {
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
}
#dexhero-stream-view .dxs__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.45);
    font-family: var(--font-mono, monospace);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
#dexhero-stream-view .dxs__placeholder[hidden] { display: none; }

#dexhero-stream-view .dxs__moves {
    list-style: none;
    margin: 0;
    padding: 8px 12px;
    max-height: 180px;
    overflow-y: auto;
    background: rgba(0,0,0,0.4);
    border-top: 1px solid var(--rule, rgba(255,255,255,0.08));
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    color: var(--ink-2, rgba(255,255,255,0.78));
}
#dexhero-stream-view .dxs__move {
    padding: 3px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    word-break: break-word;
}
#dexhero-stream-view .dxs__move:last-child { border-bottom: 0; }
#dexhero-stream-view .dxs__move--brain_error,
#dexhero-stream-view .dxs__move--worker_disconnected { color: #ff8a8a; }
#dexhero-stream-view .dxs__move--ended { color: var(--acc-cyan, #6ee7ff); font-weight: 600; }
#dexhero-stream-view .dxs__move--fallback { color: rgba(255,200,120,0.85); }

@media (max-width: 640px) {
    #dexhero-stream-view {
        top: 64px; right: 8px; left: 8px;
        width: auto; max-width: none;
    }
}
