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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: fixed;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #1a0033 0%, #330066 50%, #000033 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 10px;
}

#gameCanvas {
    border: 3px solid #FFD700;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5),
                0 0 60px rgba(255, 215, 0, 0.3);
    background: #000;
    cursor: pointer;
    display: block;
    max-width: 100%;
    max-height: 100%;
}

/* 移动端适配 */
@media (max-width: 768px) {
    #game-container {
        padding: 0;
    }
    
    #gameCanvas {
        border-width: 2px;
        border-radius: 0;
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100vw;
        max-height: 100vh;
    }
}

/* 禁用移动端的默认触摸行为 */
#gameCanvas {
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* 防止下拉刷新 */
body {
    overscroll-behavior: none;
}

/* 音乐控制按钮 */
#music-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 215, 0, 0.9);
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

#music-toggle:hover {
    transform: scale(1.1);
    background: rgba(255, 215, 0, 1);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.7);
}

#music-toggle:active {
    transform: scale(0.95);
}

#music-toggle.muted {
    background: rgba(128, 128, 128, 0.7);
    box-shadow: 0 4px 15px rgba(128, 128, 128, 0.3);
}

/* 移动端音乐按钮适配 */
@media (max-width: 768px) {
    #music-toggle {
        top: 10px;
        right: 10px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}
