* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: linear-gradient(145deg, #2A4DF4 0%, #FFB800 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.game-container {
    max-width: 500px;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 40px;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.back-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 40px;
    padding: 8px 16px;
    font-size: 14px;
    color: white;
    cursor: pointer;
    margin-bottom: 16px;
    transition: all 0.2s;
}

.back-btn:active {
    transform: scale(0.95);
}

.game-header {
    text-align: center;
    margin-bottom: 20px;
}

.game-title {
    font-size: 24px;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    margin-bottom: 8px;
}

.game-subtitle {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
}

.game-stats {
    display: flex;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 30px;
    padding: 12px 20px;
    margin-bottom: 20px;
}

.stat {
    text-align: center;
}

.stat-label {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    display: block;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    color: #FFB800;
}

#gameCanvas {
    display: block;
    margin: 0 auto;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    width: 100%;
    height: auto;
}

.game-controls {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    justify-content: center;
}

.control-btn {
    flex: 1;
    background: linear-gradient(135deg, #2A4DF4, #FFB800);
    border: none;
    border-radius: 40px;
    padding: 12px;
    font-size: 16px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: all 0.1s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.control-btn:active {
    transform: scale(0.95);
}

.game-info {
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 12px;
}

.game-info p {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    margin: 4px 0;
    text-align: center;
}

/* Game Over */
.game-over, .start-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.game-over-content, .start-content {
    background: linear-gradient(135deg, #2A4DF4, #FFB800);
    border-radius: 40px;
    padding: 40px;
    text-align: center;
    max-width: 300px;
    width: 80%;
}

.game-over-content h2, .start-content h2 {
    color: white;
    margin-bottom: 20px;
    font-size: 28px;
}

.game-over-content p, .start-content p {
    color: white;
    margin-bottom: 20px;
    font-size: 18px;
}

.restart-btn, .start-btn, .back-menu-btn {
    background: white;
    border: none;
    border-radius: 40px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 700;
    color: #2A4DF4;
    cursor: pointer;
    margin: 8px;
    transition: all 0.2s;
}

.restart-btn:active, .start-btn:active, .back-menu-btn:active {
    transform: scale(0.95);
}

.back-menu-btn {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.hidden {
    display: none;
}

@media (max-width: 480px) {
    .game-container {
        padding: 16px;
    }
    
    .game-title {
        font-size: 20px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .control-btn {
        padding: 10px;
        font-size: 14px;
    }
}