:root {
    --b-orange: #ff9b32;
    --b-turquoise: #009b91;
    --b-blue: #005578;
    --b-yellow: #f2cf00;
    --b-green: #AAD2B4;
    --b-dark-blue: #00324B;
    --b-light-blue: #34A2E6;
    --b-very-light-blue: #f2f8ff;
    --b-very-light-grey: #f8f8f8;
    --b-red: #b30000;
    --c-blue: rgb(52, 162, 235);
    --c-orange: rgb(255, 159, 64);
    --c-purple: rgb(153, 102, 255);
    --dark-gray: #4b4b4b;
    --gray: #636462;
    --light-gray: #9c9c9c;
    --blue-gray: #5d7595;
    --blue: rgb(0, 102, 156);
    --cold: rgb(212, 233, 255);
    --warm: rgb(255, 229, 196);
    --hot: rgb(255, 194, 187);
    --good-score: #109667;
    --bad-score: #a51142;
    --bg-col: #f9fcff;
    --N: 6; /* Number of roller stands */
    --RN: 8; /* Reference N*/
}

@font-face {
    font-family: 'Futura PT';
    src: url('../resources/fonts/Futura PT Heavy.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Futura PT';
    src: url('../resources/fonts/Futura PT Medium.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Futura PT';
    src: url('../resources/fonts/Futura PT Book.ttf') format('truetype');
    font-weight: light;
    font-style: normal;
}

@font-face {
    font-family: 'Franklin Gothic';
    src: url('../resources/fonts/Franklin Gothic Demi Cond Regular.ttf') format('truetype');
}

html {
    overflow: hidden;
    height: 100%;
    overscroll-behavior: none;
}

body {
    font-family: 'Franklin Gothic', 'Roboto', sans-serif;
    background-color: white;
    overflow: hidden;
    height: 100%;
    -webkit-tap-highlight-color: transparent !important;
    overscroll-behavior: none;
}

@media screen and (min-aspect-ratio: 1.86) {
    #screen-wrapper {
        background-color: white;
        position: absolute;
        height: calc(var(--real-vh, 1vh) * 100);
        height: 100svh;
        height: 100dvh;
        width: calc(var(--real-vh, 1vh) * 100 * 1.867);
        width: calc(100svh * 1.867);
        width: calc(100dvh * 1.867);
        aspect-ratio: 1.867;
        top: 0;
        left: 50%;
        transform: translateX(-50%) !important;
        overflow: hidden;
    }
    #screen-band-left, #screen-band-right {
        background-color: black;
        z-index: 100000;
        position: absolute;
        height: calc(var(--real-vh, 1vh) * 100);
        height: 100svh;
        height: 100dvh;
        width: calc((100vw - var(--real-vh, 1vh) * 100 * 1.867) / 2);
        width: calc((100vw - 100svh*1.867)/2);
        width: calc((100vw - 100dvh*1.867)/2);
    }
    #screen-band-left {
        top: 0;
        left: 0;
    }
    #screen-band-right {
        top: 0;
        right: 0;
    }
    body {
        font-size: calc(var(--real-vh, 1vh) * 1.75);
        font-size: 1.75svh;
        font-size: 1.75dvh;
    }
}
@media screen and (max-aspect-ratio: 1.86) {
    #screen-wrapper {
        background-color: white;
        position: absolute;
        width: 100vw;
        height: calc(100vw / 1.867);
        aspect-ratio: 1.867;
        top: 50%;
        left: 0;
        transform: translateY(-50%) !important;
        overflow: hidden;
    }
    #screen-band-left, #screen-band-right {
        background-color: black;
        z-index: 100000;
        position: absolute;
        width: 100vw;
        height: calc((var(--real-vh, 1vh) * 100 - 100vw/1.867)/2);
        height: calc((100svh - 100vw/1.867)/2);
        height: calc((100dvh - 100vw/1.867)/2);
    }
    #screen-band-left {
        top: 0;
        left: 0;
    }
    #screen-band-right {
        bottom: 0;
        left: 0;
    }
    body {
        font-size: calc((1.75vw / 1.867));
    }
}

#screen-band-left::before,
#screen-band-right::before {
    content: '';
    position: absolute;
    background-color: black;
    width: 100%;
    height: calc(var(--real-vh, 1vh) * 100);
    height: 100svh;
    height: 100dvh;
}

#screen-band-left::before {
    bottom: 100%;
    left: 0;
}

#screen-band-right::before {
    top: 100%;
    left: 0;
}

.hidden {
    display: none;
}

.btn {
    font-size: 3em;
    padding: 0em 1em;
    background-color: var(--b-turquoise);
    color: white;
    text-decoration: none;
    cursor: pointer;
    border-radius: 2em;
    font-family: "Futura PT";
    font-weight: bold;
    box-shadow: -0.1em 0.1em 0px 0px black;
    outline: none;
}

.btn.animated {
    animation: buttonSelected 100ms linear forwards;
}
@keyframes buttonSelected {
    0% {
        transform: translate(0, 0);
        box-shadow: -0.1em 0.1em 0px 0px black;
        padding: 0em 1em;
    }
    25% {
        transform: translate(-0.1em, 0.1em);
        box-shadow: 0px 0px 0px 0px black;
        outline: none;
        background-color: var(--b-turquoise);
        color: white;
        padding: 0em 3em;
    }
    100% {
        transform: translate(0, 0);
        box-shadow: -0.1em 0.1em 0px 0px black;
        outline: solid 5px var(--b-turquoise);
        outline-offset: -5px;
        background-color: white;
        color: var(--b-turquoise);
        padding: 0em 2em;
    }
}

.legal-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgb(255, 255, 255, 0.7));
    padding: 6px 15px;
    text-align: center;
    z-index: 9996;
    font-family: 'Futura PT', sans-serif;
    font-size: 1rem;
}

.legal-footer a {
    color: var(--blue-gray);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.2s;
}

.legal-footer a:hover {
    color: var(--b-orange);
    text-decoration: underline;
}

.legal-footer span {
    color: var(--blue-gray);
}

.legal-modal {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    justify-content: center;
    align-items: center;
}

.legal-modal.show {
    display: flex;
}

.legal-modal-content {
    background: white;
    width: 90%;
    max-width: 800px;
    max-height: 80%;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.legal-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 48px;
    padding-bottom: 24px;
    color: var(--b-turquoise);
}

.legal-modal-header h2 {
    margin: 0;
    font-family: 'Futura PT', sans-serif;
    font-size: 1.2rem;
}

.legal-modal-close {
    background: none;
    border: none;
    color: var(--light-gray);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transform: scale(1.5);
}

.legal-modal-body {
    padding: 0px 48px 48px 48px;
    overflow-y: auto;
    font-family: 'Futura PT', sans-serif;
    font-size: 1.2rem;
    line-height: 1.6;
    color: #333;
}

.legal-modal-body h3 {
    color: var(--b-turquoise);
    margin-top: 20px;
    margin-bottom: 10px;
}

.legal-modal-body h3:first-child {
    margin-top: 0;
}

.legal-modal-body p {
    margin-bottom: 12px;
}

.legal-modal-body ul {
    margin-bottom: 12px;
    padding-left: 24px;
}

.legal-modal-body a {
    color: var(--b-turquoise);
}

#mobile-blocker {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #d6e5eb, var(--b-very-light-blue));
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    text-align: center;
    padding: 40px;
    box-sizing: border-box;
}

#mobile-blocker img {
    width: 300px;
    margin: -60px;
}

#mobile-blocker h1 {
    color: var(--b-turquoise);
    font-family: "Futura PT", sans-serif;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

#mobile-blocker p {
    color: var(--b-turquoise);
    font-family: "Futura PT", sans-serif;
    font-size: 1.1rem;
    line-height: 1.5;
}

@media screen and (max-width: 576px), screen and (max-height: 450px) {
    #mobile-blocker {
        display: flex;
    }
    #screen-band-left, #screen-band-right {
        display: none;
    }
}
