/* ==================== 全局重置 ==================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --tile-size: calc((100vw - 10px) / 10);
    --status-bar-height: 48px;
    --bottom-bar-height: 56px;
    --color-bg: #1a1a2e;
    --color-surface: #16213e;
    --color-primary: #e8d44d;
    --color-primary-dark: #c4a82e;
    --color-accent: #8b6bc0;
    --color-danger: #e74c3c;
    --color-success: #2ecc71;
    --color-text: #e0e0e0;
    --color-text-dim: #888;
    --color-border: #2a2a4a;
    --radius: 8px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ==================== 按钮 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
    min-width: 44px;
    transition: all 0.2s;
    touch-action: manipulation;
}
.btn:active { transform: scale(0.96); }

.btn-primary { background: var(--color-primary); color: #1a1a2e; }
.btn-primary:hover { background: var(--color-primary-dark); }

.btn-danger { background: var(--color-danger); color: #fff; }

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-sm { padding: 8px 16px; font-size: 13px; min-height: 36px; }
.btn-full { width: 100%; }

/* ==================== 表单 ==================== */
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--color-text-dim);
}
.form-group input, .form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus {
    border-color: var(--color-primary);
}

/* ==================== 消息提示 ==================== */
.msg {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 13px;
}
.msg-error { background: rgba(231,76,60,0.15); color: #e74c3c; border: 1px solid rgba(231,76,60,0.3); }
.msg-success { background: rgba(46,204,113,0.15); color: #2ecc71; border: 1px solid rgba(46,204,113,0.3); }
.msg-info { background: rgba(139,107,192,0.15); color: #8b6bc0; border: 1px solid rgba(139,107,192,0.3); }

/* ==================== 登录/注册页 ==================== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}
.auth-container {
    width: 100%;
    max-width: 380px;
}
.auth-title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    color: var(--color-primary);
    margin-bottom: 6px;
    letter-spacing: 2px;
}
.auth-subtitle {
    text-align: center;
    color: var(--color-text-dim);
    margin-bottom: 32px;
    font-size: 14px;
}
.auth-form {
    background: var(--color-surface);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
}
.auth-link {
    text-align: center;
    margin-top: 20px;
    color: var(--color-text-dim);
    font-size: 13px;
}

/* ==================== 创角页 ==================== */
.create-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 16px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    overflow-y: auto;
}
.create-container {
    width: 100%;
    max-width: 400px;
}
.create-preview {
    text-align: center;
    margin-bottom: 20px;
}
.create-preview img {
    width: 80px;
    height: 160px;
    image-rendering: pixelated;
    border: 2px solid var(--color-primary);
    border-radius: var(--radius);
    background: var(--color-surface);
}

.gender-select {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}
.gender-option {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--color-surface);
}
.gender-option.active {
    border-color: var(--color-primary);
    background: rgba(232,212,77,0.1);
}
.gender-option input { display: none; }
.gender-option .gender-icon { font-size: 32px; margin-bottom: 4px; }
.gender-option .gender-label { font-size: 14px; }

.direction-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}
.direction-option {
    padding: 10px 4px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--color-surface);
    font-size: 13px;
}
.direction-option.active {
    border-color: var(--color-primary);
    background: rgba(232,212,77,0.1);
}
.direction-option .bonus {
    font-size: 11px;
    color: var(--color-primary);
    display: block;
}

/* ==================== 游戏主界面 ==================== */
.game-page {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 状态栏 */
.status-bar {
    height: var(--status-bar-height);
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    font-size: 12px;
    flex-shrink: 0;
    gap: 4px;
}
.status-bar .status-left {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.status-bar .realm-name {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 11px;
    white-space: nowrap;
}
.status-bar .char-name {
    font-weight: 600;
    font-size: 11px;
}
.status-coord {
    color: #60a5fa;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.2s;
}
.status-coord:hover {
    background: rgba(96,165,250,0.15);
    color: #93c5fd;
}
.status-coord::before {
    content: '📍';
    margin-right: 2px;
    font-size: 10px;
}
.status-resources {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.status-resources span {
    white-space: nowrap;
    font-size: 11px;
}
.res-cultivation { color: #a78bfa; }
.res-qi { color: #60a5fa; }
.res-xianyuan { color: var(--color-primary); }

/* 地图容器 */
.map-section {
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.map-wrapper {
    position: relative;
    overflow: hidden;
    cursor: grab;
    /* width/height 由 JS calcLayout() 动态设置 */
}
.map-wrapper:active { cursor: grabbing; }
.map-wrapper.dragging { cursor: grabbing; }

/* 地图中心锚点图标 */
.map-center-anchor {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: rgba(232, 212, 77, 0.6);
    text-shadow: 0 0 6px rgba(232, 212, 77, 0.4);
    pointer-events: none;
    z-index: 10;
    display: none;
}
.map-wrapper.dragging .map-center-anchor {
    display: block;
}

.map-grid {
    position: absolute;
    top: 0;
    left: 0;
    display: grid;
    /* width/height/grid-template 由 JS buildMapGrid() 设置 */
}
.map-grid.no-transition { transition: none; }

.map-tile {
    position: relative;
    border: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: border-color 0.15s;
    /* width/height 由 JS 直接 style 属性设置 */
}
.map-tile.highlight {
    border-color: var(--color-primary);
    z-index: 2;
    box-shadow: 0 0 8px rgba(232,212,77,0.4);
}
.map-tile.adjacent {
    border-color: rgba(255,255,255,0.2);
}
.map-tile.player-tile {
    border-color: var(--color-success);
    box-shadow: 0 0 6px rgba(46,204,113,0.5);
}
.map-tile.unknown {
    background: #3A3A3A !important;
    cursor: default;
}

.tile-player-dot {
    width: 40%;
    height: 40%;
    border-radius: 50%;
    position: absolute;
    z-index: 3;
}
.tile-player-count {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: #e74c3c;
    color: #fff;
    font-size: 8px;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    font-weight: 600;
}

.tile-icon {
    pointer-events: none;
    /* font-size 由 JS 内联设置 */
}

/* 地块 Tooltip */
.tooltip-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tooltip-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
}
.tooltip-box {
    position: relative;
    background: var(--color-surface);
    border: 2px solid var(--color-primary);
    border-radius: 12px;
    padding: 20px;
    min-width: 220px;
    max-width: 300px;
    text-align: center;
    z-index: 1;
    animation: popIn 0.2s ease-out;
}
.tooltip-box h3 {
    color: var(--color-primary);
    font-size: 18px;
    margin-bottom: 4px;
}
.tooltip-box .tile-desc {
    color: var(--color-text-dim);
    font-size: 13px;
    margin-bottom: 12px;
}
.tooltip-box .tile-rate {
    font-size: 14px;
    margin-bottom: 16px;
}
.tooltip-box .btn {
    margin: 0 4px;
}

/* 玩家信息卡 */
.player-card {
    position: absolute;
    z-index: 50;
    background: var(--color-surface);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius);
    padding: 12px;
    min-width: 180px;
    text-align: center;
    font-size: 13px;
    animation: popIn 0.2s ease-out;
}
.player-card .p-name { font-weight: 600; color: var(--color-primary); }
.player-card .p-realm { color: var(--color-text-dim); font-size: 12px; }
.player-card .p-stats { margin: 6px 0; font-size: 12px; }
.player-card .p-stats span { margin: 0 4px; }
.player-card .btn { margin-top: 8px; }

/* ==================== 游戏日志区域 ==================== */
.log-section {
    /* height 由 JS calcLayout() 动态设置 */
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: rgba(0,0,0,0.35);
    border-top: 1px solid var(--color-border);
    overflow: hidden;
    min-height: 80px;
}
.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 10px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}
.log-title {
    font-size: 11px;
    color: var(--color-text-dim);
    font-weight: 600;
}
.log-tile-info {
    font-size: 10px;
    color: var(--color-primary);
}
.log-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 8px;
    -webkit-overflow-scrolling: touch;
}
.log-empty {
    text-align: center;
    color: var(--color-text-dim);
    font-size: 12px;
    padding: 20px 0;
}
.log-entry {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    padding: 3px 0;
    border-bottom: 1px solid rgba(255,255,255,0.02);
    font-size: 11px;
    line-height: 1.4;
    animation: logFadeIn 0.3s ease-out;
}
.log-icon {
    flex-shrink: 0;
    font-size: 12px;
    width: 18px;
    text-align: center;
}
.log-msg {
    flex: 1;
    color: var(--color-text);
    min-width: 0;
    word-break: break-all;
}
.log-time {
    flex-shrink: 0;
    color: var(--color-text-dim);
    font-size: 9px;
    white-space: nowrap;
}
@keyframes logFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== 附近玩家面板 ==================== */
.players-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.player-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}
.player-row-avatar {
    font-size: 28px;
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}
.player-row-info {
    flex: 1;
    min-width: 0;
}
.player-row-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--color-text);
}
.player-row-realm {
    font-size: 11px;
    color: var(--color-primary);
}
.player-row-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

/* ==================== 进度条 ==================== */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 6px;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #a78bfa, var(--color-primary));
    border-radius: 4px;
    transition: width 0.5s ease-out;
}
.progress-text {
    font-size: 10px;
    color: var(--color-text-dim);
    text-align: center;
    margin-top: 2px;
}
.stat-full { grid-column: 1 / -1; }

/* 底部按钮栏 */
.bottom-bar {
    height: calc(var(--bottom-bar-height) + var(--safe-bottom));
    padding: 0 16px;
    padding-bottom: var(--safe-bottom);
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    flex-shrink: 0;
}
.bottom-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 11px;
    cursor: pointer;
    min-width: 56px;
    min-height: 44px;
    padding: 4px;
    border-radius: var(--radius);
    transition: background 0.2s;
}
.bottom-btn:active { background: rgba(255,255,255,0.05); }
.bottom-btn .btn-icon { font-size: 22px; }
.bottom-btn .btn-label { font-size: 10px; }
.bottom-btn.dice-btn {
    background: var(--color-primary);
    color: #1a1a2e;
    border-radius: 50px;
    padding: 8px 24px;
    min-width: 100px;
}
.bottom-btn.dice-btn .btn-icon { font-size: 26px; }
.bottom-btn.dice-btn:active { background: var(--color-primary-dark); }

/* ==================== 骰子弹窗 ==================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
}
.modal-box {
    position: relative;
    background: var(--color-surface);
    border: 2px solid var(--color-primary);
    border-radius: 12px;
    padding: 24px;
    min-width: 260px;
    max-width: 320px;
    text-align: center;
    z-index: 1;
    animation: diceSpin 0.6s ease-out;
}
.modal-box h3 { font-size: 20px; margin-bottom: 12px; }
.modal-box .dice-result { font-size: 60px; margin: 16px 0; }
.modal-box .dice-desc { font-size: 14px; color: var(--color-text-dim); margin-bottom: 12px; }
.modal-box .dice-value { font-size: 16px; margin-bottom: 16px; }
.modal-box .dice-value.gain { color: var(--color-success); }
.modal-box .dice-value.lose { color: var(--color-danger); }

/* ==================== 角色面板 ==================== */
.panel-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 200;
    display: flex;
    align-items: flex-end;
}
.panel-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
}
.panel-sheet {
    position: relative;
    background: var(--color-surface);
    border-radius: 16px 16px 0 0;
    padding: 20px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1;
    animation: slideUp 0.3s ease-out;
}
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.panel-close {
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 24px;
    cursor: pointer;
    width: 44px;
    height: 44px;
}
.favorites-list {
    max-height: 60vh;
    overflow-y: auto;
}
.favorite-item {
    transition: background 0.2s;
}
.favorite-item:hover {
    background: rgba(255,255,255,0.06) !important;
}

.profile-avatar {
    text-align: center;
    margin-bottom: 16px;
}
.profile-avatar img {
    width: 64px;
    height: 128px;
    image-rendering: pixelated;
    border: 2px solid var(--color-primary);
    border-radius: var(--radius);
}
.profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.stat-item {
    background: rgba(255,255,255,0.03);
    padding: 10px;
    border-radius: var(--radius);
    text-align: center;
}
.stat-label { font-size: 11px; color: var(--color-text-dim); }
.stat-value { font-size: 16px; font-weight: 600; color: var(--color-primary); }

/* ==================== 战斗界面 ==================== */
.battle-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
}
.battle-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
}
.battle-box {
    position: relative;
    background: var(--color-surface);
    border: 2px solid var(--color-danger);
    border-radius: 12px;
    padding: 20px;
    min-width: 300px;
    max-width: 360px;
    z-index: 1;
    text-align: center;
    animation: popIn 0.3s ease-out;
}
.battle-header {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-danger);
    margin-bottom: 8px;
}
.battle-vs { font-size: 14px; color: var(--color-text-dim); margin-bottom: 12px; }
.battle-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}
.battle-my { color: var(--color-success); }
.battle-enemy { color: var(--color-danger); }

.battle-choices {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 16px 0;
}
.battle-choice {
    flex: 1;
    padding: 16px 8px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg);
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    min-height: 60px;
}
.battle-choice:active { border-color: var(--color-primary); background: rgba(232,212,77,0.1); }
.battle-choice .choice-dir { font-size: 24px; display: block; }
.battle-timer { font-size: 12px; color: var(--color-text-dim); margin-bottom: 8px; }

/* 多回合战斗HP条 */
.battle-hp-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    font-size: 12px;
}
.battle-hp-label {
    width: 32px;
    text-align: right;
    color: var(--color-text-dim);
    flex-shrink: 0;
}
.battle-hp-bar {
    flex: 1;
    height: 14px;
    background: var(--color-bg);
    border-radius: 7px;
    overflow: hidden;
    border: 1px solid var(--color-border);
}
.battle-hp-fill {
    height: 100%;
    transition: width 0.4s ease;
    border-radius: 7px;
}
.battle-hp-fill.my-hp {
    background: linear-gradient(90deg, #2ecc71, #27ae60);
}
.battle-hp-fill.enemy-hp {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}
.battle-hp-num {
    width: 70px;
    text-align: left;
    font-size: 11px;
    color: var(--color-text-dim);
    flex-shrink: 0;
}
.battle-round {
    font-size: 13px;
    color: var(--color-primary);
    font-weight: 600;
    margin: 8px 0 4px;
}
.battle-last-result {
    font-size: 11px;
    color: var(--color-text-dim);
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    padding: 6px 8px;
    margin: 6px 0;
    line-height: 1.5;
}

/* 战斗回合历史（可滚动，最多3回合） */
.battle-history {
    max-height: 110px;
    overflow-y: auto;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 8px;
    margin: 6px 0;
    border: 1px solid var(--color-border);
}
.battle-history-item {
    font-size: 11px;
    color: var(--color-text-dim);
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    padding: 6px 8px;
    margin-bottom: 4px;
    line-height: 1.5;
}
.battle-history-item:last-child {
    margin-bottom: 0;
    background: rgba(232,212,77,0.08);
    color: var(--color-text);
}

/* 提升境界按钮 */
.btn-breakthrough {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    border: none;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #e8d44d, #d4aa3a);
    color: #1a1a2e;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-breakthrough:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}
.btn-breakthrough:active {
    transform: translateY(0);
}

/* 可提升境界时的进度条 */
.progress-fill.breakthrough-ready {
    background: linear-gradient(90deg, #e8d44d, #d4aa3a);
    box-shadow: 0 0 8px rgba(232,212,77,0.4);
}

.battle-result {
    padding: 16px;
    border-radius: var(--radius);
    margin-top: 12px;
    font-size: 14px;
}
.battle-result.win { background: rgba(46,204,113,0.15); border: 1px solid var(--color-success); }
.battle-result.lose { background: rgba(231,76,60,0.15); border: 1px solid var(--color-danger); }
.battle-result.draw { background: rgba(255,255,255,0.05); border: 1px solid var(--color-border); }

/* ==================== 动画 ==================== */
@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
@keyframes diceSpin {
    0% { transform: rotate(0deg) scale(0.5); opacity: 0; }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); opacity: 1; }
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.pulse { animation: pulse 1.5s infinite; }

/* ==================== 响应式微调 ==================== */
@media (min-width: 430px) {
    :root { --status-bar-height: 52px; --bottom-bar-height: 60px; }
}
@media (max-height: 600px) {
    :root { --status-bar-height: 40px; --bottom-bar-height: 48px; }
}

/* ==================== 滚动条美化 ==================== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }
