@font-face {
    font-family: 'BaseNeue';
    src: url('./assets/BaseNeue-ExpandedBlack.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'FormularRegular';
    src: url('./assets/formular-regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'FormularMono';
    src: url('./assets/formular-mono.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

*
{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body
{
    overflow: hidden;
    background: #111; /* Dark background for the whole page */
    font-family: 'BaseNeue', sans-serif;
    color: white;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#canvas-wrapper {
    position: relative;
    aspect-ratio: 9 / 16;
    height: 100vh;
    width: 56.56vh;
    max-width: 100%;
    touch-action: manipulation;
}

canvas {
    touch-action: manipulation;
}


.webgl
{
    width: 100%;
    height: 100%;
    outline: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 2s;
}

#vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(0,0,0,0) 50%, rgba(0,0,0,0.6) 100%);
    z-index: 5;
}

#ui {
    position: absolute;
    top: 4vh;
    left: 4vh;
    pointer-events: none;
    font-family: 'BaseNeue', sans-serif;
    color: white;
    z-index: 10;
}



#score {
    font-size: 10vh;
    font-weight: bold;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

#message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5vh;
    text-align: center;
    width: 100%;
    pointer-events: none;
    font-family: 'BaseNeue', sans-serif;
    color: white;
    z-index: 20;
    transition: opacity 1.5s ease-in-out;
    opacity: 1;
}

/* --- Base Screen Styles --- */


.fullscreen-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 70%;
    background: black;
    padding: 6vh 3vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between; /* Changed for better layout */
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
}

#game-over-screen {
    text-align: center;
}
#newsletter-screen {
    text-align: center;
}

#signup-screen {
    text-align: center;
}

#signup-message {
    text-align: center;
    justify-content: space-evenly; /* Changed for better layout */
    flex-direction: column;
    height: 60%;
    margin-top: 10%;
    display: flex;
}

#signup-message > h1 {
    margin-bottom: 4vh;
}

.fullscreen-screen.visible {
    opacity: 1;
    pointer-events: auto;
}

.logomark {
    position: absolute;
    top: 0;
    right: 0;
    width: 10vh;
    z-index: 10;
    pointer-events: none;
    mix-blend-mode: screen;
}

.contentGroup {
    width: 100%;
    max-width: 45vh;
}

.contentGroup h1, .contentGroup h2 {
    font-family: 'BaseNeue', sans-serif;
    line-height: 1.2;
    letter-spacing: 0.1vh;
}

.contentGroup h1 {
    font-size: 4.8vh;
    margin-bottom: 2vh;
}

.contentGroup h2 {
    font-size: 2.4vh;
    margin-bottom: 1vh;
}

.tagline-group {
    font-family: 'FormularRegular', sans-serif;
    font-size: 2vh;
    color: #ccc;
    width: 100%;
    max-width: 4.5vh;
}

/* --- Game Over Specifics --- */
#game-over-screen {
    justify-content: center; /* Override for vertical centering */
}

#final-score, #newsletter-score {
    font-size: 16vh;
    font-family: 'BaseNeue', sans-serif;
    font-weight: bold;
    background: linear-gradient(to right, #0000ff, #b800ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.0vh;
}

#newsletter-score {
    font-size: 10vh; /* Make it a bit smaller */
}

#game-over-tagline {
    font-family: 'BaseNeue', sans-serif;
    font-size: 2.0vh;
    color: white;
    margin-bottom: 3.5vh;
    letter-spacing: 0.1vh;
    line-height: 1.2;
}

#newsletter-invite {
    font-family: 'FormularRegular', sans-serif;
    font-size: 2vh;
    color: #ccc;
    margin-bottom: 3vh;
}

.game-over-btn {
    width: 100%;
    max-width: 32vh;
    padding: 2vh;
    font-family: 'FormularMono', monospace;
    font-size: 2.2vh;
    border: none;
    border-radius: 5vh;
    cursor: pointer;
    margin-bottom: 2vh;
    transition: transform 0.1s active;
}

.game-over-btn:active {
    transform: scale(0.98);
}

#join-btn {
    background: linear-gradient(to right, #0000ff, #b800ff);
    color: white;
}

#play-again-btn {
    background: black;
    color: white;
    border: 0.1vh solid white;
}

/* --- Newsletter & Signup Form Styles --- */

#newsletter-form input[type="text"],
#newsletter-form input[type="email"] {
    width: 100%;
    max-width: 32vh;
    padding: 1.5vh;
    font-family: 'FormularMono', monospace;
    font-size: 1.8vh;
    border-radius: 5vh;
    background: rgb(255, 255, 255);
    color: rgb(0, 0, 0);
    text-align: center;
    margin-bottom: 2vh;
    border: 0;
}

.terms-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1vh;
    font-family: 'FormularRegular', sans-serif;
    font-size: 1.4vh;
    margin-bottom: 3vh;
}

.terms-container a {
    color: white;
    text-decoration: underline;
}

#newsletter-form button, #signup-screen a {
    width: 32vh;
    max-width: 32vh;
    padding: 2vh;
    font-family: 'FormularMono', monospace;
    font-size: 2.2vh;
    border: none;
    border-radius: 5vh;
    cursor: pointer;
    background: linear-gradient(to right, #0000ff, #b800ff);
    color: white;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

#signup-message {
    margin-bottom: 3vh;
    font-family: 'BaseNeue', sans-serif;
    font-size: 2.4vh;
}

#signup-message p {
    font-family: 'Formular', sans-serif;
    font-size: 2vh;
}


/* --- Pop-up Styles --- */
#popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 199;
    display: none;
}


/* --- Other --- */
#hit-feedback {
    position: absolute;
    top: 12vh;
    left: 2vh;
    font-size: 3.2vh;
    font-weight: bold;
    color: #44ffff;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
}

#debug-panel {
    position: absolute;
    top: 1vh;
    right: 1vh;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1.5vh;
    border-radius: 0.8vh;
    font-family: monospace;
    font-size: 1.2vh;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 100;
}

.debug-section {
    margin-bottom: 1.5vh;
    border-bottom: 0.1vh solid #444;
    padding-bottom: 1vh;
}

.debug-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5vh;
}

.debug-row label {
    flex: 1;
}

.debug-row input[type="range"] {
    flex: 2;
    margin: 0 1vh;
}

.debug-row span {
    flex: 0 0 4vh;
    text-align: right;
}

/* OLD STUFF*/


html {
    height: 100vh;

}

body {
    font-family: 'Formular';
    background: black;
    color: white;
    height: 100vh;
    min-height: 50vh;
    margin: 0;
}

/*
#score {
    font-family: 'BaseNeue', sans-serif;
    overflow: visible;
    padding: 0;
    margin: 0;
    margin-bottom: 5vmin;
    text-align: left;
    width: fit-content;
    color: #ccc;
    background: linear-gradient(-45deg, #0000ff 0%, #b800ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: scale 3s infinite; 
}*/


@keyframes scale {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}


.contentGroup {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1vmin;
}


button {
    font-family: 'Formular', sans-serif;
    font-size: large;
    padding: 1vh 2vh;
    background: linear-gradient(90deg, #0000ff 0%, #b800ff 100%);
    color: white;
    border-radius: 100vmin;
    border: 0;
    cursor: pointer;
    width: 100%;
    overflow: hidden;
}



input[type="checkbox"] {
  width: 1.9vh; height: 1.9vh;
  border-radius: 50%;
  flex-shrink: 0;
  transition: box-shadow .3s;
  background: lightgrey;
  cursor: pointer;
  border: 0;
  appearance: none; -webkit-appearance: none; 
}

input[type="checkbox"]:checked { 
  box-shadow: inset 0 0 0 1.2vh #b800ff;
}

#popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

#terms-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: black;
    background-color: rgb(255, 255, 255);
    padding: 8vmin;
    z-index: 1000;
    width: 60vmin;
    height: 70vh;
    min-height: 50vh;
    width: 90%;
    max-width: 50vh;
    overflow: scroll;
    font-size: 1.7vh;
    font-family: 'FormularRegular', sans-serif;

}


#terms-popup h2 {
    font-family: 'BaseNeue', sans-serif;
    margin-bottom: 2vh;
    margin-bottom: 2vh;

}

#terms-popup p {
    line-height: 1.6;
    margin-bottom: 3vh;
}


a {
    color: white;
}



#close-terms {


    background: #ffffff;

    color: black;

    cursor: pointer;

    border: 0.2vh solid black;

}



.close-button {

    position: absolute;

    top: 2vh;

    right: 2vh;

    width: 3.5vh;

    height: 3.5vh;

    cursor: pointer;

    border-radius: 50%;

    background-color: white;

    border: 0.2vh solid black;

}



.close-button .icon-bar {

    position: absolute;

    top: 50%;

    left: 50%;

    width: 60%;

    height: 0.3vh;

    background-color: black;

}



.close-button .icon-bar.bar-1 {

    transform: translate(-50%, -50%) rotate(45deg);

}



.close-button .icon-bar.bar-2 {

    transform: translate(-50%, -50%) rotate(-45deg);

}



.close-button.inverted {

    background-color: black;

    border-color: white;

}



.close-button.inverted .icon-bar {

    background-color: white;

}
