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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #1a1a2e;
    font-family: 'Arial', sans-serif;
}

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

#game-container canvas {
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

/* 触摸控制按钮样式 */
.touch-controls {
    position: absolute;
    bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.touch-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    transition: all 0.1s;
}

.touch-btn:active {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0.95);
}

.touch-btn.left {
    background: rgba(255, 100, 100, 0.3);
    border-color: rgba(255, 100, 100, 0.6);
}

.touch-btn.right {
    background: rgba(100, 255, 100, 0.3);
    border-color: rgba(100, 255, 100, 0.6);
}

/* 防止移动端默认行为 */
body {
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 加载画面 */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-title {
    font-size: 36px;
    font-weight: bold;
    color: #ff6b35;
    text-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
    margin-bottom: 30px;
}

.loading-bar {
    width: 300px;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, #ff6b35, #f7931e);
    border-radius: 5px;
    transition: width 0.3s;
}

.loading-text {
    margin-top: 15px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .touch-btn {
        width: 60px;
        height: 60px;
        font-size: 20px;
    }
    
    .loading-title {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .touch-btn {
        width: 55px;
        height: 55px;
        font-size: 18px;
    }
    
    .touch-controls {
        padding: 0 10px;
        bottom: 10px;
    }
}
