html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    background: black;
    overflow-x: hidden;          /* Prevent accidental horizontal scroll */
    overflow-y: hidden;          /* Hide page scrollbar; let content manage its own */
}

/* Ensure the Blazor page layout uses full viewport and flex */
.page {
    display: flex;               /* Make layout a flex column */
    flex-direction: column;
    width: 100%;
    min-height: 100vh;           /* Fill viewport height */
}

.sidebar {
    /* keep existing sidebar sizing from component */
}

main {
    display: flex;
    flex: 1 1 auto;              /* Allow main to fill remaining space */
    min-height: 0;               /* Enable children to scroll inside */
}

/* Content area should be a flex column so child pages can stretch */
.content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    box-sizing: border-box;
    padding-top: 1.1rem;
    min-height: 0;               /* Prevent flex overflow */
    overflow: auto;              /* Scroll only when needed inside content */
}

/* Accessible player buttons */
.player-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1 1 auto;                /* Fill the content area */
    box-sizing: border-box;
    padding-bottom: env(safe-area-inset-bottom, 1rem);
    justify-content: flex-start;    /* Small: rows stack naturally */
}

.player-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.player-row.top {
    justify-content: space-between;
}

.player-row.bottom {
    justify-content: space-between;
    align-items: flex-end;          /* Align buttons to the bottom within row */
    margin-bottom: 20px;
}

/* High-contrast, large touch target */
.player-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 0.75rem 1rem;
    margin: 10px;
    font-weight: 600;
    border: 2px solid #000;
    color: #000;
    background-color: #FFD000;
}

.player-btn:focus {
    outline: 3px solid #000;
    outline-offset: 2px;
}

.player-btn:hover {
    background: white;
    filter: brightness(0.95);
}

.player-btn[aria-pressed="true"] {
    background-color: #00C853;
    color: #000;
    border-color: #000;
}

/* Responsive sizing for player buttons */
@media (max-width: 767.98px) {
    .player-btn {
        width: 100% !important;
        box-sizing: border-box;
    }

    #player-btn-list,
    #player-btn-play,
    #player-btn-pause,
    #player-btn-config {
        width: 100% !important;
    }
}

@media (min-width: 768px) {
    #player-btn-list {
        height: 100px;
        width: 200px;
    }

    #player-btn-play {
        height: 100px;
        width: 200px;
    }

    #player-btn-pause {
        height: 100px;
        width: 200px;
    }

    #player-btn-config {
        height: 100px;
        width: 200px;
    }
}

/* Hide Blazor error UI by default; it will be shown by Blazor on errors */
#blazor-error-ui { display: none; }
#blazor-error-ui .dismiss { cursor: pointer; }