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

body {
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    overflow: hidden;
    background: #0a0e2a;
    color: #00f3ff;
    user-select: none;
    -webkit-user-select: none;
}

#gameContainer {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0e2a 0%, #1a1e3a 100%);
    cursor: grab;
}

#gameCanvas:active {
    cursor: grabbing;
}

/* UI层样式 */
#uiLayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

#uiLayer > * {
    pointer-events: auto;
}

/* 顶部栏 */
#topBar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 10px 15px;
    background: rgba(10, 14, 42, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

#energyBar {
    position: relative;
    width: 200px;
    height: 30px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #00f3ff;
    border-radius: 15px;
    overflow: hidden;
}

#energyFill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #00f3ff 0%, #ff00ff 100%);
    transition: width 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
}

#energyText {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 5px #00f3ff;
    z-index: 1;
}

#levelInfo {
    font-size: 14px;
    font-weight: bold;
    text-shadow: 0 0 10px #00f3ff;
}

/* 提示框 */
.hint-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(10, 14, 42, 0.95);
    border: 2px solid #00f3ff;
    border-radius: 10px;
    padding: 20px;
    max-width: 300px;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.5);
}

.hint-box p {
    margin: 10px 0;
    font-size: 14px;
    line-height: 1.6;
}

.hint-box button {
    margin-top: 15px;
    padding: 10px 20px;
    background: #00f3ff;
    color: #0a0e2a;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.hint-box button:active {
    transform: scale(0.95);
    background: #ff00ff;
}

/* 分裂菜单 */
.split-menu {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    padding: 20px;
    background: rgba(10, 14, 42, 0.9);
    border: 2px solid #00f3ff;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.5);
}

.split-option {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #00f3ff 0%, #ff00ff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: #0a0e2a;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
}

.split-option:active {
    transform: scale(0.9);
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.8);
}

/* 游戏覆盖层 */
#gameOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay-content {
    background: rgba(10, 14, 42, 0.95);
    border: 2px solid #00f3ff;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    min-width: 300px;
    box-shadow: 0 0 50px rgba(0, 243, 255, 0.5);
}

.overlay-content h2 {
    margin-bottom: 20px;
    font-size: 24px;
    text-shadow: 0 0 10px #00f3ff;
}

.overlay-content p {
    margin: 15px 0;
    font-size: 16px;
}

.overlay-content button {
    margin: 10px;
    padding: 12px 24px;
    background: #00f3ff;
    color: #0a0e2a;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.overlay-content button:active {
    transform: scale(0.95);
    background: #ff00ff;
}

.hidden {
    display: none !important;
}

/* 移动端适配 */
@media (max-width: 768px) {
    #topBar {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    #energyBar {
        width: 150px;
        height: 25px;
    }
    
    #energyText {
        font-size: 10px;
    }
    
    .split-menu {
        bottom: 80px;
        gap: 10px;
        padding: 15px;
    }
    
    .split-option {
        width: 60px;
        height: 60px;
        font-size: 12px;
    }
    
    .hint-box {
        max-width: 90%;
        padding: 15px;
    }
    
    .overlay-content {
        min-width: 90%;
        padding: 20px;
    }
}

