/* Topbar, split layout, video stage, and responsive rules. */

.topbar {
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    letter-spacing: .2px;
    white-space: nowrap;
}

.brand-icon { color: var(--accent); }

/* ---------- Split layout ---------- */

.layout {
    display: flex;
    height: calc(100% - var(--topbar-h));
}

.stage {
    flex: 1 1 0;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    padding: 14px;
    gap: 12px;
    min-height: 0;
}

.resizer {
    flex: none;
    width: 5px;
    cursor: col-resize;
    background: transparent;
    transition: background .15s;
}

.resizer:hover, .resizer.dragging { background: var(--accent); }

/* ---------- Video stage ---------- */

.video-wrap {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    background: #000;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

#mainVideo {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
    object-fit: contain;
}

.stage-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--muted);
    background: var(--panel);
    text-align: center;
    padding: 20px;
}

.stage-empty svg { width: 46px; height: 46px; opacity: .45; margin-bottom: 6px; }
.stage-empty p { margin: 0; font-size: 15px; color: var(--text); }
.stage-empty span { font-size: 12.5px; }
.stage-empty.hidden { display: none; }

/* Transient feedback for keyboard actions. */
.osd {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    padding: 7px 15px;
    border-radius: 999px;
    background: rgba(10, 12, 18, .82);
    border: 1px solid var(--line);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    opacity: 0;
    transition: opacity .2s;
    pointer-events: none;
}

.osd.show { opacity: 1; }

/* ---------- Now playing bar ---------- */

.now-playing {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    flex: none;
}

.np-text { min-width: 0; flex: 1; }

.np-text h1 {
    margin: 0;
    font-size: 14.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.np-text span { color: var(--muted); font-size: 12px; }

.np-actions { display: flex; align-items: center; gap: 8px; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .layout { flex-direction: column; }
    .resizer { display: none; }
    .gallery { width: auto; max-width: none; padding: 0 14px 14px; }
    .stage { min-height: 52vh; }
    .search input { width: 130px; }
    .brand span, .select { display: none; }
}
