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

body {
    font-family: 'Courier New', Courier, monospace;
    /* Tech font */
    background-color: #050510;
    /* Cyberpunk dark background */
    background-image:
        linear-gradient(rgba(0, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    /* Grid effect */
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

canvas {
    display: block;
    margin: 0 auto;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
}

/* Loading Screen */
#loading-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    padding: 40px 60px;
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
}

#loading-screen h1 {
    font-size: 48px;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    animation: pulse 2s ease-in-out infinite;
}

#loading-screen p {
    font-size: 20px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.loading-bar {
    width: 300px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin: 20px auto;
}

.loading-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #00f260, #0575e6);
    border-radius: 10px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 242, 96, 0.8);
}

.loading-text {
    font-size: 16px;
    opacity: 0.7;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 0.3;
    }
}

/* Mobile Optimization */
@media (max-width: 768px) {
    canvas {
        border-radius: 0;
        width: 100vw !important;
        height: 100vh !important;
    }

    #loading-screen {
        padding: 30px 40px;
    }

    #loading-screen h1 {
        font-size: 36px;
    }

    .loading-bar {
        width: 250px;
    }
}

/* Prevent text selection and touch callout */
body {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}