@font-face {
    font-family: 'VHS Gothic';
    src: url('/vhs-gothic.ttf') format('truetype');
}

:root {
    --bg-blue: #000000;
    --neon-blue: #00d4ff;
    --text-color: #ffffff;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000000;
    font-family: 'VHS Gothic', sans-serif;
    color: var(--text-color);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Ensure all interactive elements inherit the VHS font */
button, input, select, textarea {
    font-family: 'VHS Gothic', sans-serif;
}

#app {
    position: relative;
    width: 100%;
    height: 100%;
    filter: url(#pixel-smear) saturate(1.8) contrast(1.15);
    overflow: hidden;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    background-color: var(--bg-blue);
    transition: opacity 0.4s ease-in-out;
}

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

#intro-text-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 80%;
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: 0.2rem;
}

.letter {
    display: inline-block;
    opacity: 0;
    transform: translate(0, 0);
    transition: transform 2s cubic-bezier(0.19, 1, 0.22, 1), opacity 1.5s ease;
}

/* Menu Styles */
#menu-overlay, #settings-overlay {
    background: radial-gradient(circle, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.85) 100%);
    z-index: 20;
}

.menu-content {
    text-align: left;
    width: 100%;
    padding-left: 10%;
    box-sizing: border-box;
}

.title-text {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    letter-spacing: 0.2rem;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
}

.menu-btn {
    background: transparent;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    padding: 12px 30px;
    font-size: 1.2rem;
    cursor: pointer;
    width: 250px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.menu-btn:hover {
    background: var(--text-color);
    color: var(--bg-blue);
}

.menu-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.warning-text {
    color: #ff3333;
    font-size: 0.9rem;
    max-width: 250px;
    text-shadow: 0 0 5px #ff0000;
    margin: -5px 0 15px 0;
    line-height: 1.4;
    text-align: left;
    letter-spacing: 1px;
}

#bg-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#crt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    background: 
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 3px 100%;
    animation: flicker 0.15s infinite;
}

#crt-overlay::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 15%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    z-index: 102;
    animation: roll 6s linear infinite;
    pointer-events: none;
}

/* Curved Glass Glare to simulate CRT Bulge */
#crt-overlay .glare {
    position: absolute;
    top: 0;
    left: 10%;
    width: 80%;
    height: 100%;
    background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0) 60%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 103;
}

@keyframes roll {
    0% { transform: translateY(-15vh); }
    100% { transform: translateY(100vh); }
}

#crt-overlay::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: radial-gradient(circle, rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.3) 120%);
    z-index: 101;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.5), inset 0 0 10px rgba(0,0,0,0.8);
    pointer-events: none;
    border-radius: inherit;
}

@keyframes flicker {
    0% { opacity: 0.95; }
    50% { opacity: 1.0; }
    100% { opacity: 0.98; }
}



#mobile-pause-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--text-color);
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 5px;
    z-index: 50;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

#pause-overlay {
    background: radial-gradient(circle, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.95) 100%);
    z-index: 25;
}

@media (max-width: 600px) {
    #intro-text-container {
        font-size: 1.2rem;
    }
    .title-text {
        font-size: 2.2rem;
    }
    .menu-btn {
        width: 200px;
        font-size: 1rem;
    }
}