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

body {
    background: #000;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    cursor: crosshair;
    margin: 0;
    padding: 0;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.controls {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-family: Arial, sans-serif;
    z-index: 100;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    padding: 10px;
    max-width: 90%;
}

.controls button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid white;
    color: white;
    padding: 8px 16px;
    margin: 5px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
    flex-shrink: 0;
}

.controls button:hover {
    background: rgba(255, 255, 255, 0.4);
}

.controls button.active {
    background: rgba(255, 255, 255, 0.6);
}

#count {
    margin: 5px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
}

/* 声音控制按钮样式 */
.sound-control {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 101;
}

#toggleSound {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid white;
    color: white;
    padding: 8px 16px;
    margin: 5px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
    flex-shrink: 0;
}

#toggleSound:hover {
    background: rgba(255, 255, 255, 0.4);
}

#toggleSound.sound-off {
    background: rgba(255, 255, 255, 0.1);
    color: #888;
    border-color: #888;
}

#toggleSound.sound-off:before {
    content: "🔇 静音";
}

#toggleSound.sound-on:before {
    content: "🔊 声音";
}

#toggleSound.sound-off span,
#toggleSound.sound-on span {
    display: none;
}

/* 移动设备适配 */
@media (max-width: 768px) {
    .controls {
        top: 10px;
        padding: 8px;
    }
    
    .controls button {
        padding: 6px 12px;
        margin: 3px;
        font-size: 12px;
    }
    
    #count {
        padding: 6px 12px;
        margin: 3px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .controls {
        top: 5px;
        padding: 5px;
    }
    
    .controls button {
        padding: 5px 10px;
        margin: 2px;
        font-size: 11px;
    }
    
    #count {
        padding: 5px 10px;
        margin: 2px;
        font-size: 11px;
    }
}