/* ============================================================================
   诸葛亮的征途（网页版）—— 页面外壳样式
   画布铺满窗口，游戏内部按 16:9 做 letterbox（与 C++ 的 viewport 行为一致）
   ============================================================================ */

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

#game {
    display: block;
    width: 100vw;
    height: 100vh;
    background: #000;
    cursor: default;
    touch-action: none;
}

/* 用户名输入框：不可见但"在线"（否则 iOS 上聚焦弹不出键盘）。
   实际文字由画布自己画，这里只用来收键盘 / 中文输入法。 */
#nameInput {
    position: fixed;
    left: 0;
    top: 0;
    width: 2px;
    height: 2px;
    padding: 0;
    border: 0;
    outline: none;
    opacity: 0;
    background: transparent;
    color: transparent;
    caret-color: transparent;
    z-index: 5;
    display: none;
}

/* ---------------- 加载页 ---------------- */
#loading {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: #14181f;
    color: #e6ecf5;
    z-index: 10;
}

#loading .logo {
    font-size: 40px;
    font-weight: bold;
    color: #ffd700;
    letter-spacing: 4px;
}

#loading .sub {
    font-size: 15px;
    color: #8d97a6;
}

#loading .track {
    width: 320px;
    height: 8px;
    border-radius: 4px;
    background: #232a35;
    overflow: hidden;
}

#loading #bar {
    width: 0%;
    height: 100%;
    background: #4d6bfe;
    transition: width .15s linear;
}

#loading #tip {
    font-size: 14px;
    color: #9fb0c8;
}
