* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Orbitron', sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #050510;
    background-image: url('../img/bg.jpg');
    background-size: cover;
    background-position: center;
    color: #0ff;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, #000 80%);
    z-index: -1;
}

.game-shell {
    width: 100%;
    max-width: 800px;
    height: 100vh;
    max-height: 900px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    position: relative;
    border-radius: 15px;
}

.overlay {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #0ff;
}

header h1 {
    font-size: 1.5rem;
    color: #fff;
}

.stats {
    display: flex;
    gap: 20px;
    font-size: 1.2rem;
    font-weight: bold;
}

main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

#game-container {
    position: relative;
    border: 2px solid #0ff;
    box-shadow: 0 0 20px #0ff, inset 0 0 20px #0ff;
    background: #000;
}

canvas {
    display: block;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 1 / 1;
    image-rendering: pixelated;
}

#game-over {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

#game-over.hidden {
    display: none;
}

#game-over h2 {
    font-size: 3rem;
    color: #f00;
    text-shadow: 0 0 20px #f00;
    margin-bottom: 20px;
}

button {
    background: transparent;
    border: 2px solid #0ff;
    color: #0ff;
    padding: 10px 30px;
    font-size: 1.2rem;
    cursor: pointer;
    text-transform: uppercase;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    transition: all 0.3s ease;
}

button:hover {
    background: #0ff;
    color: #000;
    box-shadow: 0 0 20px #0ff;
}

/* Mobile Controls */
#mobile-controls {
    display: none;
    margin-top: 20px;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 20px;
}

.d-pad {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.d-pad-mid {
    display: flex;
    gap: 40px;
}

.d-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    background: rgba(0, 255, 255, 0.1);
}

.action-btn button {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border-color: #f0f;
    color: #f0f;
    background: rgba(255, 0, 255, 0.1);
}

.action-btn button:active {
    background: #f0f;
    color: #000;
    box-shadow: 0 0 20px #f0f;
}

@media (max-width: 768px) {
    #mobile-controls {
        display: flex;
    }
    
    .game-shell {
        border: none;
        border-radius: 0;
        height: 100vh;
        max-height: none;
    }
}
