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

body {
    background: #0a0a0f;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: monospace;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

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

/* Prompt landscape on mobile portrait */
#rotate-prompt {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: #0a0a0f;
    color: #00f0ff;
    font-family: monospace;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    font-size: 18px;
    text-align: center;
    padding: 20px;
}
#rotate-prompt .rotate-icon {
    font-size: 48px;
}
@media (orientation: portrait) and (max-width: 768px) {
    #rotate-prompt {
        display: flex;
    }
    #game-container {
        display: none;
    }
}

#gameCanvas {
    display: block;
    image-rendering: pixelated;
    cursor: pointer;
}

/* CRT Scanline Overlay — pure CSS, no canvas overhead */
#crt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.06) 0px,
        rgba(0, 0, 0, 0.06) 1px,
        transparent 1px,
        transparent 3px
    );
    z-index: 10;
}

/* Subtle vignette */
#vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(
        ellipse at center,
        transparent 50%,
        rgba(0, 0, 0, 0.5) 100%
    );
    z-index: 11;
}

/* Shared score challenge banner */
#shared-score {
    display: none;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(176, 38, 255, 0.3);
    border: 1px solid rgba(176, 38, 255, 0.6);
    color: #ffffff;
    padding: 8px 20px;
    font-size: 14px;
    font-family: monospace;
    border-radius: 4px;
    z-index: 20;
}

/* Loading state */
#loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #00f0ff;
    font-family: monospace;
    font-size: 18px;
    z-index: 30;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}
