/* 💡 颜色变量：调浅粉色 */
:root {
    --bg-color: #FFF2F5;   /* 极浅奶油粉 */
    --brand-blue: #00AEEF;
    --brand-yellow: #FFB800;
}

body, html { 
    margin: 0; padding: 0; width: 100%; height: 100%; 
    overflow: hidden; background-color: var(--bg-color); 
    font-family: "Arial Black", sans-serif;
}

#three-canvas { position: fixed; top: 0; left: 0; z-index: 1; }

#loading-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--bg-color); 
    z-index: 2000; /* 确保在最上层 */
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.8s ease-in-out;
}

/* 登录框布局 */
.login-box { 
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 45px; 
}

.brand-logo h1 { 
    margin: 0; padding: 0; 
    line-height: 0.85; 
    filter: drop-shadow(0 8px 0px rgba(0,0,0,0.03)); 
    text-align: center;
}

.top-text { 
    font-size: 100px; color: var(--brand-yellow); 
    -webkit-text-stroke: 10px white;
    paint-order: stroke fill;
}

.bottom-text { 
    font-size: 140px; color: var(--brand-blue); 
    -webkit-text-stroke: 12px white;
    paint-order: stroke fill;
}

/* 进度条 */
.progress-container {
    width: 320px; height: 28px; 
    background: white; 
    border: 5px solid #BEEFFF; border-radius: 50px; 
    overflow: hidden;
}
#progress-bar { 
    width: 0%; height: 100%; 
    background: var(--brand-yellow); 
    border-radius: 50px;
    transition: width 0.3s ease-out; 
}

/* 按钮 */
#start-btn {
    display: none; 
    padding: 18px 70px; font-size: 26px; font-weight: bold;
    background: var(--brand-blue); color: white; 
    border: none; border-radius: 60px;
    cursor: pointer; 
    box-shadow: 0 10px 0px #0088B8;
    transition: transform 0.2s, box-shadow 0.2s;
}
#start-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 0px #0088B8; }
#start-btn:active { transform: translateY(6px); box-shadow: 0 4px 0px #0088B8; }

.subtitle { color: var(--brand-blue); font-weight: bold; opacity: 0.6; margin: 0; font-size: 14px; }

/* =========================================
   🚀 核心：优化后的折叠 UI 布局 (底部居中)
   ========================================= */

#ui-master-wrapper {
    position: fixed;
    bottom: 30px;
    left: 50%;                 /* 💡 居中定位 */
    transform: translateX(-50%); /* 💡 抵消宽度 */
    display: flex;
    flex-direction: column-reverse; /* 开关在底部，面板向上弹出 */
    align-items: center;        /* 💡 垂直中心对齐 */
    gap: 15px;
    z-index: 1001;
}

/* 主切换按钮：设置齿轮样式 */
.main-toggle-btn {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0,0,0,0.05);
    color: #666;
}
.main-toggle-btn:hover { transform: scale(1.1); color: #ff6b81; }
.main-toggle-btn.active { transform: rotate(90deg); background: #ff6b81; color: white; }
.main-toggle-btn .main-icon { font-size: 22px; }

/* 容器：横向排列面板，增加高级感 */
.game-ui-container {
    display: flex;
    flex-direction: row; /* 💡 改为横向，避免叠得太高 */
    gap: 12px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: translateY(0); /* 默认位置 */
}

/* 💡 核心：隐藏状态 (向下沉并消失) */
.game-ui-container.ui-hidden {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    pointer-events: none;
    filter: blur(5px);
}

/* 面板样式：奶油磨砂感 */
.ui-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    padding: 8px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.5);
}
.ui-panel.capsule { padding: 8px 18px; border-radius: 50px; }

/* 按钮基础 */
.icon-btn, .icon-btn-sm {
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}
.icon-btn { 
    width: 42px; height: 42px; border-radius: 12px; font-size: 20px; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.icon-btn:hover { transform: translateY(-2px); background: #fdfdfd; }
.icon-btn.active { background: #ff6b81; color: white; }

.icon-btn-sm { width: 28px; height: 28px; border-radius: 50%; background: #f1f2f6; font-size: 12px; }

.speed-text { font-weight: bold; color: #2f3542; margin: 0 5px; min-width: 40px; text-align: center; font-size: 14px; }

.divider { width: 1px; height: 20px; background: rgba(0,0,0,0.1); margin: 0 4px; }