/**
 * Scoreboard Styles
 * 
 * Stylesheet for the Scoreboard page
 */

:root {
    --admin-bar: 0px;
}

div#main-scoreboard-container {
    min-height: calc(100vh - var(--admin-bar));
    display: flex;
    flex-flow: row wrap;
}
div#main-scoreboard-container > header, 
div#main-scoreboard-container > footer {
    width: 100%;
    height: 100px;
    position: relative;
    background: var(--theme-palette-color-7);
    padding: 10px 25px;
    display: flex;
    align-items: center;
}
div#main-scoreboard-container > header {
    border-bottom: 1px solid var(--theme-palette-color-6);
    /* margin-bottom: 10px; */
}
div#main-scoreboard-container > footer {
    border-top: 1px solid var(--theme-palette-color-6);
    /* margin-top: 10px; */
    height: 50px;
}
div#main-scoreboard-container > section {
    width: calc(100% / 3);
    max-height: calc(100vh - var(--admin-bar) - 150px);
    display: flex;
    height: 100vh;
    overflow-y: scroll;
    overflow-x: hidden;
    position: relative;
}
body:not(.logged-in) div#main-scoreboard-container > section {
    max-height: calc(100vh - var(--admin-bar) - 140px);
}
body:not(.logged-in) div#main-scoreboard-container > footer {
    display: none;
}
div#main-scoreboard-container > section.full-width {
    width: 100%;
}

@media screen and (max-width: 768px) {
    div#main-scoreboard-container > section {
        width: 100%;
    }
}
section.border-r {
    border-right: 1px solid var(--theme-palette-color-6);
}
h1, h2, h3, h4, h5, h6 {
    font-weight: 100;
    margin: 0;
}

/* Form Styles */
section.p-20 {
    padding: 20px;
}

section h3 {
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 400;
}

section h3:not(:first-child) {
    margin-top: 30px;
}

section.admin-controls > div {
    flex-direction: column;
}

section.admin-preview {
    background: var(--theme-palette-color-8);
}

/* Notices List Styles */
section.right {
    padding: 20px;
}

#notices-list {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    position: absolute;
    inset: auto 10px 10px auto;
    width: calc(100vw - 20px);
    max-width: 300px;
}

#notices-list li {
    padding: 0;
    margin-bottom: 10px;
    background: var(--theme-palette-color-1);
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

#notices-list li .notice-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 3px 10px 0;
    background: var(--theme-palette-color-2);
    line-height: 1;
}

#notices-list li .notice-label {
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#notices-list li .timestamp {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    margin-left: auto;
}

#notices-list li .notice-body {
    padding: 10px 15px;
}

#notices-list li .message {
    display: block;
    font-size: 18px;
    line-height: 1.1;
    color: black;
    font-weight: 900;
}

#notices-list li .close-btn {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    height: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    bottom: 2px;
}

#notices-list li .close-btn svg {
    height: 13px;
}

#notices-list li .close-btn:hover {
    color: black;
}

/* Progress Bar Styles */
#progress-bar-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: var(--theme-palette-color-8);
    overflow: hidden;
}

#progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--theme-palette-color-7) calc(100% - 100px), var(--theme-palette-color-6));
    width: 0;
    animation: progress-animation 10s linear;
}

@keyframes progress-animation {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}


#main-scoreboard-container {
    section#categories {
        display: flex;
        flex-direction: column;
    }
    
    /* Category Header - single row layout */
    .awards-category .category-header {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 10px;
    }
    
    /* Past category header layout */
    .awards-category.past .category-header {
        display: flex;
        flex-flow: column;
        gap: 0;
        justify-content: center;
        align-items: self-start;
    }
    
    /* Category toggle button - styled like logout button */
    .awards-category .category-toggle {
        display: none;
        height: 35px;
        width: 35px;
        padding: 8px;
        fill: var(--theme-palette-color-5);
        border-radius: 100%;
        border: 1px solid var(--theme-palette-color-8);
        background: var(--theme-palette-color-8) !important;
        cursor: pointer;
        flex-shrink: 0;
        margin-left: auto;
        margin-right: 10px;
    }
    
    .awards-category.open .category-toggle {
        margin-right: 0;
    }
    .awards-category .category-toggle:hover {
        background: var(--theme-palette-color-7);
        border: 1px solid var(--theme-palette-color-6);
    }
    
    .awards-category .category-toggle svg {
        width: 100%;
        height: 100%;
    }
    
    /* Show toggle button only on past categories */
    .awards-category.past .category-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Rotate icon when open */
    .awards-category.past.open .category-toggle svg {
        transform: rotate(180deg);
    }
    
    .awards-category .category-title {
        background: none !important;
        margin: 0;
        font-size: inherit;
        backdrop-filter: none;
        padding: 0;
        position: static;
        translate: 0;
        font-weight: bold;
    }
    
    .awards-category .category-winner-summary {
        font-size: 14px;
        color: var(--theme-palette-color-4);
        font-weight: 400;
        display: none;
    }
    
    /* Show winner summary when past category is collapsed (not open) */
    .awards-category.past:not(.open) .category-winner-summary {
        display: inline;
    }
    
    .awards-category .category-badge {
        display: none;
        flex-shrink: 0;
        width: 20px;
        height: 35px;
        margin-right: 15px;
    }
    
    .awards-category .category-badge svg {
        width: 100%;
        height: 100%;
        fill: var(--theme-palette-color-1);
    }
    
    .awards-category.past .category-badge {
        display: inline-flex;
    }
    
    /* Past categories are collapsed by default, unless they have .open class */
    .awards-category.past:not(.open) ul.nominations-list {
        display: none;
    }
    
    .awards-category {
        padding: 10px;
        background: var(--theme-palette-color-7);
        border: 1px solid color-mix(in oklab, var(--theme-palette-color-6) 50%, var(--theme-palette-color-4) 10%);
        border-radius: 15px;
        margin-bottom: 20px;
        display: flex;
        flex-flow: row wrap;

        &.past:not(.open) {
            margin-bottom: 5px;
            padding: 8px 0;
            border-radius: 0;
            border-width: 0px 0px 1px;
            background: var(--theme-palette-color-8);
            align-items: center;
        }

        .friend-initials {
            top: 0;
        }
    }


    .prediction-favourites > * {
        display: flex;
        gap: 5px;
    }
    .prediction-favourites .favourites .prediction-icon {
        width: 25px;
        height: 25px;
    }
    .prediction-favourites .predictions .prediction-icon {
        width: 35px;
        height: 35px;
    }


    .awarded-categories {
        order: -110;
    }
    .upcoming-categories {
        order: -1;
        display: none;
    }
    section#categories:has(>.awards-category:not(.past)) .upcoming-categories {
        display: block;
    }
    section#categories:not(:has(>.past)) .awarded-categories {
        display: none;
    }
    section#categories:has(>.past) .upcoming-categories {
        margin-top: 35px;
    }


    ul.nominations-list {
        flex-flow: column;
        padding: 0;
        gap: 10px;
        margin-bottom: 0px !important;
        margin-top: 1em;
        width: 100%;
    }
    /* ul.nominations-list.category-best-picture {
        flex-flow: row wrap;
    }
    ul.nominations-list.category-best-picture > li {
        width: calc((100% - 10px) / 2);
    }
    ul.nominations-list.category-best-picture h3 {
        font-size: 12px;
        line-height: 1;
    } */
    ul.nominations-list > li:has(.favourites:not(:empty)) {
        order: -10;
    }
    ul.nominations-list > li:has(.predictions:not(:empty)) {
        order: -20;
    }
    ul.nominations-list > li.winner {
        order: -30 !important;
    }
    ul.nominations-list > li {
        flex-flow: column wrap;
        padding: 0;
        width: 100%;
        height: 102px;
        background: color-mix(in oklab, var(--theme-palette-color-6) 0%, var(--theme-palette-color-4) 5%);
        border: 1px solid color-mix(in oklab, var(--theme-palette-color-6) 100%, var(--theme-palette-color-4) 17%);
        position: relative;
    }
    
    /* Prediction/Favourite Container */
    .prediction-favourites {
        display: flex;
        gap: 5px;
        margin-top: auto;
        padding-top: 5px;
        padding-right: 5px;
        justify-content: flex-end;
    }
    
    /* Prediction Icons */
    .prediction-favourites .prediction-icon {
        width: 30px;
        height: 30px;
        flex-shrink: 0;
    }
    
    .prediction-favourites .prediction-icon {
        position: relative;
        transition: transform 0.2s ease;
    }
    
    .prediction-favourites .prediction-icon .friend-photo {
        width: 30px;
        height: 30px;
        margin: 0;
        border-radius: 50%;
        overflow: hidden;
        border: 3px solid var(--theme-palette-color-7);
        flex-shrink: 0;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        background: color-mix(in oklab, var(--theme-palette-color-6) 0%, var(--theme-palette-color-4) 5%);
        transition: border-color 0.2s ease;
    }
    
    /* Gold border for predictions */
    .prediction-favourites .prediction-icon.prediction-prediction .friend-photo {
        border-color: var(--theme-palette-color-1);
    }
    
    /* Pinkish border for favourites */
    .prediction-favourites .prediction-icon.prediction-favourite .friend-photo {
        border-color: #cd5c5c;
    }
    
    /* Split border for both prediction and favourite */
    .prediction-favourites .prediction-icon.prediction-both .friend-photo {
        border: 3px solid;
        border-image: linear-gradient(to right, var(--theme-palette-color-1) 50%, #cd5c5c 50%) 1;
        border-radius: 50%;
        /* Fallback for border-radius with border-image */
        background: linear-gradient(var(--theme-palette-color-7), var(--theme-palette-color-7)) padding-box,
                    linear-gradient(to right, var(--theme-palette-color-1) 50%, #cd5c5c 50%) border-box;
        border: 3px solid transparent;
    }
    
    /* Tooltip styling */
    .prediction-favourites .prediction-tooltip {
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
        background: var(--theme-palette-color-2);
        color: white;
        padding: 6px 10px;
        border-radius: 4px;
        font-size: 12px;
        white-space: nowrap;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.2s ease;
        margin-bottom: 6px;
        z-index: 10;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    .prediction-favourites .prediction-tooltip::after {
        content: '';
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        border: 5px solid transparent;
        border-top-color: var(--theme-palette-color-2);
    }
    
    .prediction-favourites .prediction-icon:hover .prediction-tooltip {
        opacity: 1;
    }
    
    /* Show all predictions button */
    .prediction-favourites .show-all-predictions-btn {
        background: none !important;
        border: 1px solid;
        color: var(--theme-palette-color-5) !important;
        opacity: 0.4;
        width: 60px;
        height: 30px;
        padding: 0 !important;
        margin: 3px 0;
        border-radius: 3px;
        cursor: pointer;
        transition: opacity 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .prediction-favourites .show-all-predictions-btn svg {
        width: 24px;
        height: 24px;
    }
    
    .prediction-favourites .show-all-predictions-btn svg path {
        fill: var(--theme-palette-color-5) !important;
    }
    
    .prediction-favourites .show-all-predictions-btn:hover {
        opacity: 1;
        background: none !important;
    }
    
    .prediction-favourites .show-all-predictions-btn:hover svg path {
        fill: var(--theme-palette-color-4) !important;
    }

    .pred-fav-btns {
        margin-right: auto;
    }
    
    .awards-category.active .show-all-predictions-btn,
    .prediction-favourites:not(.has-many) .show-all-predictions-btn,
    &:not(.show-all-predictions) .awards-category:not(.active) .prediction-favourites.has-many .predictions,
    &:not(.show-all-predictions) .awards-category:not(.active) .prediction-favourites.has-many .favourites,
    &.show-all-predictions .pred-fav-btns,
    &.show-all-predictions .show-all-predictions-btn {
        display: none;
    }

    .prediction-favourites .prediction-icon .friend-photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
    }
    
    .prediction-favourites .prediction-icon .friend-initials {
        background-color: hsl(calc(var(--randomcolornum) * 0.36) 90% 70%);
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: 600;
        color: black;
        border-radius: 50%;
    }
    
    ul.nominations-list .film-poster, 
    ul.nominations-list .nominee-photo {
        height: 100px;
        width: 65px;
        border-radius: 9px 0px 0px 9px;
        overflow: hidden;
    }
    ul.nominations-list .film-poster img, 
    ul.nominations-list .nominee-photo img {
        border-radius: 0px;
    }
    ul.nominations-list img {
        object-fit: cover;
    }
    ul.nominations-list.nominee_visibility-prominent .film-poster {
        margin-top: auto;
        margin-left: -10px;
        margin-bottom: 5px;
        height: 60px;
        width: 41px;
        border-radius: 3px;
        box-shadow: 0 0 5px var(--theme-palette-color-6);
    }
    ul.nominations-list .left-section {
        display: flex;
        gap: 5px;
        margin-right: 10px;
    }
    ul.nominations-list .right-section {
        width: calc(100% - 75px);
        display: flex;
        flex-flow: column-reverse;
        height: 100%;
        padding: 5px 0;
    }
    .left-section:has(span.nominee-photo) + .right-section {
        width: calc(100% - 115px);
    }
    ul.nominations-list h3 {
        margin: 0;
    }
    ul.nominations-list .film-name {
        padding: 0;
    }
    ul.nominations-list .film-name:has(+.nominees-name) {
        font-size: 12px;
    }
    .awards-category.active,
    .awards-category.awarded {
        /* background: var(--theme-palette-color-2); */
        order: -1000;
        border: 2px solid var(--theme-palette-color-1);
    }
    ul.nominations-list > li {
        background:  color-mix(in oklab, var(--theme-palette-color-8) 0%, var(--theme-palette-color-4) 5%) !important;
        border-color: rgba(0, 0, 0, 0) !important;
    }
    ul.nominations-list > li.watched::after {
        display: none;
    }
    



    ul.nominations-list > li .pred-fav-btns button {
        background: none !important;
        border: 1px solid;
        color: 1px solid var(--theme-palette-color-5) !important;
        opacity: 0.2;
        width: 30px;
        height: 30px;
        padding: 0 !important;
        margin: 3px 0;
        
        svg path {
            fill: var(--theme-palette-color-5) !important;
        }
        
        &:hover {
            fill: var(--theme-palette-color-4) !important;
            opacity: 1;

            svg path {
                fill: var(--theme-palette-color-4) !important;
            }
        }
    }
    /* .awards-category.past .pred-fav-btns,
    ul.nominations-list > li:not(:hover) .pred-fav-btns,
    .awards-category:not(.past) ul.nominations-list > li:hover .film-name,
    .awards-category:not(.past) ul.nominations-list > li:hover .nominees-name {
        display: none;
    }


    ul.nominations-list > li:hover .pred-fav-btns {
        width: 30px;
    }
    ul.nominations-list > li:hover .prediction-favourites {
        width: calc(100% - 30px);
    }
    ul.nominations-list > li:hover .right-section {
        flex-flow: row wrap;
    } */


    /* Films List Styles */
    section#films {
        display: flex;
        flex-direction: column;
    }

    .films-list > header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1em;
    }

    .films-list > header h2 {
        margin: 0;
    }

    section#films ul {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    section#films .film-item {
        display: flex;
        align-items: center;
        gap: 12px;
        border-bottom: 1px solid var(--theme-palette-color-6);
        padding-bottom: 12px;
        justify-content: space-between;
    
        &[style="order: 0;"] {
            display: none !important;
        }
    }

    section#films .film-poster {
        width: 40px;
        height: 60px;
        border-radius: 4px;
        overflow: hidden;
        flex-shrink: 0;
        background: color-mix(in oklab, var(--theme-palette-color-6) 0%, var(--theme-palette-color-4) 5%);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    section#films .film-poster img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    section#films .film-poster svg {
        width: 20px;
        height: 20px;
        fill: var(--theme-palette-color-6);
    }

    section#films .film-details {
        flex: 1;
    }

    section#films .film-info {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        gap: 2px;
        flex: 1;
    }

    section#films .film-name {
        font-size: 14px;
        font-weight: 500;
        color: var(--theme-palette-color-3);
    }

    section#films .film-nominations {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        margin-top: 8px;
    }

    section#films .film-nominations:empty {
        display: none;
    }

    section#films .trophy-icon {
        position: relative;
        width: 20px;
        height: 20px;
        cursor: pointer;

        &:not(.winner) {
            display: none;
        }
    }

    section#films .trophy-icon svg {
        width: 100%;
        height: 100%;
        fill: var(--theme-palette-color-5);
        transition: fill 0.2s ease;
    }

    section#films .trophy-icon:hover svg {
        fill: var(--theme-palette-color-4);
    }

    section#films .trophy-icon.winner svg {
        fill: var(--theme-palette-color-1);
    }

    section#films .trophy-tooltip {
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
        background: var(--theme-palette-color-3);
        color: var(--theme-palette-color-8);
        padding: 6px 10px;
        border-radius: 6px;
        font-size: 11px;
        white-space: nowrap;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease, visibility 0.2s ease;
        z-index: 100;
        pointer-events: none;
        margin-bottom: 5px;
    }

    section#films .trophy-icon:hover .trophy-tooltip {
        opacity: 1;
        visibility: visible;
    }

    section#films .film-wins {
        font-size: 2em;
    }





    .awards-category.active {
        animation: gold-pulse 2s ease-in-out infinite;
    }
}
@media screen and (min-width: 950px) {
    #main-scoreboard-container {

        #categories:has(.active):after {
            content: "";
            background: black;
            position: fixed;
            inset: 0;
            z-index: 99;
            opacity: 0.9;
        }
        .awards-category.active {
            animation: gold-pulse 2s ease-in-out infinite;
            position: fixed;
            inset: 50% auto auto 50%;
            transform: translate(-50%, -50%);
            margin: 0;
            z-index: 100;
            width: 90vw !important;
            max-width: 1200px;
            min-width: 850px;
            display: flex;
            flex-flow: column;

            .category-title {
                display: flex;
                justify-content: center;
                font-size: 32px;

                &:before {
                    content: "Awarding: ";
                    padding-right: 10px;
                }
            }

            ul.nominations-list {
                flex-flow: row wrap !important;
                flex: 1;
            }
            ul.nominations-list > li {
                width: calc((100% - 40px) / 5);
                flex-flow: column;
                height: auto;
                align-items: center;
                padding: 15px 5px 0;
                background: color-mix(in oklab, var(--theme-palette-color-8) 0%, var(--theme-palette-color-4) 3%) !important;
            }
            ul.nominations-list .left-section, 
            ul.nominations-list .right-section {
                width: 100% !important;
                height: auto !important;
                display: flex;
                justify-content: center;
                text-align: center;
                margin-bottom: 15px;
            }
            ul.nominations-list .film-poster, 
            ul.nominations-list .nominee-photo {
                height: 160px;
                width: 110px;
                border-radius: 10px;
                overflow: hidden;
            }
            ul.nominations-list.nominee_visibility-prominent .film-poster {
                margin-top: auto;
                margin-left: 0px;
                margin-bottom: 0;
                height: 100px;
                width: 70px;
                border-radius: 10px;
                box-shadow: none;
            }
            ul.nominations-list h3 {
                font-size: 28px;
            }
            ul.nominations-list .film-name:has(+.nominees-name) {
                font-size: 18px;
                min-height: 45px;
                display: flex;
                justify-content: center;
                align-items: center;
                margin-bottom: 15px;
            }

            ul.nominations-list .right-section {
                flex: 1;
            }
            .prediction-favourites {
                height: 150px;
                flex-flow: column-reverse;
                align-items: center;
                justify-content: end;
            }
            .pred-fav-btns {
                margin-right: 0;
            }
            ul.nominations-list > li .pred-fav-btns button {
                width: 50px;
                height: 50px;

                svg {
                    height: 25px;
                }
            }
            .prediction-favourites .prediction-icon,
            .prediction-favourites .prediction-icon .friend-photo {
                width: 40px;
                height: 40px;
                border-width: 0px;
            }
            .prediction-favourites .prediction-favourite {
                order: 1;
            }
            .prediction-favourites .prediction-favourite,
            .prediction-favourites .prediction-favourite .friend-photo {
                width: 30px;
                height: 30px;
                border-width: 0px;
            }
            .prediction-favourites .prediction-prediction .friend-initials {
                font-size: 20px;
            }
            .prediction-favourites .prediction-tooltip {
                font-size: 18px;
            }
        }
    }
}


/* Friends List Styles */
.friends-list > header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1em;

    h2 {
        margin: 0;
    }

    .scoreboard-back-link {
        height: 45px;
        width: 45px;
        padding: 10px;
        fill: var(--theme-palette-color-5);
        border-radius: 100%;
        border: 1px solid var(--theme-palette-color-8);
    }
    .scoreboard-back-link:hover {
        background: var(--theme-palette-color-7);
        border: 1px solid var(--theme-palette-color-6);
    }
}


section#friends {
    display: flex;
    flex-direction: column;
}

section#friends ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

section#friends .friend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--theme-palette-color-6);
    padding-bottom: 12px;
    justify-content: space-between;

    .friend-avatar {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        overflow: hidden;
        flex-shrink: 0;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        background: color-mix(in oklab, var(--theme-palette-color-6) 0%, var(--theme-palette-color-4) 5%);
    }

    .friend-avatar img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
        z-index: 1;
    }

    .friend-avatar .friend-initials {
        background-color: hsl(calc(var(--randomcolornum) * 0.36) 90% 70%);
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        font-weight: 600;
        color: black;
        border-radius: 50%;
        position: relative;
        z-index: 0;
    }

    .friend-details {
        flex: 1;
    }

    .friend-info {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        gap: 2px;
        flex: 1;
    }

    .friend-display-name {
        font-size: 14px;
        font-weight: 500;
        color: var(--theme-palette-color-3);
    }

    .friend-file-size {
        font-size: 11px;
        color: var(--theme-palette-color-4);
        font-weight: 400;
    }

    .friend-data-url {
        font-size: 10px;
        color: var(--theme-palette-color-5);
        word-break: break-all;
    }

    .friend-predictions {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        margin-top: 8px;
    }

    .friend-predictions:empty {
        display: none;
    }

    .friend-predictions .prediction-trophy {
        position: relative;
        width: 20px;
        height: 20px;
        cursor: pointer;

        &:not(.winner) {
            display: none;
        }
    }

    .friend-predictions .prediction-trophy svg {
        width: 100%;
        height: 100%;
        fill: var(--theme-palette-color-1);
        transition: fill 0.2s ease;
    }

    .friend-predictions .prediction-trophy:hover svg {
        fill: var(--theme-palette-color-1);
    }

    .friend-predictions .prediction-trophy.also-favourite svg {
        fill: var(--theme-palette-color-2);
    }

    .friend-predictions .prediction-trophy .trophy-tooltip {
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
        background: var(--theme-palette-color-3);
        color: var(--theme-palette-color-8);
        padding: 6px 10px;
        border-radius: 6px;
        font-size: 11px;
        white-space: nowrap;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease, visibility 0.2s ease;
        z-index: 100;
        pointer-events: none;
        margin-bottom: 5px;
    }

    .friend-predictions .prediction-trophy:hover .trophy-tooltip {
        opacity: 1;
        visibility: visible;
    }
 
    .friend-score {
        font-size: 2em;
    }
}

@media (prefers-color-scheme: dark) {
    section#friends .friend-photo .friend-initials,
    section#friends .friend-avatar .friend-initials,
    ul.nominations-list > li .prediction-icon .friend-initials {
        background-color: hsl(calc(var(--randomcolornum) * 0.36) 50% 40%);
        color: white;
    }

}

@keyframes gold-pulse {
    0%, 100% {
        box-shadow: 0 0 10px var(--theme-palette-color-1);
    }
    50% {
        box-shadow: 0 0 30px var(--theme-palette-color-1);
    }
}







/* Admin Controls Styles */

div#main-scoreboard-container > section.admin-controls > div {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 20px;
    padding: 10px 20px;
}

.controller {
    border: 1px solid var(--theme-palette-color-6);
    border-radius: 10px;
    padding: 10px;
    background-color: var(--theme-palette-color-7);
    overflow: auto;
}

/* Grid positioning for different controllers */
.controller.upcoming-categories-controller {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

.controller.current-category-controller {
    grid-column: 2 / 3;
    grid-row: 1 / 4;
}

.controller.interval-control-controller {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
}

.controller.notice-posting-controller {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
}

.controller.event-status-controller {
    grid-column: 1 / 2;
    grid-row: 3 / 4;
}

.controller.danger-zone {
    grid-column: 3 / 4;
    grid-row: 3 / 4;
}

.controller h2,
.controller h2 + p {
    margin: 0;
    text-align: center;
}
.controller h2 + p {
    margin-bottom: 25px;
}

div#main-scoreboard-container h1 {
    text-align: center;
    width: 100%;
}

body:not(.testing) .controller:not(:hover) {
    display: flex;
    align-items: center;
    justify-content: center;
}
body:not(.testing) .controller:not(:hover) > * {
    display: none !important;
}
body:not(.testing) .controller:not(:hover) > h2 {
    display: block !important;
    opacity: 0.3;
    filter: grayscale(1);
}

.controller > div {
    padding: 15px;
    background: var(--theme-palette-color-8);
    border-radius: 4px;
    border: 1px solid var(--theme-palette-color-6);
}

.interval-setting {
    width: calc(50% - 5px);
    float: left;
}
.interval-setting:last-child {
    float: right;
}

select, textarea, input:is([type=url],[type=tel],[type=text],[type=time],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=number],[type=search],[type=password]), .ct-pseudo-input, fieldset .wc-stripe-elements-field, .ff-inherit-theme-style .ff-el-form-control:not([size]):not([multiple]) {
    border: 1px solid var(--theme-palette-color-6) !important;
    background: var(--theme-palette-color-7) !important;
    margin-top: 0px;
}
label + *:is(select, textarea, input:is([type=url],[type=tel],[type=text],[type=time],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=number],[type=search],[type=password]), .ct-pseudo-input, fieldset .wc-stripe-elements-field, .ff-inherit-theme-style .ff-el-form-control:not([size]):not([multiple])) {
    margin-top: 10px;
}


form {
    display: flex;
    gap: 10px;
    width: 100%;
}

button {
    text-transform: uppercase;
    background: var(--theme-palette-color-1) !important;
    color: black !important;
    border: 0;
    padding: 3px 10px 0 !important;
    font-size: 16px;
    border-radius: 5px;
}

button:hover {
    background: var(--theme-palette-color-4) !important;
    color: var(--theme-palette-color-8) !important;
    cursor: pointer;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#main-scoreboard-container #progress-bar-container {
    position: relative;
    height: 15px;
    border-radius: 5px;
    border: 2px solid var(--theme-palette-color-8);
    max-width: calc(100% - 150px);
    margin-left: auto;
    margin-right: 0;
}

#interval-input {
    width: 100px;
    padding: 8px 12px;
    border: 1px solid var(--theme-palette-color-6);
    border-radius: 4px;
    font-size: 16px;
    margin-left: auto;
}

#countdown {
    font-weight: bold;
    color: var(--theme-palette-color-1);
}

.controller.current-category-controller {
    display: flex;
    flex-direction: column;
}
#complete-category-btn {
    margin: auto;
    display: none;
}
#current-category-container:has(.active:not(.hidden) > ul > li.winner) + #complete-category-btn {
    display: block;
}

select#event-status-select {
    width: calc(100% - 150px);
}

select#event-status-select + button {
    width: 140px;
}

/* Admin Notices Management Section */
#admin-notices-section {
    margin-top: 10px;
}

#admin-notices-section summary {
    cursor: pointer;
    padding: 12px 15px;
    background: var(--theme-palette-color-8);
    border: 1px solid var(--theme-palette-color-6);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    user-select: none;
    transition: background 0.2s;
}

#admin-notices-section summary:hover {
    background: var(--theme-palette-color-7);
}

#admin-notices-section[open] summary {
    border-radius: 4px 4px 0 0;
    border-bottom: none;
}

#admin-notices-container {
    padding: 15px;
    border: 1px solid var(--theme-palette-color-6);
    border-top: none;
    border-radius: 0 0 4px 4px;
    background: var(--theme-palette-color-8);
}

#clear-all-notices {
    width: 100%;
    padding: 10px 15px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 15px;
    transition: opacity 0.2s;
}

#clear-all-notices:hover {
    opacity: 0.9;
}

#admin-notices-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#admin-notices-list .empty-state {
    padding: 20px;
    text-align: center;
    color: var(--theme-palette-color-6);
    font-size: 14px;
    font-style: italic;
}

#admin-notices-list li {
    margin-bottom: 10px;
}

/* Current Category Display */
.current-category-display {
    padding: 15px;
    background: var(--theme-palette-color-8);
    border-radius: 4px;
    border: 1px solid var(--theme-palette-color-6);
}

.current-category-display.hidden {
    display: none;
}

.current-category-display .category-title {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--theme-palette-color-6);
}

.current-category-display .nominations-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-flow: column;
    gap: 10px;
}

.current-category-display .nominations-list > li {
    display: flex;
    flex-flow: row wrap;
    padding: 0;
    width: 100%;
    height: 82px;
    background: color-mix(in oklab, var(--theme-palette-color-6) 0%, var(--theme-palette-color-4) 5%);
    border: 1px solid color-mix(in oklab, var(--theme-palette-color-6) 100%, var(--theme-palette-color-4) 17%);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.current-category-display .nominations-list > li.winner {
    border-color: var(--theme-palette-color-1);
    background: color-mix(in oklab, var(--theme-palette-color-1) 10%, var(--theme-palette-color-4) 5%);
}

.controller.current-category-controller > div {
    padding: 0;
    border: 0;
    background: none;
}

.completed-chips {
    display: flex;
    flex-flow: row wrap;
    gap: 5px;
}
.category-chip {
    font-size: 12px;
    background: var(--theme-palette-color-6);
    padding: 3px 7px 0;
}




div#main-scoreboard-container > section.admin-controls {
    width: 100%;
}
@media (max-width: 1100px) {
    div#main-scoreboard-container > section.admin-controls {
        overflow: scroll;
        scroll-snap-type: x mandatory;
    }
    /* Scroll snap for controller columns */
    .controller {
        scroll-snap-align: start;
    }
    div#main-scoreboard-container > section.admin-controls > div {
        min-width: 150%;
    }
}

@media (max-width: 768px) {
    div#main-scoreboard-container > section.admin-controls > div {
        min-width: 300%;
    }
    div#main-scoreboard-container > section.admin-controls > div {
        grid-template-rows: repeat(6, 1fr);
    }
    .controller.upcoming-categories-controller {
        grid-column: 1 / 2;
        grid-row: 1 / 3;
    }
    .controller.current-category-controller {
        grid-column: 1 / 2;
        grid-row: 3 / 7;
    }
    .controller.interval-control-controller {
        grid-column: 2 / 3;
        grid-row: 1 / 4;
    }
    .controller.event-status-controller {
        grid-column: 2 / 3;
        grid-row: 4 / 7;
    }
    .controller.notice-posting-controller {
        grid-column: 3 / 4;
        grid-row: 1 / 4;
    }
    .controller.danger-zone {
        grid-column: 3 / 4;
        grid-row: 4 / 7;
    }
}


ul.nominations-list button.mark-winner-btn {
    background: var(--theme-palette-color-6) !important;
    position: absolute;
    inset: 50% 10px auto auto;
    width: 50px;
    height: 50px;
    transform: translateY(-50%);
    z-index: 10;
}
ul.nominations-list button.mark-winner-btn:hover {
    background: var(--theme-palette-color-1) !important;
}
ul.nominations-list:has(.winner) button.mark-winner-btn {
    display: none;
}

.mobile-nav {
    display: none;
    width: 100%;
    background: var(--theme-palette-color-7);
    border-top: 1px solid var(--theme-palette-color-6);
    padding: 10px 20px;
    height: 80px;
}

.mobile-nav ul {
    display: flex;
    justify-content: center;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.mobile-nav li {
    flex: 1;
    max-width: 150px;
}

.mobile-nav-btn {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--theme-palette-color-6);
    background: var(--theme-palette-color-8) !important;
    color: var(--theme-palette-color-4) !important;
    font-size: 14px;
    font-weight: 500;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-nav-btn:hover {
    background: var(--theme-palette-color-6) !important;
    border-color: var(--theme-palette-color-5) !important;
    color: var(--theme-palette-color-4) !important;
}

.mobile-nav-btn.active {
    background: var(--theme-palette-color-1) !important;
    border-color: var(--theme-palette-color-1) !important;
    color: var(--theme-palette-color-8) !important;
}

@media screen and (max-width: 768px) {
    .mobile-nav {
        display: flex;
    }
    
    /* Hide non-active sections on mobile */
    div#main-scoreboard-container:not(.scoreboard-admin-container) > section,
    div#main-scoreboard-container > footer {
        display: none !important;
    }
    
    div#main-scoreboard-container > section.mobile-active {
        display: flex !important;
    }

    div#main-scoreboard-container h1 {
        font-size: 2em;
    }

    div#main-scoreboard-container > section {
        max-height: calc(100vh - var(--admin-bar) - 140px);
    }
    div#main-scoreboard-container > header, div#main-scoreboard-container > footer {
        height: 60px;
        padding: 10px 25px 5px;
    }

    div#main-scoreboard-container {
        align-content: space-between;
        max-height: calc(100dvh - 100px) !important;
    }
}

@media screen and (max-width: 1000px) and (min-width: 769px) {
    .film-details,
    .friend-details {
        display: none;
    }
    div#main-scoreboard-container > section {
        width: 200px;
    }
    div#main-scoreboard-container > section#categories {
        width: calc(100% - 400px);
    }
}