
:root {
    --body-font-size: 1.4rem;
    --body-line-height: 1.214em;
    --color-background: #ededed;
    --color-foreground: #000000;
    --white: #ffffff;
    --input-font-size: max(var(--body-font-size), 1.6rem);
    --caret-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='7 15 12 20 17 15'%3E%3C/polyline%3E%3Cpolyline points='7 9 12 4 17 9'%3E%3C/polyline%3E%3C/svg%3E");
}

*, *:before, *:after { 
    box-sizing: border-box; 
}

html { 
    font-size: 62.5%; 
}

body {
    background-color: var(--color-background);
    color: var(--color-foreground);
    font-family: "Times New Roman", Times, serif;
    font-size: var(--body-font-size);
    line-height: var(--body-line-height);
    margin: 0;
    min-height: 100vh;
    text-rendering: optimizeLegibility;
    padding-top: 30px;
    overflow-x: hidden; 
}


#gbCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 0;
}


.header-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    background: transparent;
    display: flex;
    gap: 0.5rem;
    padding: 1rem;       
}


.custom-select-container {
    position: relative;
    width: 100%;
    max-width: 250px;
    user-select: none;
}

.select-trigger {
    background: var(--white) var(--caret-icon) no-repeat right .9rem center / 1.5rem auto;
    border: 1px solid #000;
    padding: .5rem 3.5rem .5rem .7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    height: 2rem;
    font-size: 1.4rem;
    white-space: nowrap;
    overflow: hidden;
}

.select-options {
    position: absolute;
    top: 95%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid #000;
    border-top: none;
    display: none;
    z-index: 1001; 
    margin: 0;
    padding: 0;
    list-style: none;
}

.select-options.open { display: block; }

.select-options li {
    padding: .6rem .7rem;
    cursor: pointer;
    background: var(--white);
    font-size: 1.4rem;
    color: #000;
}

.select-options li:hover { background-color: #f0f0f0; }

.select-options li[disabled] {
    color: #999;
    cursor: default;
    font-style: italic;
}


.time-selector-wrapper {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 1000;
    min-width: 220px;
}


.time-selector-wrapper .select-options,
.image-footer-select .select-options {
    top: auto;
    bottom: 100%; 
    border-top: 1px solid #000; 
    border-bottom: none;
}


main {
    display: flex;
    gap: 2rem;
    max-width: 1400px;
    margin: 9rem auto;
    padding: 0 2rem;
    align-items: flex-start;
}

.about-container {
    flex: 1;
    min-width: 0;
    text-align: justify;
}

.about-text {
    
    margin-bottom: 3rem;
    font-size: 1.4rem;
    line-height: 1.5;
}

.about-text a { 
    color: #0d00ff; 
    text-decoration: underline; 
}
.about-text a:hover { color: #ffffff; }

.image-selector-wrapper {
    display: inline-block;
    position: relative;
    max-width: 100%;
    width: 100%;
}

.about-image {
    display: block;
    width: 100%;
    height: auto;
 
}

.about-figure {
    flex: 0 0 auto;
    max-width: 350px;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    margin-bottom: -50px;
}

.about-image.inverted { filter: invert(100%); }

.image-footer-select { max-width: 100% !important; }


.image-footer-select.mode-normal #opt-normal,
.image-footer-select.mode-invert #opt-invert,
.time-selector-wrapper.mode-sj #opt-sj,
.time-selector-wrapper.mode-bcn #opt-bcn { 
    display: none; 
}


.time-selector-wrapper:not(.mode-sj):not(.mode-bcn) #opt-bcn {
    display: none;
}


.about-container.mode-es .lang-eng { display: none; }
.about-container.mode-eng .lang-es { display: none; }

.about-container.mode-es #opt-es { display: none; }
.about-container.mode-eng #opt-eng { display: none; }

.image-footer-select .select-options {
    top: auto;
    bottom: 100%;
}


@media (max-width: 768px) {
    .custom-select-container { max-width: 100%; }
    .image-selector-wrapper { max-width: 100%; } 

    #arena-container { 
        grid-template-columns: 1fr; 
        padding-top: 120px; 
    }
    .mode-wide-titles .image-title { 
        font-size: 15vw; 
    }
    .side-controls-wrapper { 
        right: 10px; 
    }

    .side-controls-wrapper .select-options {
        top: auto;
        bottom: 100%;
        border-top: 1px solid #000;
        border-bottom: none;
    }

    .mobile-margin-spacer {
        display: table-cell !important;
        width: 20px !important;
        min-width: 20px;
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
    }

    .header-nav {
        position: relative;
        top: 0;
        flex-direction: column;
        width: 180px;
        margin-top: -20px;
        z-index: 10;
    }

    main {
        flex-direction: column-reverse; 
        margin: 10rem auto; 
        gap: 1rem; 
    }

    .about-container {
        width: 100%;
        padding: 0;
    } 

    .image-selector-wrapper { 
        max-width: 100%; 
    }

    .about-text {
        max-width: 90%;
    }
}

@media (min-width: 769px) {
    .mobile-margin-spacer {
        display: none;
    }
}
