/* ==========================================================
   《箭头消消乐》顶级高颜值赛博极光主题 (Cyber Neon Aesthetic)
   ========================================================== */
:root {
    --bg-dark: #07090e;
    --card-bg: rgba(14, 20, 32, 0.75);
    --primary: #00f2fe;
    --primary-glow: rgba(0, 242, 254, 0.55);
    --pink: #ff2a85;
    --pink-glow: rgba(255, 42, 133, 0.55);
    --gold: #ffd32a;
    --gold-glow: rgba(255, 211, 42, 0.55);
    --green: #05ffa1;
    --green-glow: rgba(5, 255, 161, 0.55);
    --danger: #ff4757;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.12);
    --border-glow: rgba(0, 242, 254, 0.25);
    --shadow-neon: 0 0 25px rgba(0, 242, 254, 0.2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-dark);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text-main);
    touch-action: none;
}

#app-container {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    overflow: hidden;
    background-color: #07090f;
    background-image: 
        radial-gradient(circle at 50% 25%, rgba(0, 242, 254, 0.08) 0%, transparent 60%),
        radial-gradient(circle at 80% 85%, rgba(255, 42, 133, 0.05) 0%, transparent 50%),
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 34px 34px, 34px 34px;
}

/* 顶部 HUD 专业状态栏 (全新重构双层布局：上层导航与玩家名片，下层关卡、居中独立3颗心、计时得分，杜绝任何重叠遮挡) */
header#gameHeader {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(10, 15, 26, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
    z-index: 20;
    flex-shrink: 0;
    padding: 3px 10px 4px 10px;
    gap: 3px;
    user-select: none;
    overflow: hidden;
}

/* 顶栏：系统导航、玩家信息与快捷设置 */
.hud-utility-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-height: 26px;
}

.hud-bar-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.hud-bar-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* 底栏：核心游戏态势 (关卡选择、居中显眼3颗爱心、时间积分) */
.hud-gameplay-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-height: 30px;
    padding-top: 1px;
}

.hud-gp-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.hud-gp-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.hud-gp-right {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.hud-chip {
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 3px;
    line-height: 1;
    white-space: nowrap;
    user-select: none;
}

.hud-chip.btn-clickable {
    cursor: pointer;
    background: rgba(0, 242, 254, 0.12);
    border-color: rgba(0, 242, 254, 0.35);
    color: var(--primary);
    transition: all 0.15s;
}

.hud-chip.btn-clickable:active {
    transform: scale(0.95);
}

/* 核心关卡数据胶囊 (计时、得分) */
.hud-stat-chip {
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    display: flex;
    align-items: center;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.hud-stat-chip.score-highlight {
    color: #ffd32a;
    background: rgba(255, 211, 42, 0.08);
    border-color: rgba(255, 211, 42, 0.25);
}

/* 顶部玩家名称胶囊 (在顶栏专属区域，单行截断，绝不占用底栏生命值空间) */
.hud-user-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    max-width: 140px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.12) 0%, rgba(99, 102, 241, 0.12) 100%);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #e2e8f0;
    cursor: pointer;
    font-size: 11.5px;
    font-weight: 700;
    transition: all 0.15s;
    white-space: nowrap;
    overflow: hidden;
}

.hud-user-chip:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2) 0%, rgba(99, 102, 241, 0.2) 100%);
    border-color: rgba(56, 189, 248, 0.6);
}

.hud-user-chip:active {
    transform: scale(0.95);
}

.hud-user-avatar {
    font-size: 12px;
    flex-shrink: 0;
}

.hud-user-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100px;
    line-height: 1.2;
}

/* 顶部独立显眼 3 颗爱心生命槽 (专属视觉焦点，独立居中，绝不遮挡) */
.hud-hearts-display, .hud-hearts {
    font-size: 15px;
    letter-spacing: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 6px rgba(255, 71, 87, 0.7));
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1;
    transition: transform 0.2s ease;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    color: #fff;
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12.5px;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

.btn-icon:hover {
    background: rgba(0, 242, 254, 0.2);
    border-color: var(--primary);
}

.btn-icon:active {
    transform: scale(0.92);
}

/* 窄屏手机适配：紧凑精致，彻底告别元素碰撞 */
@media (max-width: 480px) {
    header#gameHeader {
        padding: 2px 6px 3px 6px;
        gap: 2px;
    }
    .hud-utility-bar {
        min-height: 24px;
    }
    .hud-gameplay-bar {
        min-height: 28px;
    }
    .hud-user-chip {
        max-width: 100px;
        padding: 2px 6px;
    }
    .hud-user-name {
        max-width: 70px;
        font-size: 10.5px;
    }
    .hud-chip {
        font-size: 11px;
        padding: 2px 6px;
    }
    .hud-stat-chip {
        padding: 2px 5px;
        font-size: 10.5px;
    }
    .btn-icon {
        width: 24px;
        height: 24px;
        min-width: 24px;
        font-size: 12px;
    }
    .hud-hearts-display, .hud-hearts {
        font-size: 14px;
        letter-spacing: 3px;
    }
}

/* 游戏主画布区 (全屏自适应，占据屏幕绝大部分空间) */
main#canvasArea {
    flex: 1;
    min-height: 0;
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 2px;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
}

/* 棋盘缩放与视角漫游悬浮浮窗 (触控/鼠标兼顾，半透明极光毛玻璃) */
.canvas-zoom-toolbar {
    position: absolute;
    right: 12px;
    bottom: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    background: rgba(10, 15, 29, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 242, 254, 0.3);
    border-radius: 20px;
    padding: 5px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55), 0 0 15px rgba(0, 242, 254, 0.15);
    z-index: 25;
    user-select: none;
    transition: all 0.2s ease;
}

.canvas-zoom-toolbar:hover {
    border-color: rgba(0, 242, 254, 0.6);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.65), 0 0 20px rgba(0, 242, 254, 0.25);
}

.zoom-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
}

.zoom-btn:hover {
    background: rgba(0, 242, 254, 0.2);
    border-color: var(--primary);
    color: #fff;
    transform: scale(1.08);
}

.zoom-btn:active {
    transform: scale(0.92);
}

.zoom-btn.reset-btn {
    border-radius: 12px;
    width: auto;
    min-width: 32px;
    padding: 0 5px;
    font-size: 9.5px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: var(--primary);
    background: rgba(0, 242, 254, 0.12);
    border-color: rgba(0, 242, 254, 0.4);
}

/* 底部操作工具栏 (单行高度仅44px，全平台自适应无遮挡) */
footer#gameFooter {
    height: 44px;
    min-height: 44px;
    padding: 4px 8px;
    background: rgba(10, 15, 26, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    flex-shrink: 0;
}

#puzzleControls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 480px;
}

.btn-action {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 7px 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 13px;
    font-weight: 700;
}

.btn-action .action-icon {
    font-size: 15px;
}

.btn-action .action-label {
    font-size: 12px;
    color: var(--text-main);
}

.btn-action:active {
    transform: scale(0.94);
}

.btn-action.highlight {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.18) 0%, rgba(79, 172, 254, 0.18) 100%);
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.btn-action.special {
    background: linear-gradient(135deg, rgba(255, 211, 42, 0.18) 0%, rgba(255, 107, 53, 0.18) 100%);
    border-color: var(--gold);
    box-shadow: 0 0 10px var(--gold-glow);
}

/* ==========================================================
   沉浸式全屏模式 (让游戏区域占满全屏，布局依然标准清晰不重叠)
   ========================================================== */
#app-container.immersive-fullscreen {
    padding: 0;
}

#app-container.immersive-fullscreen header#gameHeader {
    background: rgba(10, 15, 26, 0.95);
    border-bottom: 1px solid rgba(0, 242, 254, 0.25);
    z-index: 40;
}

#app-container.immersive-fullscreen main#canvasArea {
    flex: 1;
    width: 100%;
    height: 100%;
    padding: 2px;
    z-index: 10;
}

#app-container.immersive-fullscreen footer#gameFooter {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 15, 26, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(0, 242, 254, 0.35);
    border-radius: 24px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 242, 254, 0.2);
    width: auto;
    min-width: 280px;
    max-width: 92%;
    height: 44px;
    z-index: 40;
    padding: 4px 12px;
}

/* 弹窗通用 (极光毛玻璃卡片，GPU层级隔离防闪烁，隐藏态彻底不可见不占层) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 29, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    isolation: isolate;
}

.modal-overlay.visible {
    display: flex !important;
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: rgba(16, 23, 38, 0.94);
    border: 1px solid rgba(0, 242, 254, 0.3);
    border-radius: 24px;
    padding: 26px;
    width: 88%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 242, 254, 0.15);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

@keyframes popIn {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-title {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #fff 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.stars-row {
    font-size: 32px;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 10px rgba(255, 211, 42, 0.7));
}

.score-badge {
    font-size: 30px;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 24px;
    text-shadow: 0 0 16px var(--primary-glow);
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-primary {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    border: none;
    color: #050b14;
    font-size: 16px;
    font-weight: 900;
    padding: 13px;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 0 20px var(--primary-glow);
    transition: all 0.2s;
}

.btn-primary:active {
    transform: scale(0.96);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 11px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:active {
    background: rgba(255, 255, 255, 0.15);
}

/* 关卡选择列表 */
.level-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-height: 290px;
    overflow-y: auto;
    padding: 8px 4px;
    margin-bottom: 18px;
}

.level-chip {
    padding: 12px 6px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.level-chip.unlocked {
    background: rgba(0, 242, 254, 0.1);
    border-color: rgba(0, 242, 254, 0.4);
    color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.1);
}

.level-chip.unlocked:active {
    transform: scale(0.94);
}

.level-chip.current {
    background: linear-gradient(135deg, #00f2fe 0%, #ff2a85 100%);
    color: #ffffff;
    box-shadow: 0 0 16px var(--primary-glow);
    border: none;
}

.level-chip.locked {
    color: var(--text-muted);
    opacity: 0.35;
    cursor: not-allowed;
}

/* 玩法说明 */
.help-content {
    text-align: left;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-main);
    margin-bottom: 20px;
    max-height: 270px;
    overflow-y: auto;
}

.help-item {
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.04);
    padding: 10px 14px;
    border-radius: 12px;
    border-left: 3px solid var(--primary);
}

.help-item strong {
    color: var(--primary);
}

/* ==========================================================
   顶部非遮挡式 PERFECT 悬浮弹幕 (置顶、不挡棋盘、不干扰点击)
   ========================================================== */
.top-perfect-banner {
    position: absolute;
    top: 48px;
    left: 50%;
    transform: translateX(-50%) translateY(-24px);
    background: rgba(10, 16, 28, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid var(--primary);
    border-radius: 22px;
    box-shadow: 0 4px 20px rgba(0, 242, 254, 0.4), 0 0 10px rgba(0, 242, 254, 0.2);
    padding: 5px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 60;
    pointer-events: none !important;
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.top-perfect-banner.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.top-perfect-banner .banner-icon {
    font-size: 16px;
    animation: pulseIcon 0.6s infinite alternate;
}

@keyframes pulseIcon {
    0% { transform: scale(0.9); }
    100% { transform: scale(1.2); }
}

.top-perfect-banner .banner-text {
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #ffd32a 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.top-perfect-banner .banner-score {
    font-size: 12px;
    font-weight: 800;
    color: #ffd32a;
    background: rgba(255, 211, 42, 0.15);
    padding: 2px 7px;
    border-radius: 10px;
    border: 1px solid rgba(255, 211, 42, 0.3);
}

/* ==========================================================
   会员特权与VIP弹窗样式
   ========================================================== */
.vip-perks-box {
    text-align: left;
    margin: 14px 0 18px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vip-perk-row {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 211, 42, 0.25);
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.4;
    color: #f8fafc;
}

.vip-perk-row b {
    color: #ffd32a;
}

/* ==========================================================
   首次打开欢迎选择弹窗样式 (离线体验 vs 登录游戏)
   ========================================================== */
.login-choice-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}

.choice-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    cursor: pointer;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.choice-item:active {
    transform: scale(0.96);
}

.choice-item.highlight {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.15) 0%, rgba(79, 172, 254, 0.12) 100%);
    border-color: rgba(0, 242, 254, 0.5);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.18);
}

.choice-icon {
    font-size: 26px;
    flex-shrink: 0;
}

.choice-text {
    flex: 1;
}

.choice-name {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 2px;
}

.choice-item.highlight .choice-name {
    color: var(--primary);
}

.choice-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.choice-enter {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: bold;
}

/* ==========================================================
   登录输入框与赛博输入样式
   ========================================================== */
.text-input-cyber {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(0, 242, 254, 0.35);
    background: rgba(10, 15, 26, 0.8);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    outline: none;
    transition: border-color 0.2s;
}

.text-input-cyber:focus {
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
}

/* ==========================================================
   全国玩家排行榜样式
   ========================================================== */
.my-rank-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.12) 0%, rgba(255, 42, 133, 0.12) 100%);
    border: 1px solid rgba(0, 242, 254, 0.3);
    border-radius: 14px;
    padding: 8px 12px;
    margin-bottom: 10px;
    font-size: 12px;
    flex-shrink: 0;
}

.my-rank-pos {
    font-weight: 800;
    color: #ffd32a;
}

.my-rank-user {
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 4px;
}

.my-rank-data {
    color: #38bdf8;
    font-weight: 700;
}

.lb-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.lb-tab {
    flex: 1;
    padding: 7px 4px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}

.lb-tab.active {
    background: rgba(0, 242, 254, 0.18);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.leaderboard-scroll-list {
    flex: 1;
    overflow-y: auto;
    max-height: 250px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 4px;
}

.lb-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 12px;
}

.lb-row:nth-child(1) {
    background: linear-gradient(90deg, rgba(255, 211, 42, 0.12) 0%, rgba(255, 255, 255, 0.03) 100%);
    border-color: rgba(255, 211, 42, 0.35);
}

.lb-row:nth-child(2) {
    background: linear-gradient(90deg, rgba(203, 213, 225, 0.12) 0%, rgba(255, 255, 255, 0.03) 100%);
    border-color: rgba(203, 213, 225, 0.3);
}

.lb-row:nth-child(3) {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.12) 0%, rgba(255, 255, 255, 0.03) 100%);
    border-color: rgba(205, 127, 50, 0.3);
}

.lb-rank-num {
    width: 24px;
    font-weight: 900;
    text-align: left;
}

.lb-row:nth-child(1) .lb-rank-num { color: #ffd32a; }
.lb-row:nth-child(2) .lb-rank-num { color: #e2e8f0; }
.lb-row:nth-child(3) .lb-rank-num { color: #f59e0b; }

.lb-user-cell {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    text-align: left;
    margin: 0 8px;
}

.lb-user-name {
    font-weight: 700;
    color: #f8fafc;
}

.lb-user-city {
    font-size: 10px;
    color: var(--text-muted);
}

.lb-val-cell {
    font-weight: 800;
    color: var(--primary);
    text-align: right;
}

/* ==========================================================
   游戏大厅 (Game Lobby / 主菜单) 现代电竞玻璃质感样式
   ========================================================== */
.lobby-card {
    max-width: 440px !important;
    width: 92%;
    max-height: 88vh;
    overflow-y: auto;
    padding: 22px 18px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lobby-header {
    text-align: center;
}

.lobby-logo {
    font-size: 38px;
    margin-bottom: 2px;
    filter: drop-shadow(0 0 10px rgba(0, 242, 254, 0.45));
}

.lobby-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.lobby-title {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.game-version-badge {
    background: rgba(0, 242, 254, 0.15);
    border: 1px solid rgba(0, 242, 254, 0.45);
    color: #00f2fe;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 12px;
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.2);
}

.lobby-tagline {
    font-size: 12px;
    color: var(--text-muted);
    margin: 4px 0 0 0;
}

/* 玩家身份栏 */
.lobby-user-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 10px 12px;
}

.user-avatar-wrap {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0, 242, 254, 0.1);
    border: 1.5px solid rgba(0, 242, 254, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.user-info-text {
    flex: 1;
    text-align: left;
}

.user-name-line {
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-nickname {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
}

.vip-crown-badge {
    background: linear-gradient(135deg, #ffd32a 0%, #ff9f43 100%);
    color: #000;
    font-size: 10px;
    font-weight: 900;
    padding: 1px 6px;
    border-radius: 10px;
}

.mode-tag-badge {
    background: rgba(148, 163, 184, 0.18);
    color: #94a3b8;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 10px;
}

.user-stats-line {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

.btn-chip-action {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #cbd5e1;
    border-radius: 12px;
    padding: 5px 10px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-chip-action:active {
    background: rgba(0, 242, 254, 0.2);
    color: #00f2fe;
}

/* 大厅导航矩阵 */
.lobby-menu-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lobby-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    color: #fff;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lobby-action-btn:active {
    transform: scale(0.97);
}

.lobby-action-btn.primary-action {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.16) 0%, rgba(79, 172, 254, 0.12) 100%);
    border-color: rgba(0, 242, 254, 0.5);
    box-shadow: 0 4px 18px rgba(0, 242, 254, 0.2);
}

.lobby-action-btn.primary-action .action-title {
    color: #00f2fe;
    font-size: 15px;
}

.action-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.action-body {
    flex: 1;
}

.action-title {
    font-size: 14px;
    font-weight: 800;
    color: #f8fafc;
}

.action-desc {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 1px;
}

.action-arrow {
    font-size: 14px;
    color: #64748b;
}

.lobby-action-btn.primary-action .action-arrow {
    color: #00f2fe;
}

.lobby-footer {
    font-size: 11px;
    color: #64748b;
    text-align: center;
    margin-top: 4px;
}

.lobby-footer b {
    color: #38bdf8;
}

/* ==========================================================
   FWPT OneID 统一通行证登录与注册体系样式
   ========================================================== */
.auth-tabs-row {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-tab {
    flex: 1;
    padding: 8px 10px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab.active {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.2) 0%, rgba(79, 172, 254, 0.2) 100%);
    border: 1px solid rgba(0, 242, 254, 0.5);
    color: #00f2fe;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.2);
}

.auth-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

.form-group-cyber {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cyber-label {
    font-size: 11.5px;
    font-weight: 700;
    color: #94a3b8;
}

.cyber-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(10, 15, 26, 0.85);
    color: #f8fafc;
    font-size: 13.5px;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s;
}

.cyber-input:focus {
    border-color: #00f2fe;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.25);
}

.cyber-link-btn {
    font-size: 11.5px;
    color: #64748b;
    cursor: pointer;
    user-select: none;
    transition: color 0.15s;
}

.cyber-link-btn:hover {
    color: #00f2fe;
}

.reg-channel-switch {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.channel-btn {
    flex: 1;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
    font-size: 11.5px;
    cursor: pointer;
    transition: all 0.15s;
}

.channel-btn.active {
    background: rgba(0, 242, 254, 0.15);
    border-color: rgba(0, 242, 254, 0.45);
    color: #00f2fe;
    font-weight: 700;
}

.btn-verify-code {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 242, 254, 0.4);
    background: rgba(0, 242, 254, 0.12);
    color: #00f2fe;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}

.btn-verify-code:hover {
    background: rgba(0, 242, 254, 0.25);
}

.btn-verify-code:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}


