html,
body {
    width: 100%;
    height: 100%;
}

body {
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background: #111418;
}

.panel {
    background: rgba(33, 37, 41, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 1rem;
    backdrop-filter: blur(8px);
}

.login-shell {
    min-height: 100vh;
}

.login-card {
    width: min(440px, 100%);
}

.app-shell {
    min-height: 100vh;
    padding: 1rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.topbar {
    flex: 0 0 auto;
}

.workspace {
    flex: 1 1 auto;
    min-height: 0;
    align-items: stretch;
}

.player-pane {
    flex: 1 1 60%;
    min-width: 0;
}

.list-pane {
    flex: 1 1 40%;
    min-width: 0;
    min-height: 0;
    max-height: calc(100vh - 8rem);
}

.video-panel,
.control-panel,
.list-pane {
    min-width: 0;
}

.video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 0.75rem;
    background: #000;
}

#video-player {
    width: 100%;
    height: 100%;
    display: none;
}

.video-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #adb5bd;
}

.filter-bar .form-select {
    min-width: 132px;
}

.video-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.video-card {
    width: calc(33.333% - 0.75rem);
    min-width: 150px;
    overflow: hidden;
}

.video-card-body {
    padding: 0.75rem;
}

.video-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.video-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-meta,
.empty-state {
    color: #adb5bd;
}

.empty-state {
    width: 100%;
}

.choice-shell {
    min-height: 100vh;
}

.choice-panel {
    max-width: 960px;
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.choice-card {
    display: block;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.choice-card:hover {
    background: rgba(255, 255, 255, 0.07);
}

@media (max-width: 1280px) {
    .list-pane {
        flex-basis: 40%;
    }

    .video-card {
        width: calc(50% - 0.5rem);
    }
}

@media (max-width: 992px) {
    .topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .workspace {
        flex-direction: column;
    }

    .list-pane {
        min-width: 0;
        max-height: none;
    }

    .video-list {
        overflow: visible;
    }

    .video-card {
        width: calc(33.333% - 0.75rem);
    }
}

@media (max-width: 768px) {
    .filter-bar {
        width: 100%;
    }

    .filter-bar .form-select {
        flex: 1 1 0;
        min-width: 0;
    }

    .video-card {
        width: calc(50% - 0.5rem);
    }

    .choice-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .video-card {
        width: 100%;
    }
}
