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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #1a1a2e;
    color: #e0e0e0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

header {
    background: #16213e;
    padding: 12px 20px;
    border-bottom: 1px solid #0f3460;
}

header h1 {
    font-size: 18px;
    font-weight: 600;
    color: #e94560;
}

.container {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.sidebar {
    width: 240px;
    min-width: 200px;
    background: #16213e;
    border-right: 1px solid #0f3460;
    padding: 16px;
    overflow-y: auto;
}

.sidebar h2 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 12px;
}

.stream-group {
    margin-bottom: 16px;
}

.stream-name {
    font-size: 14px;
    font-weight: 600;
    color: #e94560;
    padding: 4px 0;
    cursor: default;
}

.scenario-item {
    display: block;
    padding: 6px 12px;
    font-size: 13px;
    color: #ccc;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s;
}

.scenario-item:hover {
    background: #0f3460;
}

.scenario-item.active {
    background: #e94560;
    color: #fff;
}

.muted {
    color: #666;
    font-size: 13px;
}

.main {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: row;
    padding: 20px;
    gap: 16px;
    overflow: hidden;
}

.player-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
}

.player-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    width: 960px;
    height: 540px;
}

video {
    width: 960px;
    height: 540px;
    object-fit: contain;
}

.switch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.switch-overlay-text {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}

.logs-panel {
    flex: 1;
    min-width: 300px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
}

.logs-header {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    background: #161616;
    border-bottom: 1px solid #333;
}

.logs-container {
    flex: 1;
    min-height: 0;
    overflow-y: scroll;
    padding: 8px 12px;
    font-family: "Cascadia Code", "Fira Code", "Consolas", monospace;
    font-size: 12px;
    line-height: 1.5;
    color: #ccc;
    white-space: pre-wrap;
    word-break: break-all;
}

.info-panel {
    display: flex;
    gap: 24px;
    padding: 12px 16px;
    background: #16213e;
    border-radius: 6px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.label {
    font-size: 13px;
    color: #888;
}

.status {
    font-size: 13px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 3px;
}

.status-running {
    background: #1b5e20;
    color: #4caf50;
}

.status-not-ready {
    background: #b71c1c;
    color: #ef5350;
}

.status-unknown {
    background: #424242;
    color: #9e9e9e;
}

footer {
    background: #16213e;
    border-top: 1px solid #0f3460;
    padding: 8px 20px;
    font-size: 12px;
    color: #888;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: 0;
        border-right: none;
        border-bottom: 1px solid #0f3460;
        max-height: 200px;
    }

    .main {
        flex-direction: column;
    }

    .player-section, .player-wrap, video {
        width: 100%;
        height: auto;
    }

    .info-panel {
        flex-direction: column;
        gap: 8px;
    }

    .logs-panel {
        min-width: 0;
        max-height: 300px;
    }
}
