:root {
  --temps-red: #f83e31;
  --temps-blue: #07c1ce;
  --temps-mint: #d3fbee;
}

a {
    text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.8);
}

a:link {
    color: var(--temps-blue);
}

a:visited {
    color: var(--temps-blue);
}

a:hover {
    color: var(--temps-red);
}

a:active {
    color: var(--temps-blue);
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: sans-serif;
}

.landing {
    width: 100%;
    height: 100%;
    position: absolute;
    background-color: var(--temps-red);
    z-index: 100;
}

.landing.fade-out {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-out;
}

.landing-logo {
    opacity: 0;

    background-image: url('Images/Logo/temps.png');
    background-size: contain;
    background-repeat:no-repeat;
    background-position:center;
    
    width: 50%; 
    height: 50%;
    
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.landing-buttons {
    position: absolute;
    top: 82.5%;
    left: 0;
    width: 100%;
    
    transform: translateY(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5%;
    opacity: 0;
}

.button-column {
    display: flex;
    flex-direction: column;
    align-items: center; /* This natively forces the text to the dead-center of the button */
    
    width: 15%;
}

#daily-button, #freeplay-button {
    width: 100%; 
    height: 8vh;
    
    transform: translateX(-50%);
    border-radius: 12px;
    border: none;
    color: rgba(51,76,67,1);
    
    font-family: inherit;
    font-size: 2vmin;
    font-weight: bold;
    cursor: pointer;

    transition: all .2s ease-in-out;
}

#daily-button:hover, #freeplay-button:hover {
    transform: translateX(-50%) scale(1.035);
}

#daily-button:disabled {
    filter: saturate(-50%);
    opacity: 0.5;
}

#daily-button:disabled:hover {
    transform: translateX(-50%) scale(1);
}

.timer-label {
    opacity: 1;
    color: var(--temps-mint);
    font-size: 1.75vmin;
    margin-bottom: 1vmin;
    
    white-space: nowrap; 
    text-align: center;
}

#next-daily {
    font-weight: bold;
}

#next-daily-label {
    opacity: 0;
}

.hidden-spacer {
    opacity: 0;
    pointer-events: none;
    user-select: none;
}

.fade-in {
    opacity: 1;
    transition: opacity 0.5s ease-in;
}

.information {
    position: absolute;
    width: 3vmin;
    height: 3vmin;
    left: 2vmin;
    top: 2vmin;

    display: flex;
    justify-content: center;
    align-items: center;

    background-color: transparent;
    border: 0.2vmin solid var(--temps-mint);
    margin: 0;
    border-radius: 100rem;
    color: var(--temps-mint);
    
    font-family: 'Times New Roman', Times, serif;
    font-weight: bold;
    font-style: italic;

    font-size: 2vmin; 
    
    cursor: pointer;

    transition: all 0.175s ease-in-out;
}

.information:hover {
    transform: scale(1.1);
    border: 0.3vmin solid var(--temps-mint);
    margin: -0.15rem;
}

.info-tooltip::before {
    content: "";
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
}

.info-tooltip {
    position: absolute;
    top: 130%;
    left: 0;
    width: max-content;
    
    background-color: rgba(21, 21, 21, 0.5);
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--temps-mint);
    
    color: var(--temps-mint);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 1rem;
    font-weight: normal;
    font-style: normal;
    line-height: 1.5;
    text-align: left;
    
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(-5px);
}

.information:hover .info-tooltip {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.info-tooltip a {
    color: var(--temps-mint);
    text-decoration: underline;
    font-weight: bold;
    transition: all 0.2s ease-in-out;
}

.info-tooltip a:hover {
    filter: drop-shadow(0px 0px 4px #d3fbee90);
}

.github-link {
    position: absolute;
    width: 3.4vmin;
    height: 3.4vmin;
    right: 2vmin;
    top: 2vmin;
    
    filter: drop-shadow(0px 0px 4px rgba(51,76,67,0.0));

    cursor: pointer;

    transition: all 0.175s ease-in-out;
}

.github-link:hover {
    filter: drop-shadow(0px 0px 4px rgba(51,76,67,0.35));
    transform: scale(1.08);
}

#github-logo {
    width: 100%;
    height: 100%;
}

.copyright-text {
    position: absolute;
    bottom: 1%;
    left: .75%;


    color: var(--temps-mint);

    font-family: Helvetica, Arial, sans-serif;
    text-align: center;
    font-weight: bold;
    font-size: 1.5vmin;
}

#unit-buttons {

    position: relative;

    top: 1.75vmin;
    display: grid;
    gap: 1.75vmin;
}

.unit-button {

    --mouse-x: 50%;
    --mouse-y: 50%;
    
    position: relative; 

    top: 2%;
    left: 50%;

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 50;
    
    background: linear-gradient(90deg,rgba(200, 235, 225, 1) 0%, rgba(211, 251, 238, .95) 50%, rgba(200, 235, 225, 1) 100%);
    filter: drop-shadow(0px 0px 4px rgba(51,76,67,0.2));
    color: #334C43;
    border: 0 solid transparent;
    border-radius: 100px;
    font-size: 1.5vmin;

    width: 5vmin;
    height: 5vmin;
    
    font-family: Arial, sans-serif;
    font-weight: bold;

    transition: all .2s ease-in-out;
}

.unit-button:hover {
    background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(211, 251, 238, 1) 0%, rgba(51,76,67,.75) 300%);
    transform: scale(1.05);
    filter: drop-shadow(0px 0px 16px rgba(51,76,67,0.25));
    cursor: pointer;
}

.unit-button:active {
    transform: scale(.92);
}

#temperature-button::after {
    content: "°C";
}

#temperature-button:hover::after {
    content: "°F";
}

#temperature-button[data-unit="F"]::after {
    content: "°F";
}

#temperature-button[data-unit="F"]:hover::after {
    content: "°C";
}

#height-button::after {
    content: "m";
}

#height-button:hover::after {
    content: "ft";
}

#height-button[data-unit="ft"]::after {
    content: "ft";
}

#height-button[data-unit="ft"]:hover::after {
    content: "m";
}

.center-piece {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 10;
}

.strip-base, .circle-base, .strip-fill, .circle-fill {
    position: absolute;
    top: 50%;
    left: 50%;
}

.strip-base, .circle-base {
    background-color: #334C43;
}

.strip-base {
    width: calc(20px + 0.8rem);
    height: 150vh;
    transform: translate(-50%, -50%) rotate(17deg); 
}

.circle-base {
    width: calc(18vmin + 0.8rem);
    height: calc(18vmin + 0.8rem);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.strip-fill {
    width: 20px;
    height: 150vh;
    background-color: #D3FBEE;
    transform: translate(-50%, -50%) rotate(17deg);
}

.circle-fill {
    width: 18vmin;
    height: 18vmin;
    background-color: #D3FBEE;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.vs-text {
    position: absolute;

    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 8vmin;

    color: #334C43;
    filter: drop-shadow(0px 0px 4px rgba(51,76,67,0.25));
    transform: translate(-50%, -58%);

    pointer-events: none;
}

.split-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background-color: #000;
}

.split-side {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-repeat: no-repeat;
}

.split-right {
    background-image: url('https://placehold.co/1920x1080?text=?');
    background-position: right center;

    transition: blur 2s ease-in-out
}

.color-popup {

    --transition-length: 450ms;

    width: 100%;
    height: 100%;

    background-color: #00000000;

    filter: blur(0px);

    transition: all var(--transition-length) ease-in-out;
}

#color-popup-left {
    clip-path: polygon(
        0 0, 
        calc(50% + 15.24vh) 0, 
        calc(50% - 15.24vh) 100%, 
        0 100%
    );
}

.color-popup.red-filter, .color-popup.blue-filter {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.color-popup.red-filter {
    background-color: #f83e3150;
}

.color-popup.blue-filter {
    background-color: #07c1ce50;
}

.split-left {
    background-image: url('https://placehold.co/1920x1080?text=?');
    background-position: left center;

    clip-path: polygon(
        0 0, 
        calc(50% + 15.24vh) 0, 
        calc(50% - 15.24vh) 100%, 
        0 100%
    );
}

.copyright-right, .copyright-left {
    position: absolute;

    width: max-content; 
    max-width: 25vw;
    height: auto; 
    z-index: 20;

    padding: 0.8rem 1rem; 
    
    background-color: rgba(21, 21, 21, 0.5);
}

.copyright-right {
    right: 0%;
    top: 5%;
}

.copyright-left {
    left: 0%;
    bottom: 5%;
}

.image-copyright {
    font-size: 0.75vw;
    color: #f1f1f1;
    font-family: Helvetica, Arial, sans-serif;
    line-height: 1.5;
    z-index: 100;
}

.left-half, .right-half {
    position: absolute;
    height: 92.5%;
    width: 50%;
    bottom: 0;

    color: #f1f1f1;
    text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.9);

    font-family: Helvetica, Arial, sans-serif;
    font-weight: bold;
}

#score {
    position: fixed;
    left: 3vmin;
    top: 3vmin;
    
    display: flex;
    flex-direction: column;
    align-items: center; 
    gap: 0.5rem;
}

#score h3, #score h4 {
    margin: 0;
    line-height: 1;
}

#score h4 {
    font-size: 1.75vmin;
}

.right-half {
    left: 50%;
}

.left-half h1, .right-half h1 {
    position: relative;
    left: 50%;

    margin-top: 1vmin;
    transform: translateX(-50%); 
    
    text-align: center;
    width: 100%;

    font-size: 10vmin;
}

.left-half h2, .right-half h2 {
    position: relative;
    left: 50%;

    transform: translateX(-50%); 
    
    text-align: center; 
    text-wrap: balance;
    width: 80%;

    font-size: 5.25vmin;
}

.left-half h3, .right-half h3 {
    position: relative;
    left: 50%;

    margin-top: -3vmin;
    transform: translateX(-50%); 
    
    text-align: center;
    width: 100%;

    font-size: 3.5vmin;
}

#higher-button, #lower-button {

    --mouse-x: 50%;
    --mouse-y: 50%;
    
    display: flex;
    justify-content: space-between;
    align-items: center;

    position: relative;
    left: 50%;

    transform: translateX(-50%); 
    
    margin-bottom: 5%;
    
    height: 10%;
    width: 40%;

    border: .2rem solid transparent;
    border-radius: 0.4rem;

    font-size: 5vmin;
    text-align: left;

    padding-left: 2%;
    padding-right: 2%;
    
    color: #f1f1f1;
    text-shadow: 1px 2px 8px rgba(0,0,0,0.5);
    transition: all 0.225s ease-in-out;
}

#higher-button {
    margin-bottom: 1%;
    background: linear-gradient(90deg,rgba(224, 51, 43, 1) 0%, rgba(248, 62, 49, 1) 100%);
}

#lower-button {
    margin-bottom: 5%;
    background: linear-gradient(90deg,rgba(0, 184, 190, 1) 0%, rgba(7, 193, 206, 1) 100%);
}

#higher-button:hover:not([disabled]), #lower-button:hover:not([disabled]) {
    filter: drop-shadow(8px 10px 6px rgba(0,0,0,0.15));
    cursor: pointer;
    transform: translateX(-50%) scale(1.02);
}

#higher-button:hover:not([disabled]) {
    background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(255, 100, 80, 1) 0%, rgba(224, 51, 43, 1) 80%);
    border: .2rem solid #dc3128;
}

#lower-button:hover:not([disabled]) {
    background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(42, 230, 240, 1) 0%, rgba(0, 184, 190, 1) 80%);
    border: .2rem solid #00b8be;
}

#higher-button:active:not([disabled]), #lower-button:active:not([disabled]) {
    cursor: pointer;
    filter: drop-shadow(8px 10px 6px rgba(0,0,0,0));
    transform: translateX(-50%) scale(.98);
}

#higher-button:disabled, #lower-button:disabled {
    filter: saturate(50%) opacity(65%);
    cursor: not-allowed;
}

#higher-button:active:not([disabled]) {
    background: linear-gradient(90deg,rgba(224, 51, 43, 1) 0%, rgba(248, 62, 49, 1) 100%);
}

#lower-button:active:not([disabled]) {
    background: linear-gradient(90deg,rgba(0, 184, 190, 1) 0%, rgba(7, 193, 206, 1) 100%);
}

.button-icon {
    height: 80%;
    width: auto;
    filter: drop-shadow(1px 2px 8px rgba(0,0,0,0.5));
}

.meta-column {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.meta-block {
    position: absolute;
    bottom: 2%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    
    display: flex;
    justify-content: center;
    gap: 15%;

    text-align: center;
}

.meta-block h2 {
    position: static;
    transform: none;
    margin-top: 0;
    width: 100%;
}

.metadata {
    width: 100%;
    font-size: 2.5vmin;
}

#local-time-left, #local-time-right, #elevation-left, #elevation-right {
    font-size: 4vmin;
}

#seed {
    position: absolute;
    right: 3vmin;
    bottom: 3vmin;
    
    font-size: 2vmin;
    text-align: right;
}

.game-over {
    --transition-length: 300ms;

    opacity: 0;
    pointer-events: none;

    position: absolute;
    left: 0;
    top: 0;

    width: 100%;
    height: 100%;

    background-color: var(--temps-blue);
    color: var(--temps-mint);
    z-index: 100;
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4vmin;

    font-family: Helvetica, Arial, sans-serif;
    font-weight: bold;
    text-shadow: 0px 0px 16px rgba(0,0,0,0.3);

    transition: opacity var(--transition-length) ease-in;
}   

.game-over.visible {
    opacity: 1;
    pointer-events: auto;
}

.game-over-logo {
    width: 15vmax;
    height: auto;

    filter: drop-shadow(0px 0px 16px rgba(0,0,0,0.3));
}

.game-over h1 {
    text-align: center;
    width: 100%;

    font-size: 8vmin;
}

.game-over h2 {
    text-align: center; 
    text-wrap: balance;

    width: 80%;
    
    font-size: 3vmin;
}

#final-score {
    font-size: 5.5vmin;
}

.game-over-buttons {
    display: flex;
    flex-direction: row;

    width: 27%;
    height: 7%;
    
    align-items: center;
    gap: 5vmin;
}

#play-again-button, #share-button {

    --mouse-x: 50%;
    --mouse-y: 50%;

    height: 100%;
    border-radius: 1vmin;

    border: none;
    background: linear-gradient(90deg,rgba(200, 235, 225, 1) 0%, rgba(211, 251, 238, .9) 50%, rgba(200, 235, 225, 1) 100%);
    filter: drop-shadow(0px 0px 8px rgba(0,0,0,0.15));
    
    transition: all 0.2s ease-in-out;
}

#play-again-button {
    flex: 1;
    
    color: #334C43;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 3vmin;
    text-shadow: 2px 2px 16px rgba(51,76,67,0.3);
}

#share-button {
    position: relative;

    height: 100%;
    aspect-ratio: 1 / 1;
    
    display: flex; 
    justify-content: center;
    align-items: center;
    
    padding: 1.5vmin;
}

#play-again-button:hover, #share-button:hover {
    background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(211, 251, 238, 1) 0%, rgba(51,76,67,.25) 400%);
    cursor: pointer;
    transform: scale(1.02);
}

#share-button:hover {
    transform: scale(1.06);
}

#share-logo {
    width: 80%;
    height: 80%;
    object-fit: contain;

    filter: drop-shadow(2px 2px 16px rgba(51,76,67,0.3));
}

#play-again-button:active, #share-button:active {
    filter: drop-shadow(0px 0px 8px rgba(0,0,0,0.15));
    transform: scale(0.75);
}

#copy-popup {
    position: absolute;
    bottom: 130%;
    left: 50%;
    
    transform: translateX(-50%) translateY(0vmin); 
    opacity: 0;
    pointer-events: none;
    
    background-color: #334C4380;
    color: var(--temps-mint);
    padding: 1vmin 2vmin;
    border-radius: 1vmin;
    font-family: inherit;
    font-size: 1.5vmin;
    font-weight: bold;
    white-space: nowrap;
    
    transition: all 0.3s ease-in-out;
}

#copy-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: .6vmin;
    border-style: solid;
    border-color: #334C4380 transparent transparent transparent;
    filter: drop-shadow(0px 4px 12px rgba(51,76,67,0.35))
}

#copy-popup.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

#game-over-copyright-text {
    text-shadow: 0px 0px 16px rgba(0,0,0,0.3);
}

