@import url('https://fonts.googleapis.com/css2?family=Inconsolata:wght@200..900&display=swap');

* {
    backface-visibility: hidden; /* Additional optimization hint */
}

:root {
    --primary-font-color: oklch(90.1% 0.058 230.2);
    --primary-background-color: #2D3E42;
    --top-bar-height: 7vh;
    --main-number-scale: 2.22;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    user-select: none;
}

body {
    touch-action: none;
    font-family: "Inconsolata", monospace;
    font-optical-sizing: auto;
    margin: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.container-rgb-overlay-1ee4825 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
                    0deg,
                    rgba(255, 0, 0, 0.1),
                    rgba(0, 255, 0, 0.1),
                    rgba(0, 0, 255, 0.1)
    );
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 1113; /* Above vignette */
}

.container-1ee4825 {
    position: fixed;
    background: var(--primary-background-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2),
    0 0 40px rgba(255, 255, 255, 0.1);
    will-change: transform; /* Hint to browser to use GPU */
    transform: translateZ(0); /* Force GPU rendering */
}

/* Add this scanline overlay */
.container-1ee4825::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
                    0deg,
                    rgba(0, 0, 0, 0) 0px,
                    rgba(0, 0, 0, 0) 1px,
                    rgba(0, 0, 0, 0.1) 1px,
                    rgba(0, 0, 0, 0.05) 2px
    );
    transform: translateZ(0);
    pointer-events: none; /* Allow clicks to pass through */
    z-index: 1111; /* Position above other elements */
    animation: scanline-move 10s linear infinite;
}

.container-vignette-1ee4825 {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
                    circle,
                    rgba(0, 0, 0, 0) 70%,
                    rgba(0, 0, 0, 0.5) 100%
    );
    transform: translateZ(0);
    pointer-events: none;
    backface-visibility: hidden;
    z-index: 1112; /* Above scanlines */
}

/* For the vertical scanning effect */
@keyframes scanline-move {
    from { transform: translateY(0); }
    to { transform: translateY(100%); }
}

/* Optional: Add this for the CRT flicker effect */
.container-1ee4825::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(18, 16, 16, 0.1);
    opacity: 0;
    pointer-events: none;
    z-index: 998;
    transform: translateZ(0);
    will-change: opacity;
    animation: crt-flicker 0.15s infinite alternate;
}

@keyframes crt-flicker {
    0% { opacity: 0.15; }
    100% { opacity: 0; }
}

.container-vignette-1ee4825::after {
    content: "";
    z-index: 1117; /* Above everything else */
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("/noise.webp");
    opacity: 0.1;
    mix-blend-mode: overlay;
    transform: translateZ(0);
    will-change: opacity, background-position;
    animation: static-noise 0.2s steps(10) infinite,
               tune-noise 0.66s ease-out forwards;
}

@keyframes static-noise {
    0% { background-position: 0 0; }
    100% { background-position: 100% 100%; }
}

@keyframes tune-noise {
    0% { opacity: 1.0; }
    100% { opacity: 0.1; }
}

.top-bar-1ee4825 {
    flex: none;
    height: 0;
   // background-color: var(--primary-background-color);
    position: relative;
    flex-direction: row;
    align-items: center;
    width: 100%;
}

.top-bar-show-1ee4825 {
    flex: none;
    display: block;
    transition: height 0.33s;
    height: 3rem;
    border-bottom: 0.2rem solid var(--primary-font-color);
    animation: border-flicker 0.01s infinite alternate;
}

@keyframes border-flicker {
    from {
        box-shadow: 0 0.2rem 0.2rem rgba(234, 54, 175, 0.5);
    }
    to {
        box-shadow: 0 0.2rem 0.2rem rgba(117, 250, 105, 0.5);
    }
}

.hidden-1ee4825 {
    display: none;
}

.invisible-1ee4825 {
    opacity: 0;
}

.grid-1ee4825 {
    //background-color: var(--primary-background-color);
    flex-grow: 1;
    display: grid;

    justify-items: center;
    justify-content: center;
    align-items: center;
    width: 100%;    // Use percentage instead of vh
    max-width: 90vw; // Prevent overflow
    max-height: 90vh; // Prevent overflow
    place-items: center;     /* Centers items both horizontally and vertically */
    overflow: hidden; // Prevent overflow
}

.score-start-1ee4825 {
    position: fixed;
    top: 50vh;
    left: 50%;
    transition: all 3.33s ease;
}

.custom-button-1ee4825 {
    /* Your custom styles */
    padding: 0;
    text-align: center;
    font-family: "Inconsolata", monospace;
    font-optical-sizing: auto;
    background-color: rgba(0, 0, 0, 0);
    color: var(--primary-font-color);
    font-size: 2.63rem;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    opacity: 1;
    transition: all 0.33s ease;

    //letter-spacing: 0.125em;
    animation:
            textflicker 0.01s infinite alternate,
            fade-in 0.7s ease-out forwards; /* Only animate opacity */

    &:hover {
        z-index: 999;
        transform: scale(var(--main-number-scale));
    }
    &:active {
        transform: scale(1.0);
    }

}
.selected-button-1ee4825 {
    z-index: 999;
    transform: scale(var(--main-number-scale));
}
.used-button-1ee4825 {
    z-index: 1000;
    cursor: default;
    animation: textflicker 0.01s infinite alternate,
                fade-out 0.7s ease-out forwards;

}
.cross-1ee4825 {
    transition: all 0.33s ease;
    transform: scale(calc(var(--main-number-scale) * 0.75));
}

.diagonal-1ee4825 {
    transition: all 0.33s ease;
    transform: scale(calc(var(--main-number-scale) * 0.57));
}

.score-1ee4825 {
    position: relative;
    display: block;
    z-index: 9;
}

@keyframes textflicker {
    0%, 100% { text-shadow: 1px 0 0 #ea36af, -1px 0 0 #75fa69; }
    50% { text-shadow: 2px 0 2px #ea36af, -1px 0 2px #75fa69; }
}

@keyframes fade-in {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes fade-out {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: scale(calc(var(--main-number-scale)*3.0));
        z-index: 1;
    }
}

@keyframes entrance {
    0% {
        opacity: 0;
        transform: scale(0.03);
    }
    50% {
        transform: scale(1.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}