* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #0a3d0a 0%, #1a5a1a 50%, #0d4d0d 100%);
    font-family: 'Courier New', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    padding: 10px;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.game-container {
    text-align: center;
    background: rgba(0, 20, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.3);
    border: 2px solid #00ff00;
    width: 100%;
    max-width: 900px;
}

h1 {
    color: #00ff00;
    margin-bottom: 10px;
    text-shadow: 0 0 10px #00ff00;
    font-size: clamp(24px, 5vw, 36px);
}

#gameCanvas {
    border: 3px solid #00ff00;
    background: #000;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 70vh;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.score {
    color: #00ff00;
    font-size: clamp(20px, 4vw, 24px);
    margin: 10px 0;
    text-shadow: 0 0 5px #00ff00;
}

.instructions {
    color: #00cc00;
    font-size: clamp(12px, 2vw, 14px);
    margin-top: 10px;
    line-height: 1.6;
}

.controls {
    color: #00cc00;
    font-size: clamp(10px, 1.8vw, 12px);
    margin-top: 5px;
}

/* Touch controls for mobile */
.touch-controls {
    display: none;
    margin-top: 15px;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.touch-btn {
    background: rgba(0, 255, 0, 0.2);
    border: 2px solid #00ff00;
    color: #00ff00;
    padding: 15px 25px;
    font-size: 18px;
    font-family: 'Courier New', monospace;
    border-radius: 8px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    min-width: 80px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
    transition: all 0.1s;
}

.touch-btn:active {
    background: rgba(0, 255, 0, 0.4);
    transform: scale(0.95);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

.touch-btn-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 10px;
}

.pause-btn {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .game-container {
        padding: 15px;
    }
    
    h1 {
        margin-bottom: 8px;
    }
    
    #gameCanvas {
        max-height: 60vh;
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 10px;
        border-radius: 5px;
    }
    
    #gameCanvas {
        max-height: 50vh;
    }
    
    .touch-controls {
        display: flex;
        flex-direction: column;
    }
    
    .instructions,
    .controls {
        font-size: 11px;
    }
}

/* Show touch controls on touch devices */
@media (hover: none) and (pointer: coarse) {
    .touch-controls {
        display: flex;
        flex-direction: column;
    }
    
    .instructions {
        margin-bottom: 10px;
    }
}

@media (orientation: landscape) and (max-height: 600px) {
    .game-container {
        padding: 10px;
    }
    
    h1 {
        font-size: 20px;
        margin-bottom: 5px;
    }
    
    .score {
        font-size: 18px;
        margin: 5px 0;
    }
    
    #gameCanvas {
        max-height: 75vh;
    }
    
    .instructions,
    .controls {
        font-size: 11px;
        margin-top: 3px;
    }
}

