/* Base styling */
body {
    background-color: #050505;
    color: #d1d1d1;
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    cursor: crosshair;
}

/* The Darkness / Spotlight Overlay */
.spotlight {
    --x: 50%;
    --y: 50%;

    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 10;
    background: radial-gradient(circle 150px at var(--x) var(--y), transparent 0%, rgba(0, 0, 0, 0.98) 80%);
}

/* Container */
.container {
    text-align: center;
    z-index: 5;
    position: relative;
}

/* Text styling: Idle flicker */
h1 {
    font-size: 2.5vw;
    font-weight: normal;
    letter-spacing: 5px;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    transition: letter-spacing 0.3s ease, color 0.3s ease;
    animation: flicker 5s infinite alternate;
    display: inline-block;
    
    user-select: none; /* Stops the text from being accidentally highlighted */
    will-change: transform; /* Prepares the browser for rapid movement */
    backface-visibility: hidden; /* Kills the edge-rendering artifacts */
}

/* Hover styling (Color and spacing only, JS handles movement) */
h1:hover {
    letter-spacing: 8px;
    color: #ff3333;
    text-shadow: 2px 0 0 rgba(0, 0, 255, 0.6), -2px 0 0 rgba(0, 255, 0, 0.6);
    /* We remove the CSS animation here so it doesn't conflict with JS */
    animation: none;
}

/* The original subtle flicker for the idle state */
@keyframes flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        opacity: 1;
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    }
    20%, 24%, 55% {
        opacity: 0.4;
        text-shadow: none;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    h1 {
        font-size: 1.5rem;
        padding: 0 20px;
    }
}