@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Inter:wght@400;600&display=swap');

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

body {
    font-family: 'Orbitron', 'Inter', 'Arial', sans-serif;
    background: radial-gradient(ellipse at center, #0a0e2e, #05070f);
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    overflow-x: hidden;
    padding: 10px 0;
}


.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 12px;
    background: rgba(0,170,255,0.05);
    border-radius: 14px;
    box-shadow: 0 0 30px rgba(0,170,255,0.15), inset 0 1px 0 rgba(255,255,255,0.05);
    border: 1px solid rgba(0,170,255,0.2);
    max-width: 660px;
    width: 100%;
}


h1 {
    color: #00aaff;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(0, 170, 255, 0.7);
    font-size: 2.5rem;
}


.game-info {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 600px;
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #00aaff;
}


.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

button {
    padding: 8px 16px;
    background-color: #00aaff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

button:hover {
    background-color: #0088cc;
    transform: scale(1.05);
}

button:disabled {
    background-color: #555;
    cursor: not-allowed;
    transform: none;
}


#game-board {
    background-color: #000000;
    border: 1px solid rgba(0,170,255,0.4);
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,170,255,0.3), inset 0 0 30px rgba(0,0,0,0.5);
    margin: 0 auto;
    max-width: 100%;
    height: auto;
    touch-action: none;
}


.game-instructions {
    margin-top: 15px;
    color: #aaaaaa;
    font-size: 0.9rem;
    text-align: center;
}


#game-over {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.game-over-content {
    background-color: #1e1e1e;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid #00aaff;
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.5);
}

.game-over-content h2 {
    color: #ff3333;
    margin-bottom: 20px;
    font-size: 2rem;
}

.game-over-content p {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

#play-again-btn {
    background-color: #ff3333;
    padding: 10px 20px;
    font-size: 1.1rem;
}

#play-again-btn:hover {
    background-color: #cc0000;
}


.hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
    z-index: -999 !important;
    transform: translateX(-9999px) !important;
}


@media (max-width: 650px) {
    #game-board {
        width: 100% !important;
        height: auto !important;
    }
    
    .game-container {
        padding: 10px 6px;
        border-radius: 10px;
    }
    
    h1 {
        font-size: 1.3rem;
    }
    
    .game-info {
        font-size: 0.85rem;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .controls {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 400px) {
    h1 { font-size: 1rem; }
}
