﻿/* ============================================================
   摸鱼星球 · 全局样式
   设计规范：第四章 深色科技感 + 霓虹光点（雷达扫描视觉）
   ============================================================ */
:root {
  --bg-main: #10182E;
  --bg-card: #1A2440;
  --bg-input: #24304F;
  --bg-panel: #131B33;
  --accent: #00E5A0;
  --accent2: #00B4D8;
  --warn: #FF6B6B;
  --purple: #9D4EDD;
  --gold: #FFD60A;
  --text-main: #F8FAFC;
  --text-sub: #94A3B8;
  --text-aux: #64748B;
  --text-disable: #475569;
  --border: #1E293B;
  --border-hover: #2A3447;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg-main);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Inter", sans-serif;
  font-size: 14px;
}

.hidden { display: none !important; }

/* ============================================================
   顶部导航栏
   ============================================================ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 56px;
  display: flex; align-items: center;
  padding: 0 24px;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  gap: 24px;
}

.logo { display: flex; align-items: center; gap: 8px; }
.logo-icon { font-size: 22px; }
.logo-text { font-size: 18px; font-weight: 700; color: var(--accent); letter-spacing: 1px; }

.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.crumb { color: var(--text-aux); cursor: pointer; padding: 4px 8px; border-radius: 6px; transition: all .15s; }
.crumb:hover { color: var(--accent); background: var(--bg-input); }
.crumb.active { color: var(--text-main); font-weight: 600; }
.crumb-sep { color: var(--text-disable); }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; position: relative; }

.search-box { position: relative; }
.search-mobile-btn {
  display: none;
  width: 34px; height: 34px;
  background: var(--bg-input); border: 1px solid var(--border-hover);
  border-radius: 8px; color: var(--text-sub); font-size: 16px;
  cursor: pointer; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.search-mobile-btn:hover { border-color: var(--accent); color: var(--accent); }
.search-box input {
  width: 220px; height: 36px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text-main);
  padding: 0 14px; font-size: 13px; outline: none;
  transition: border .15s;
}
.search-box input:focus { border-color: var(--accent2); }
.search-box input::placeholder { color: var(--text-aux); }

.search-results {
  position: absolute; top: 42px; left: 0; right: 0; z-index: 1100;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; max-height: 300px; overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.search-item { padding: 10px 14px; cursor: pointer; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.search-item:hover { background: var(--bg-input); }
.search-item .s-icon { font-size: 16px; }
.search-item .s-sub { color: var(--text-aux); font-size: 12px; margin-left: auto; }

.lang-btn {
  height: 36px; padding: 0 14px;
  background: transparent; border: 1px solid var(--border-hover); border-radius: 8px;
  color: var(--text-sub); font-size: 13px; cursor: pointer; transition: all .15s;
}
.lang-btn:hover { border-color: var(--accent); color: var(--accent); }

.lang-menu {
  position: absolute; top: 48px; right: 130px; z-index: 1100;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 6px; width: 140px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.lang-option { padding: 9px 12px; border-radius: 8px; font-size: 13px; color: var(--text-sub); cursor: pointer; }
.lang-option:hover { background: var(--bg-input); color: var(--text-main); }
.lang-option.active { color: var(--accent); background: var(--bg-input); font-weight: 600; }

.avatar-btn { position: relative; cursor: pointer; }
.avatar-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-input);
  text-align: center; font-size: 20px; line-height: 1;
  box-sizing: border-box;
  transition: transform 0.15s;
}
.avatar-btn:hover .avatar-dot { transform: scale(1.1); }

.profile-panel {
  position: absolute; top: 52px; right: 0; z-index: 1100;
  width: 430px; max-height: calc(100vh - 80px); overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 14px; padding: 22px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.profile-level-icon {
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--bg-input); display: flex; align-items: center; justify-content: center;
  font-size: 34px; border: 2px solid var(--accent); flex-shrink: 0;
}
.profile-name { font-size: 21px; font-weight: 700; }
.profile-level-name { font-size: 15px; color: var(--accent); margin-top: 3px; }
.exp-bar { height: 9px; background: var(--bg-input); border-radius: 5px; overflow: hidden; }
.exp-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 5px; transition: width .4s; }
.exp-text { font-size: 13px; color: var(--text-aux); margin-top: 7px; }
.profile-stats { display: flex; gap: 10px; margin-top: 16px; }
.stat { flex: 1; background: var(--bg-input); border-radius: 10px; padding: 12px 8px; text-align: center; }
.stat-num { font-size: 18px; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 12px; color: var(--text-aux); margin-top: 3px; }

/* ============================================================
   地图主区域
   ============================================================ */
#map-container { position: absolute; top: 56px; bottom: 130px; left: 0; right: 0; z-index: 1; }
#map { width: 100%; height: 100%; background: radial-gradient(ellipse at 50% 40%, #0d1b3a 0%, #070d1f 70%); }

/* 3D 地球 tooltip */
.tip-name { font-size: 14px; font-weight: 600; color: #fff; }
.tip-online { font-size: 12px; color: #7dd3fc; margin-top: 2px; }

.map-hint {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 900; padding: 6px 16px; border-radius: 999px;
  background: rgba(17, 24, 39, 0.8); border: 1px solid var(--border);
  color: var(--text-aux); font-size: 12px; pointer-events: none;
}

/* 光点 tooltip */
.dot-tooltip {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-main) !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,.4) !important;
}
.dot-tooltip::before { display: none !important; }

/* 光点标记 */
.slack-dot {
  width: 10px; height: 10px; border-radius: 50%;
  position: relative;
  box-shadow: 0 0 10px 2px currentColor;
  animation: pulse 2s ease-in-out infinite;
  border: 1px solid rgba(255,255,255,.25);
}
@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.35); }
}
.dot-lv1 { background: #00E5A0; color: #00E5A0; }
.dot-lv2 { background: #00B4D8; color: #00B4D8; }
.dot-lv3 { background: #9D4EDD; color: #9D4EDD; }
.dot-lv4 { background: #FFD60A; color: #FFD60A; }

/* 聚合点 */
.cluster-dot {
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle, rgba(0,229,160,.35), rgba(0,229,160,.1));
  border: 2px solid var(--accent);
  color: #fff; font-weight: 700; font-size: 12px; border-radius: 50%;
  text-shadow: 0 0 6px rgba(0,0,0,.6);
}
.cluster-dot.large { border-color: var(--gold); background: radial-gradient(circle, rgba(255,214,10,.3), rgba(255,214,10,.08)); }

/* 雷达扫描 */
.scan-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none; z-index: 850; display: none;
}
.scan-cone {
  position: absolute; width: 140vmax; height: 140vmax; left: 50%; top: 50%;
  margin: -70vmax 0 0 -70vmax;
  background: conic-gradient(from 0deg, rgba(0,229,160,0.12), transparent 45deg);
  border-radius: 50%;
  animation: rotate 10s linear infinite;
  transform-origin: center;
}
@keyframes rotate { to { transform: rotate(360deg); } }

/* ============================================================
   聊天室面板
   ============================================================ */
.chat-panel {
  position: fixed; top: 56px; right: 0; bottom: 130px; z-index: 1050;
  width: 520px; background: var(--bg-panel);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 300ms ease-out;
}
.chat-panel.open { transform: translateX(0); }
.chat-panel.hidden { display: none; }

.chat-head {
  height: 56px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; border-bottom: 1px solid var(--border);
}
.chat-title { display: flex; align-items: center; gap: 8px; }
.chat-city-icon { font-size: 18px; }
.chat-city-name { font-size: 15px; font-weight: 600; }
.chat-online {
  background: var(--bg-input); border-radius: 4px; padding: 2px 8px;
  font-size: 12px; color: var(--accent);
}
.chat-close {
  width: 32px; height: 32px; border: none; background: transparent;
  color: var(--text-sub); font-size: 22px; cursor: pointer; border-radius: 8px;
}
.chat-close:hover { background: var(--bg-input); color: var(--text-main); }

.chat-search-btn {
  width: 32px; height: 32px; border: none; background: transparent;
  color: var(--text-sub); font-size: 16px; cursor: pointer; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.chat-search-btn:hover { background: var(--bg-input); color: var(--text-main); }

.chat-search-box {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.chat-search-box.hidden { display: none; }
.chat-search-box input {
  flex: 1; height: 32px; background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text-main); padding: 0 10px; font-size: 13px; outline: none;
}
.chat-search-box input:focus { border-color: var(--accent); }
.chat-search-count { font-size: 12px; color: var(--text-aux); white-space: nowrap; }
.chat-search-close {
  width: 24px; height: 24px; border: none; background: transparent;
  color: var(--text-sub); font-size: 16px; cursor: pointer; border-radius: 4px;
}
.chat-search-close:hover { color: var(--text-main); }

.chat-topic {
  padding: 10px 16px; font-size: 12px; color: var(--text-aux);
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.chat-messages {
  flex: 1; overflow-y: auto; padding: 12px 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }

.msg { animation: msgIn 200ms ease-out; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.msg-head { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.msg-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-input); font-size: 14px;
}
.msg-username { font-size: 12px; color: var(--text-sub); font-weight: 500; }
.msg-level {
  height: 14px; line-height: 14px; padding: 0 5px; border-radius: 3px;
  font-size: 10px; color: #0A0E1A; font-weight: 700;
}
.msg-time { font-size: 11px; color: var(--text-aux); margin-left: auto; }
.msg-content { font-size: 14px; line-height: 1.5; color: var(--text-main); word-break: break-word; }
.msg-reactions { display: flex; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.reaction-btn {
  background: var(--bg-input); border: 1px solid var(--border); border-radius: 999px;
  padding: 2px 8px; font-size: 11px; color: var(--text-sub); cursor: pointer;
  display: flex; align-items: center; gap: 3px; transition: all .15s;
}
.reaction-btn:hover { border-color: var(--accent); color: var(--accent); }
.reaction-btn.active { border-color: var(--accent); color: var(--accent); }

.msg.system { text-align: center; }
.msg.system .msg-content { font-size: 12px; color: var(--text-aux); }

/* 自己发的消息：靠右，绿色背景 */
.msg.own {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.msg.own .msg-head {
  flex-direction: row-reverse;
  justify-content: flex-start;
}
.msg.own .msg-head .msg-time { margin-left: 0; margin-right: auto; }
.msg.own .msg-content {
  background: rgba(0, 229, 160, 0.12);
  border: 1px solid rgba(0, 229, 160, 0.25);
  border-radius: 12px 12px 2px 12px;
  padding: 8px 12px;
  max-width: 85%;
  align-self: flex-end;
}
.msg.own .msg-username { color: #00e5a0; }

/* 别人发的消息：靠左，灰色背景 */
.msg.other .msg-content {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px 12px 12px 2px;
  padding: 8px 12px;
  max-width: 85%;
  display: inline-block;
}

/* 搜索结果高亮 */
.msg.search-hit .msg-content {
  background: rgba(255, 214, 10, 0.15) !important;
  border-color: rgba(255, 214, 10, 0.4) !important;
}
.msg.search-hidden { display: none !important; }

/* 快捷发言 */
.quick-bar {
  min-height: 40px; display: flex; align-items: center; gap: 8px;
  padding: 6px 16px; flex-wrap: wrap; border-top: 1px solid var(--border);
  max-height: 104px; overflow-y: auto;
}
.quick-bar::-webkit-scrollbar { display: none; }
.quick-btn {
  flex-shrink: 0; height: 28px; padding: 0 10px; border-radius: 14px;
  background: var(--bg-input); border: none; color: var(--text-sub);
  font-size: 11px; cursor: pointer; white-space: nowrap; transition: all .15s;
}
.quick-btn:hover { background: var(--border-hover); color: var(--text-main); }
.quick-btn.boss { border-left: 3px solid var(--warn); color: #ff9a9a; }

.chat-input-row { height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 16px; }
.chat-input-row input {
  flex: 1; height: 36px; background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text-main); padding: 0 12px; font-size: 13px; outline: none;
}
.chat-input-row input:focus { border-color: var(--accent2); }
.chat-input-row input::placeholder { color: var(--text-aux); }
.send-btn {
  width: 36px; height: 36px; border: none; border-radius: 8px;
  background: var(--accent); color: var(--bg-main); font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.send-btn:hover { box-shadow: 0 0 12px rgba(0,229,160,.4); }
.send-btn:disabled { background: var(--border-hover); color: var(--text-disable); }

/* ============================================================
   底部信息栏
   ============================================================ */
.bottom-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 960;
  height: 130px; background: rgba(10, 14, 26, 0.92); backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 24px; padding: 0 24px;
}

.global-count { flex: 1; }
.global-num {
  font-family: "JetBrains Mono", "SF Mono", Consolas, monospace;
  font-size: 48px; font-weight: 700; line-height: 1;
  color: var(--text-main);
  transition: transform .2s;
}
.global-num.bounce { animation: numBounce 200ms ease-out; }
@keyframes numBounce { 0% { transform: scale(1.2); } 100% { transform: scale(1); } }
.global-label { font-size: 12px; color: var(--text-sub); margin-top: 4px; }
.global-delta { font-size: 11px; color: var(--accent); margin-top: 2px; }

.rank-panel {
  width: 320px; height: 120px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
.rank-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.rank-head > span { font-size: 13px; font-weight: 600; }
.rank-tabs { display: flex; gap: 4px; }
.rank-tab {
  background: transparent; border: 1px solid var(--border); color: var(--text-aux);
  font-size: 11px; padding: 2px 8px; border-radius: 4px; cursor: pointer; transition: all .15s;
}
.rank-tab.active { background: var(--bg-input); color: var(--accent); border-color: var(--accent2); }
.rank-list { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; max-height: 76px; }
.rank-list::-webkit-scrollbar { width: 4px; }
.rank-list::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 2px; }
.rank-item { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 2px 0; }
.rank-num { width: 18px; text-align: center; font-size: 14px; font-weight: 700; }
.rank-num.gold { color: var(--gold); }
.rank-num.silver { color: #C0C0C0; }
.rank-num.bronze { color: #CD7F32; }
.rank-num.normal { color: var(--text-sub); }
.rank-name { width: 80px; color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-count { width: 48px; text-align: right; color: var(--text-sub); font-size: 11px; }
.rank-bar-bg { flex: 1; height: 4px; background: var(--bg-input); border-radius: 2px; overflow: hidden; }
.rank-bar { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 2px; transition: width .5s; }

.slack-zone { width: 180px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.slack-btn {
  width: 160px; height: 52px; border: none; border-radius: 26px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--bg-main); font-size: 16px; font-weight: 700; cursor: pointer;
  box-shadow: 0 0 20px rgba(0,229,160,.4);
  transition: all .15s;
}
.slack-btn:hover { box-shadow: 0 0 30px rgba(0,229,160,.6); transform: scale(1.02); }
.slack-btn:active { transform: scale(0.98); }
.slack-btn.slacking {
  background: var(--warn);
  box-shadow: 0 0 20px rgba(255,107,107,.4);
  animation: bossPulse 1s ease-in-out infinite;
}
@keyframes bossPulse { 0%,100% { box-shadow: 0 0 16px rgba(255,107,107,.4); } 50% { box-shadow: 0 0 30px rgba(255,107,107,.7); } }
.slack-timer { font-family: "JetBrains Mono", Consolas, monospace; font-size: 20px; font-weight: 700; color: var(--warn); }

/* 升级提示 */
.levelup-toast {
  position: fixed; top: 80px; left: 50%; transform: translateX(-50%);
  z-index: 1200; background: var(--bg-card); border: 2px solid var(--gold);
  border-radius: 12px; padding: 14px 28px; text-align: center;
  box-shadow: 0 0 40px rgba(255,214,10,.4);
  animation: toastIn .4s ease-out;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) scale(.8); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
.levelup-toast .t-title { font-size: 16px; font-weight: 700; color: var(--gold); }
.levelup-toast .t-sub { font-size: 12px; color: var(--text-sub); margin-top: 4px; }

/* 响应式 */
@media (max-width: 1100px) {
  .rank-panel { display: none; }
  .chat-panel { width: 100%; }
}
@media (max-width: 720px) {
  .search-box { display: none; }
  .bottom-bar { height: 150px; }
  #map-container { bottom: 150px; }
  .chat-panel { bottom: 0; top: 0; width: 100% !important; border-left: none; border-radius: 0; }
  .chat-slack-bar { display: flex !important; }
  .slack-zone { width: 140px; }
  .slack-btn { width: 130px; }
}

/* ============================================================
   v1.1 新增：水豚 logo / 徽章 / 商城 / 广告 / 金币 / 新光点
   ============================================================ */
.logo-icon { width: 32px; height: 32px; border-radius: 50%; box-shadow: 0 0 14px rgba(0,229,160,.35); }

/* 金币徽标 */
.coin-badge {
  display: flex; align-items: center; gap: 4px;
  height: 36px; padding: 0 12px;
  background: var(--bg-input); border: 1px solid var(--border-hover);
  border-radius: 18px; cursor: default;
  font-size: 13px; font-weight: 600; color: var(--gold);
}
.coin-icon { font-size: 15px; }

/* 商城按钮 */
.shop-btn {
  width: 38px; height: 36px; border: 1px solid var(--border-hover);
  background: var(--bg-input); border-radius: 8px; color: var(--text-sub);
  font-size: 17px; cursor: pointer; transition: all .15s;
}
.shop-btn:hover { border-color: var(--gold); color: var(--gold); }

/* 社交按钮 */
.social-btn {
  width: 38px; height: 36px; border: 1px solid var(--border-hover);
  background: var(--bg-input); border-radius: 8px; color: var(--text-sub);
  font-size: 17px; cursor: pointer; transition: all .15s;
  position: relative; display: flex; align-items: center; justify-content: center;
}
.social-btn:hover { border-color: var(--accent); color: var(--accent); }
.social-badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: #ff4757; color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
  line-height: 1;
}

/* 社交面板 */
.social-panel {
  position: absolute; top: 48px; right: 40px; z-index: 1100;
  width: 360px; max-height: 500px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4); display: flex; flex-direction: column;
  overflow: hidden;
}
.social-panel.hidden { display: none; }
.social-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  font-size: 14px; font-weight: 600;
}
.social-close {
  width: 24px; height: 24px; border: none; background: transparent;
  color: var(--text-sub); font-size: 18px; cursor: pointer; border-radius: 4px;
}
.social-close:hover { background: var(--bg-input); color: var(--text-main); }
.social-tabs { display: flex; gap: 4px; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.social-tab {
  flex: 1; height: 32px; border: none; border-radius: 6px;
  background: transparent; color: var(--text-sub); font-size: 13px;
  cursor: pointer; transition: all .15s;
}
.social-tab.active { background: var(--bg-input); color: var(--accent); font-weight: 600; }
.social-content { flex: 1; overflow-y: auto; padding: 8px; }
.social-content.hidden { display: none; }
.social-create {
  display: flex; gap: 8px; padding: 8px; margin-bottom: 8px;
  background: var(--bg-input); border-radius: 8px;
}
.social-create input {
  flex: 1; height: 32px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text-main); padding: 0 10px; font-size: 12px; outline: none;
}
.social-create input:focus { border-color: var(--accent); }
.social-create button {
  height: 32px; padding: 0 14px; border: none; border-radius: 6px;
  background: var(--accent); color: var(--bg-main); font-size: 12px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.social-list { display: flex; flex-direction: column; gap: 4px; }
.social-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: 8px; cursor: pointer; transition: background .15s;
}
.social-item:hover { background: var(--bg-input); }
.social-item-icon {
  width: 36px; height: 36px; border-radius: 50%; background: var(--bg-input);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  flex-shrink: 0;
}
.social-item-info { flex: 1; min-width: 0; }
.social-item-name { font-size: 13px; font-weight: 500; color: var(--text-main); }
.social-item-meta { font-size: 11px; color: var(--text-sub); margin-top: 2px; }
.social-item-action {
  height: 28px; padding: 0 10px; border: none; border-radius: 6px;
  background: var(--bg-input); color: var(--text-sub); font-size: 11px;
  cursor: pointer; flex-shrink: 0;
}
.social-item-action:hover { background: var(--accent); color: var(--bg-main); }
.social-item-action.accept { background: var(--accent); color: var(--bg-main); }
.social-item-action.reject { background: transparent; color: var(--text-sub); }

/* 好友邀请通知 */
.friend-invites { margin-bottom: 8px; }
.invite-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  background: rgba(255,71,87,0.08); border-radius: 8px; margin-bottom: 4px;
  border-left: 3px solid #ff4757;
}
.invite-item .social-item-name { color: #ff4757; }

/* 用户头像弹出菜单 */
.user-context-menu {
  position: fixed; z-index: 10000; background: var(--bg-panel);
  border: 1px solid var(--border); border-radius: 8px; padding: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3); min-width: 140px;
}
.user-context-menu button {
  display: block; width: 100%; text-align: left; padding: 8px 12px;
  border: none; background: transparent; color: var(--text-main);
  font-size: 13px; cursor: pointer; border-radius: 4px;
}
.user-context-menu button:hover { background: var(--bg-input); }
.user-context-menu button:disabled { color: var(--text-disable); cursor: not-allowed; }

/* 商城面板 */
.shop-panel {
  position: absolute; top: 48px; right: 0; z-index: 1100;
  width: 340px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4); overflow: hidden;
}
.shop-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  border-bottom: 1px solid var(--border); font-size: 14px; font-weight: 600;
}
.shop-coins { margin-left: auto; color: var(--gold); font-size: 13px; }
.shop-close {
  width: 28px; height: 28px; border: none; background: transparent;
  color: var(--text-sub); font-size: 20px; cursor: pointer; border-radius: 6px;
}
.shop-close:hover { background: var(--bg-input); color: var(--text-main); }
.shop-list { max-height: 380px; overflow-y: auto; padding: 8px; }
.shop-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 10px; transition: background .15s;
}
.shop-item:hover { background: var(--bg-input); }
.shop-item-icon { font-size: 24px; width: 36px; text-align: center; }
.shop-item-info { flex: 1; min-width: 0; }
.shop-item-name { font-size: 13px; font-weight: 600; }
.shop-item-desc { font-size: 11px; color: var(--text-aux); margin-top: 2px; }
.shop-buy-btn {
  flex-shrink: 0; height: 30px; padding: 0 12px; border: none; border-radius: 8px;
  background: linear-gradient(135deg, var(--gold), #f6c453); color: #1a1205;
  font-size: 12px; font-weight: 700; cursor: pointer; transition: all .15s;
}
.shop-buy-btn:hover { transform: scale(1.04); }
.shop-buy-btn.owned { background: var(--bg-input); color: var(--accent); border: 1px solid var(--accent2); }
.shop-buy-btn.active { background: var(--bg-input); color: var(--text-disable); border: 1px solid var(--border); }

/* 商城提示 */
.shop-hint { padding: 8px 14px 0; font-size: 11px; color: var(--text-aux); }

/* 打卡区 */
.checkin-section { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.checkin-title { font-size: 12px; color: var(--text-sub); font-weight: 600; margin-bottom: 8px; }
.checkin-streak { font-size: 14px; font-weight: 700; color: #FF6B6B; margin-bottom: 8px; }
.checkin-row { display: flex; gap: 8px; }
.checkin-btn {
  flex: 1; height: 34px; border: none; border-radius: 8px;
  background: linear-gradient(135deg, var(--gold), #f6c453); color: #1a1205;
  font-size: 13px; font-weight: 700; cursor: pointer; transition: all .15s;
}
.checkin-btn:hover { transform: scale(1.03); }
.checkin-btn.done { background: var(--bg-input); color: var(--text-disable); border: 1px solid var(--border); }
.checkin-btn.makeup { background: var(--bg-input); color: var(--accent); border: 1px solid var(--accent2); }
.checkin-btn.makeup.disabled { opacity: .4; cursor: not-allowed; }
.checkin-hint { font-size: 10px; color: var(--text-aux); margin-top: 8px; line-height: 1.4; }

/* 头像区 */
.avatar-section { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.avatar-title { font-size: 12px; color: var(--text-sub); font-weight: 600; margin-bottom: 8px; }
.avatar-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 12px; }
.avatar-cell {
  text-align: center; padding: 4px 0; border-radius: 8px; cursor: pointer;
  border: 1px solid transparent; transition: all .15s;
}
.avatar-cell:hover { background: var(--bg-input); }
.avatar-cell.current { border-color: var(--accent); background: rgba(0,229,160,.08); }
.avatar-cell.locked { opacity: .55; }
.avatar-cell-icon {
  width: 34px; height: 34px; line-height: 32px; margin: 0 auto; border-radius: 50%;
  background: var(--bg-input); font-size: 20px; text-align: center;
}
.avatar-cell-name { font-size: 9px; color: var(--text-aux); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.frame-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.frame-cell {
  text-align: center; padding: 4px 0; border-radius: 8px; cursor: pointer;
  border: 1px solid transparent; transition: all .15s;
}
.frame-cell:hover { background: var(--bg-input); }
.frame-cell.current { border-color: var(--accent); background: rgba(0,229,160,.08); }
.frame-cell.locked { opacity: .55; }
.frame-cell-icon {
  width: 32px; height: 32px; line-height: 30px; margin: 0 auto; border-radius: 50%;
  background: var(--bg-input); font-size: 16px; text-align: center;
}
.frame-cell-name { font-size: 9px; color: var(--text-aux); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 头像框动画 */
@keyframes framePulse { 0%,100% { transform: scale(1); filter: brightness(1); } 50% { transform: scale(1.06); filter: brightness(1.4); } }
@keyframes badgeGlow { 0%,100% { filter: drop-shadow(0 0 2px rgba(0,229,160,.3)); } 50% { filter: drop-shadow(0 0 8px rgba(0,229,160,.8)); } }

/* 广告 */
.ad-label {
  display: inline-block; background: var(--text-disable); color: var(--bg-main);
  font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 3px; letter-spacing: .5px;
}
.banner-ad {
  width: 468px; height: 60px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0; position: relative;
  box-sizing: border-box;
}
.banner-ad iframe { width: 468px; height: 60px; border: none; }
.banner-ad .ad-label { position: absolute; top: 6px; right: 6px; }
.banner-ad-body { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.banner-ad .ad-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.banner-ad .ad-cta { flex-shrink: 0; white-space: nowrap; }
.banner-ad .ad-icon { font-size: 26px; }
.banner-ad .ad-text { font-size: 12px; color: var(--text-sub); line-height: 1.4; }
.banner-ad .ad-text b { color: var(--text-main); }
.iframe-ad {
  width: 728px; height: 90px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.iframe-ad iframe { width: 728px; height: 90px; border: none; }

/* 注册登录弹窗 */
.auth-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
}
.auth-overlay.hidden { display: none; }
.auth-panel {
  width: 380px; background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: 16px; padding: 32px; box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.auth-title {
  font-size: 24px; font-weight: 700; color: var(--text-main);
  text-align: center; margin-bottom: 8px;
}
.auth-subtitle {
  font-size: 13px; color: var(--text-sub); text-align: center; margin-bottom: 24px;
}
.auth-tabs {
  display: flex; gap: 8px; margin-bottom: 20px;
}
.auth-tab {
  flex: 1; height: 40px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg-input); color: var(--text-sub); font-size: 14px;
  cursor: pointer; transition: all .15s;
}
.auth-tab.active {
  background: var(--accent); color: var(--bg-main); border-color: var(--accent);
  font-weight: 600;
}
.auth-field {
  margin-bottom: 16px;
}
.auth-field label {
  display: block; font-size: 12px; color: var(--text-sub); margin-bottom: 6px;
}
.auth-field input {
  width: 100%; height: 44px; background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text-main); padding: 0 14px; font-size: 14px;
  outline: none; box-sizing: border-box;
}
.auth-field input:focus { border-color: var(--accent); }
.auth-submit {
  width: 100%; height: 44px; border: none; border-radius: 8px;
  background: var(--accent); color: var(--bg-main); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all .15s; margin-top: 8px;
}
.auth-submit:hover { box-shadow: 0 0 16px rgba(0,229,160,0.4); }
.auth-error {
  font-size: 12px; color: #ff6b6b; margin-top: 12px; text-align: center; min-height: 16px;
}
.ad-cta {
  height: 24px; padding: 0 10px; border: none; border-radius: 6px;
  background: var(--accent); color: var(--bg-main); font-size: 11px; font-weight: 700; cursor: pointer;
}
.banner-ad-close {
  position: absolute; top: 4px; left: 4px; width: 18px; height: 18px;
  border: none; background: transparent; color: var(--text-disable); font-size: 14px; cursor: pointer;
}
.banner-ad-close:hover { color: var(--text-sub); }

/* 聊天室原生广告 */
.native-ad {
  margin: 0 16px 8px; padding: 8px 10px; background: var(--bg-card);
  border: 1px dashed var(--border-hover); border-radius: 10px;
  display: flex; align-items: center; gap: 8px; position: relative;
}
.native-ad .ad-label { position: absolute; top: 4px; right: 6px; }
.native-ad-body { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-sub); }
.native-ad-body b { color: var(--text-main); }
.ad-cta-sm {
  height: 22px; padding: 0 8px; border: none; border-radius: 5px;
  background: var(--accent2); color: var(--bg-main); font-size: 11px; cursor: pointer;
}
.native-ad-close {
  position: absolute; top: 2px; left: 4px; width: 16px; height: 16px;
  border: none; background: transparent; color: var(--text-disable); font-size: 13px; cursor: pointer;
}

/* 新光点 / tooltip */
.city-marker-wrap { background: transparent; border: none; }
.slack-dot { border: 1px solid rgba(255,255,255,.3); }
.dot-tooltip {
  background: var(--bg-card) !important; border: 1px solid var(--border-hover) !important;
  color: var(--text-main) !important; border-radius: 8px !important; font-size: 12px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,.4) !important; padding: 6px 10px !important;
}
.dot-tooltip::before { display: none !important; }
.tip-name { font-weight: 700; font-size: 13px; }
.tip-online { color: var(--accent); font-size: 11px; margin-top: 2px; }

/* 气泡特效消息 */
.msg.bubble-msg .msg-content {
  display: inline-block; background: var(--bg-input);
  padding: 4px 10px; border-radius: 12px; animation: bubbleIn .4s ease-out;
}
@keyframes bubbleIn { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* 响应式补充 */
@media (max-width: 1100px) {
  .banner-ad { display: none; }
  .shop-panel { width: 90vw; right: 0; }
}

/* ============================================================
   打卡：进度条 + 日历 + 日期显示
   ============================================================ */
.checkin-section { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.checkin-title { font-size: 16px; font-weight: 700; margin-bottom: 10px; color: var(--text-main); }
.checkin-streak { font-size: 15px; font-weight: 600; color: var(--gold); margin-bottom: 10px; }
.checkin-progress { margin-bottom: 10px; }
.checkin-progress-label { font-size: 13px; color: var(--text-sub); margin-bottom: 6px; }
.checkin-progress-bar { height: 10px; background: var(--bg-input); border-radius: 5px; overflow: hidden; }
.checkin-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); border-radius: 5px; transition: width .4s; }
.checkin-row { display: flex; gap: 10px; margin-bottom: 8px; }
.checkin-btn {
  flex: 1; height: 40px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--bg-main); font-size: 15px; font-weight: 700; cursor: pointer;
  transition: all .2s;
}
.checkin-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,229,160,.35); }
.checkin-btn.done { background: var(--bg-input); color: var(--accent); border: 1px solid var(--accent); cursor: default; }
.checkin-btn.makeup { background: var(--bg-input); color: var(--gold); border: 1px solid var(--gold); }
.checkin-btn.makeup.disabled { opacity: .45; cursor: not-allowed; }
.checkin-hint { font-size: 13px; color: var(--text-aux); margin-bottom: 10px; }
.checkin-calendar { margin-top: 6px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-cell {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  background: var(--bg-input); border-radius: 6px;
  font-size: 12px; color: var(--text-sub); border: 1px solid transparent;
}
.cal-cell.done { background: rgba(0,229,160,.18); color: var(--accent); border-color: var(--accent); font-weight: 700; }
.cal-cell.today { border-color: var(--gold); color: var(--gold); font-weight: 700; }

/* ============================================================
   3D 地球补充
   ============================================================ */
#map canvas { display: block; }
.globe-legend {
  position: absolute; bottom: 12px; left: 16px; z-index: 900;
  display: flex; gap: 12px; padding: 6px 12px; border-radius: 8px;
  background: rgba(17,24,39,.7); border: 1px solid var(--border); font-size: 12px;
}
.globe-legend span { display: flex; align-items: center; gap: 4px; color: var(--text-sub); }
.globe-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ============================================================
   头像 / 头像框网格（放大）
   ============================================================ */
.avatar-section { margin-top: 18px; }
.avatar-title { font-size: 15px; font-weight: 700; margin-bottom: 10px; color: var(--text-main); }
.avatar-grid, .frame-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.avatar-cell, .frame-cell {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 6px; border-radius: 10px; cursor: pointer;
  background: var(--bg-input); border: 2px solid transparent; transition: all .15s;
}
.avatar-cell:hover, .frame-cell:hover { transform: translateY(-2px); border-color: var(--border-hover); }
.avatar-cell.current, .frame-cell.current { border-color: var(--accent); }
.avatar-cell.locked, .frame-cell.locked { opacity: .55; }
.avatar-cell-icon, .frame-cell-icon { font-size: 28px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.avatar-cell-name, .frame-cell-name { font-size: 12px; color: var(--text-sub); }

/* ============================================================
   商城面板（改名商城 + 放大）
   ============================================================ */
.shop-panel {
  position: absolute; top: 52px; right: 0; z-index: 1100;
  width: 380px; max-height: calc(100vh - 80px); overflow-y: auto;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.shop-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 17px; font-weight: 700; }
.shop-coins { font-size: 15px; color: var(--gold); }
.shop-close { background: none; border: none; color: var(--text-sub); font-size: 24px; cursor: pointer; }
.shop-hint { font-size: 13px; color: var(--text-aux); margin-bottom: 14px; }
.shop-list { display: flex; flex-direction: column; gap: 12px; }
.shop-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-input); border-radius: 10px; padding: 12px;
}
.shop-item-icon { font-size: 30px; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; background: var(--bg-panel); border-radius: 10px; }
.shop-item-info { flex: 1; }
.shop-item-name { font-size: 15px; font-weight: 600; }
.shop-item-desc { font-size: 12px; color: var(--text-aux); margin-top: 2px; }
.shop-buy-btn {
  height: 34px; padding: 0 14px; border: none; border-radius: 8px; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--bg-main); font-size: 13px; font-weight: 700;
}
.shop-buy-btn.owned { background: var(--bg-panel); color: var(--accent); border: 1px solid var(--accent); }
.shop-buy-btn.active { background: var(--bg-panel); color: var(--gold); border: 1px solid var(--gold); }


/* ============================================================
 * 手机端适配（<= 768px）
 * ============================================================ */
@media (max-width: 768px) {
  /* 顶部栏：超紧凑布局（手机端） */
  .topbar {
    padding: 5px 8px;
    gap: 4px;
    flex-wrap: nowrap;
    align-items: center;
  }
  .logo { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
  .logo-text { display: none; }  /* 手机端隐藏logo文字，只留水豚图标 */
  .logo-icon { font-size: 16px; width: 24px; height: 24px; }
  .breadcrumb { display: none; }  /* 手机端隐藏面包屑，节省空间 */
  .topbar-right { display: flex; align-items: center; gap: 2px; margin-left: auto; }
  /* 语言按钮：手机端只显示🌐图标，隐藏文字 */
  .lang-btn #lang-btn-text { font-size: 0; }
  .lang-btn #lang-btn-text::before { content: '🌐'; font-size: 14px; }
  .lang-btn { padding: 4px 6px; min-width: 28px; justify-content: center; }
  /* 移动端：搜索按钮显示，搜索框默认隐藏，点击展开浮层 */
  .search-mobile-btn { display: flex; }
  .search-box {
    display: none;
    position: absolute; top: 44px; right: 0; z-index: 1200;
    width: calc(100vw - 24px); max-width: 320px;
  }
  .search-box.mobile-open { display: block; }
  .search-box input { width: 100%; height: 40px; font-size: 14px; }
  .search-results { top: 46px; max-height: 280px; }
  .coin-badge { font-size: 12px; padding: 3px 8px; gap: 3px; }
  .coin-num { font-size: 12px; }
  .lang-btn { font-size: 11px; padding: 4px 6px; }
  .avatar-btn { width: 30px; height: 30px; }
  .avatar-dot { font-size: 10px; }
  .shop-btn { width: 30px; height: 30px; font-size: 14px; padding: 0; }

  /* 地球容器：全屏 */
  #map-container {
    top: 56px;
    bottom: 130px;
    height: auto;
    min-height: 0;
  }
  .map-hint { font-size: 11px; padding: 4px 10px; top: 8px; }

  /* 底部信息栏：紧凑 */
  .bottom-bar {
    padding: 8px 12px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .global-count .num { font-size: 22px; }
  .global-count .label { font-size: 11px; }
  .ad-banner { display: none; }
  .rank-panel { flex: 1 1 100%; order: 5; max-height: 120px; }
  .rank-item { font-size: 11px; padding: 3px 0; }
  .slack-btn {
    font-size: 14px;
    padding: 10px 20px;
    min-width: 100px;
  }

  /* 聊天室面板：从 topbar 下方开始，全宽 */
  .chat-panel {
    right: 0 !important;
    top: 48px !important;
    bottom: 0;
    width: 100% !important;
    max-width: 100%;
    height: calc(100vh - 48px);
    height: calc(100dvh - 48px);
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    border-radius: 0;
    transform: none;
    transition: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1050 !important;
  }
  .chat-panel.open {
    transform: translateY(0);
  }
  .chat-head { padding: 10px 14px; height: auto; flex-shrink: 0; }
  .chat-city-name { font-size: 16px; }
  /* 返回按钮：只显示 ←，大一点 */
  .chat-close {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    font-size: 0 !important;
    background: rgba(36, 48, 79, 0.9) !important;
    border: 1px solid rgba(42, 52, 71, 0.8) !important;
    border-radius: 8px !important;
    color: #F8FAFC !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .chat-close::before { content: '\2190'; font-size: 22px !important; line-height: 1; }
  .chat-topic { padding: 8px 14px; flex-shrink: 0; }
  .chat-messages { padding: 10px 14px; flex: 1; min-height: 0; }
  .msg { font-size: 13px; padding: 6px 0; }
  .msg-username { font-size: 12px; }
  .msg-time { font-size: 10px; }
  .quick-bar { min-height: 38px; padding: 4px 10px; gap: 6px; flex-shrink: 0; }
  .quick-btn { font-size: 11px; padding: 0 10px; height: 26px; }
  .chat-input-row { height: 52px; padding: 0 10px; gap: 8px; flex-shrink: 0; }
  .chat-input-row input { font-size: 14px; height: 36px; }
  .send-btn { width: 38px; height: 38px; font-size: 16px; flex-shrink: 0; }

  /* 个人面板：全宽，底部弹出 */
  .profile-panel {
    right: 0 !important;
    top: auto !important;
    bottom: 150px;
    width: 100% !important;
    max-width: 100%;
    height: calc(100vh - 56px - 150px);
    max-height: calc(100vh - 56px - 150px);
    border-radius: 16px 16px 0 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .profile-header { padding: 16px; }
  .profile-avatar { width: 56px; height: 56px; font-size: 28px; }
  .profile-name { font-size: 18px; }
  .profile-level { font-size: 13px; }
  .profile-stats { gap: 8px; padding: 10px 16px; }
  .stat-box { padding: 8px; }
  .stat-num { font-size: 16px; }
  .stat-label { font-size: 10px; }
  .profile-section { padding: 12px 16px; }
  .section-title { font-size: 14px; margin-bottom: 8px; }

  /* 商城面板：全宽，底部弹出 */
  .shop-panel {
    right: 0 !important;
    top: auto !important;
    bottom: 0;
    width: 100% !important;
    max-width: 100%;
    height: 70vh;
    max-height: 70vh;
    border-radius: 16px 16px 0 0;
    overflow-y: auto;
  }
  .shop-item { padding: 10px 14px; gap: 10px; }
  .shop-item-icon { font-size: 24px; width: 40px; height: 40px; }
  .shop-item-name { font-size: 14px; }
  .shop-item-desc { font-size: 11px; }
  .shop-buy-btn { font-size: 12px; padding: 6px 12px; }

  /* 头像/头像框格子：变小但可点 */
  .avatar-grid, .frame-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px;
  }
  .avatar-cell, .frame-cell {
    padding: 6px 4px;
  }
  .avatar-cell-icon, .frame-cell-icon {
    width: 36px;
    height: 36px;
    font-size: 20px;
    line-height: 36px;
  }
  .avatar-cell-name, .frame-cell-name {
    font-size: 10px;
    margin-top: 4px;
  }

  /* 打卡日历：格子变小 */
  .cal-grid {
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
  }
  .cal-cell {
    width: 100%;
    aspect-ratio: 1;
    font-size: 11px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .checkin-progress-bar { height: 8px; }
  .checkin-progress-label { font-size: 12px; }
  .checkin-hint { font-size: 11px; }

  /* 面包屑：字号 */
  .breadcrumb { font-size: 12px; padding: 6px 12px; }

  /* 关闭按钮：加大触摸区域 */
  .close-btn {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }

  /* Toast：底部显示 */
  .toast {
    bottom: 20px;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    max-width: 90vw;
  }

  /* 手机端：国家 label 分级（默认只显示主要国家，放大看全部国家） */
  .zoom-far .country-label.minor { display: none !important; }
  .zoom-mid .country-label.minor, .zoom-near .country-label.minor { display: block; }
  .zoom-far .city-label { display: none !important; }
  .country-label { font-size: 10px !important; }
  .city-label { font-size: 9px !important; }
  /* 手机端隐藏底部横幅广告（释放空间，避免遮挡地球） */
  .banner-ad, .iframe-ad { display: none !important; }
}

/* 超小屏（<= 480px）进一步压缩 */
@media (max-width: 480px) {
  .logo-text { display: none; }
  .breadcrumb { display: none; }
  .coin-badge { padding: 3px 6px; }
  .lang-btn { font-size: 10px; padding: 3px 4px; }
  .global-count .num { font-size: 18px; }
  .rank-panel { display: none; }
  .avatar-grid, .frame-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .chat-panel { height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh; }
  .profile-panel { height: calc(100vh - 56px - 150px); max-height: calc(100vh - 56px - 150px); }
}


/* ============================================================
 * 3D 地球 HTML 标签（国家名 + 城市标记）
 * ============================================================ */
.globe-label {
  pointer-events: auto;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* 国家名称 */
.country-label {
  font-size: 13px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
  text-shadow:
    0 0 6px rgba(0, 0, 0, 1),
    0 0 3px rgba(0, 0, 0, 1),
    0 1px 2px rgba(0, 0, 0, 0.9);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  pointer-events: none;
}

/* 城市标记（可点击） */
.city-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  text-shadow:
    0 0 4px rgba(0, 0, 0, 1),
    0 1px 2px rgba(0, 0, 0, 0.9);
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(10, 14, 26, 0.55);
  border: 1px solid rgba(140, 200, 255, 0.25);
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(2px);
}
.city-label:hover {
  background: rgba(0, 200, 150, 0.5);
  border-color: rgba(0, 255, 180, 0.7);
  box-shadow: 0 0 12px rgba(0, 200, 150, 0.5);
  transform: scale(1.1);
  z-index: 10;
}
.city-label .city-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00ffb3;
  box-shadow: 0 0 6px rgba(0, 255, 179, 0.9), 0 0 2px rgba(255, 255, 255, 0.8);
  flex-shrink: 0;
}
.city-label:hover .city-dot {
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 1);
}
.city-label .city-name {
  line-height: 1;
}

/* 手机端：地球标签缩小 */
@media (max-width: 768px) {
  .country-label { font-size: 10px; letter-spacing: 0.5px; }
  .city-label { font-size: 9px; padding: 1px 5px; gap: 3px; }
  .city-label .city-dot { width: 4px; height: 4px; }
}

/* 非主要城市：只显示圆点 */
.city-dot-only {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s ease;
}
.city-dot-only:hover {
  background: rgba(0, 200, 150, 0.4);
  box-shadow: 0 0 10px rgba(0, 200, 150, 0.6);
}
.city-dot-only .city-dot {
  width: 7px;
  height: 7px;
}


/* ============================================================
 * 地球缩放级别标签显示（缩小看国家，放大看城市）
 * ============================================================ */
/* 远视角（缩小）：只显示国家名，大字号 */
.zoom-far .city-label,
.zoom-far .city-dot-only { display: none !important; }
.zoom-far .country-label { font-size: 14px; opacity: 1; }

/* 中视角：显示国家名 + 主要城市名，隐藏非主要城市圆点 */
.zoom-mid .city-dot-only { display: none !important; }
.zoom-mid .country-label { font-size: 12px; opacity: 0.9; }
.zoom-mid .city-label { font-size: 10px; }

/* 近视角（放大）：显示全部，国家名变小变淡 */
.zoom-near .country-label { font-size: 10px; opacity: 0.6; }
.zoom-near .city-label { font-size: 11px; }
.zoom-near .city-dot-only { display: flex; }


/* ============================================================
 * 聊天增强：回复、撤回、表情包、textarea
 * ============================================================ */
/* 输入区域容器 */
.chat-input-area {
  position: relative;
  flex-shrink: 0;
}

/* 回复提示 */
.reply-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(0, 229, 160, 0.1);
  border-left: 3px solid #00E5A0;
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 12px;
}
.reply-hint .reply-label {
  color: #00E5A0;
  font-weight: 600;
  flex-shrink: 0;
}
.reply-hint .reply-content {
  flex: 1;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reply-hint .reply-cancel {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
  padding: 0 4px;
  flex-shrink: 0;
}

/* textarea 输入框 */
.chat-input-row textarea {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 10px 16px;
  color: var(--text-primary);
  font-size: 14px;
  resize: none;
  max-height: 120px;
  min-height: 40px;
  line-height: 1.4;
  outline: none;
  font-family: inherit;
}
.chat-input-row textarea:focus {
  border-color: #00E5A0;
}

/* 表情包按钮 */
.emoji-btn {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s;
}
.emoji-btn:hover { transform: scale(1.1); }
.image-btn {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s;
}
.image-btn:hover { transform: scale(1.1); }
.image-btn { position: relative; z-index: 10; }
#image-input { position: absolute; width: 0; height: 0; opacity: 0; }

/* 表情包面板 */
.emoji-panel {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 8px;
  max-height: 180px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}
.emoji-item {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background 0.15s;
}
.emoji-item:hover { background: var(--bg-input); }

/* 消息回复引用 */
.msg-reply {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  margin-bottom: 4px;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  font-size: 12px;
  max-width: 80%;
}
.msg-reply .reply-line {
  width: 2px;
  height: 16px;
  background: #00E5A0;
  border-radius: 1px;
  flex-shrink: 0;
}
.msg-reply .reply-user {
  color: #00E5A0;
  font-weight: 600;
  flex-shrink: 0;
}
.msg-reply .reply-text {
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 消息操作按钮 */
.msg-actions {
  display: none;
  gap: 4px;
  margin-left: auto;
}
.msg:hover .msg-actions { display: flex; }
.msg-action-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.msg-action-btn:hover { opacity: 1; background: var(--bg-input); }

/* 撤回消息 */
.msg-content.deleted {
  color: var(--text-secondary);
  font-style: italic;
  opacity: 0.5;
}

/* ============================================================
 * 群组功能
 * ============================================================ */
.group-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 16px;
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}
.group-btn:hover {
  border-color: #00E5A0;
  color: #00E5A0;
}

.group-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 380px;
  max-width: 92vw;
  max-height: 70vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 15px;
}
.group-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
}
.group-create {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}
.group-create input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}
.group-create input:focus { border-color: #00E5A0; }
.create-group-btn {
  background: #00E5A0;
  color: #0a0f1a;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.create-group-btn:hover { opacity: 0.9; }

.group-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}
.group-empty {
  text-align: center;
  color: var(--text-secondary);
  padding: 30px 20px;
  font-size: 13px;
}
.group-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.group-item:hover { background: var(--bg-input); }
.group-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.group-info { flex: 1; min-width: 0; }
.group-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.group-meta {
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 手机端群组面板 */
@media (max-width: 768px) {
  .group-panel {
    bottom: 70px;
    width: 95vw;
    max-height: 70vh;
  }
  .group-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
}


/* ============================================================
 * 地球地图风格标签（国家名/城市名自然显示）
 * ============================================================ */
.globe-label.map-style {
  pointer-events: auto;
  user-select: none;
  white-space: nowrap;
}

/* 国家名：地图风格，小字号淡白色，轻微描边，无背景，不突兀 */
.country-label.map-style {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  text-shadow: 0 0 3px rgba(0,0,0,0.8), 0 1px 2px rgba(0,0,0,0.6);
  letter-spacing: 0.3px;
  padding: 1px 4px;
  border-radius: 3px;
  transition: color 0.2s, text-shadow 0.2s;
}
.country-label.map-style:hover {
  color: rgba(0, 229, 160, 0.95);
  text-shadow: 0 0 6px rgba(0,229,160,0.5);
}

/* 城市标签：小圆点 + 名字，地图风格 */
.city-label.map-style {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.6);
  text-shadow: 0 0 2px rgba(0,0,0,0.9);
}
.city-label.map-style .city-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 3px rgba(255,255,255,0.5);
  flex-shrink: 0;
}
.city-label.map-style .city-name {
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 仅圆点的城市 */
.city-dot-only.map-style .city-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 3px rgba(255,255,255,0.4);
  display: block;
}

/* 缩放级别：地图风格标签 */
.zoom-far .city-label.map-style,
.zoom-far .city-dot-only.map-style { display: none !important; }
.zoom-far .country-label.map-style { font-size: 12px; color: rgba(255,255,255,0.8); }

.zoom-mid .city-dot-only.map-style { display: none !important; }
.zoom-mid .country-label.map-style { font-size: 10px; color: rgba(255,255,255,0.65); }
.zoom-mid .city-label.map-style { font-size: 9px; }

.zoom-near .country-label.map-style { font-size: 9px; color: rgba(255,255,255,0.45); }
.zoom-near .city-label.map-style { font-size: 10px; color: rgba(255,255,255,0.7); }
.zoom-near .city-dot-only.map-style { display: block; }


/* ============================================================
 * 国家城市频道选择面板
 * ============================================================ */
.country-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 380px;
  max-width: 92vw;
  max-height: 70vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.country-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.country-panel-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.country-panel-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
}
.country-panel-desc {
  padding: 10px 20px;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
.city-channel-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}
.city-channel-item.city-locked {
  opacity: 0.85;
  background: linear-gradient(90deg, rgba(255, 200, 60, 0.06), transparent);
  border: 1px dashed rgba(255, 200, 60, 0.35);
}
.city-channel-item.city-locked .city-channel-name {
  color: var(--acc);
}
.city-channel-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.city-channel-item:hover {
  background: var(--bg-input);
}
.city-channel-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.city-channel-info {
  flex: 1;
  min-width: 0;
}
.city-channel-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.city-channel-meta {
  font-size: 12px;
  color: var(--text-secondary);
}
.city-channel-arrow {
  font-size: 22px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .country-panel {
    width: 95vw;
    max-height: 80vh;
  }
}

/* ============================================================
 * 合规：用户协议 / 隐私政策 / 举报 / 注册勾选
 * ============================================================ */
.auth-terms {
  margin: 14px 0 4px;
  font-size: 12px; color: var(--text-sub);
}
.terms-check {
  display: flex; align-items: flex-start; gap: 8px;
  cursor: pointer; line-height: 1.5;
}
.terms-check input { margin-top: 2px; accent-color: var(--accent); }
.terms-links {
  display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap;
}
.terms-links a {
  color: var(--accent); text-decoration: none; cursor: pointer;
}
.terms-links a:hover { text-decoration: underline; }

.terms-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 10001;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.terms-overlay.hidden { display: none; }
.terms-panel {
  width: 640px; max-width: 94vw; max-height: 82vh;
  background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: 14px; display: flex; flex-direction: column;
  overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.terms-head {
  height: 48px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; border-bottom: 1px solid var(--border);
  font-size: 15px; font-weight: 700; color: var(--text-main);
}
.terms-close {
  width: 32px; height: 32px; border: none; background: transparent;
  color: var(--text-sub); font-size: 22px; cursor: pointer; border-radius: 8px;
}
.terms-close:hover { background: var(--bg-input); color: var(--text-main); }
.terms-body {
  flex: 1; overflow-y: auto; padding: 14px 20px;
  font-size: 13px; color: var(--text-secondary);
}
.terms-body::-webkit-scrollbar { width: 6px; }
.terms-body::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }
.terms-foot {
  padding: 12px 18px; border-top: 1px solid var(--border); text-align: right;
}
.terms-btn {
  height: 34px; padding: 0 20px; border: none; border-radius: 8px;
  background: var(--accent); color: var(--bg-main); font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.terms-footer {
  position: fixed; left: 0; right: 0; bottom: 134px; z-index: 975;
  display: flex; gap: 8px; align-items: center; justify-content: center;
  font-size: 10px; color: var(--text-aux);
  background: rgba(10, 14, 26, 0.94);
  padding: 3px 10px;
  white-space: nowrap;
  overflow: hidden;
}
.terms-footer a {
  color: var(--text-aux); text-decoration: none; cursor: pointer;
}
.terms-footer a:hover { color: var(--accent); }

/* 举报按钮 */
.msg-report {
  background: none; border: none; color: var(--text-aux);
  font-size: 12px; cursor: pointer; padding: 0 4px; opacity: 0;
  transition: opacity .15s;
}
.msg:hover .msg-report { opacity: 1; }
.msg-report:hover { color: #ff6b6b; }

/* 图片预览（先选择后发送） */
.img-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  margin: 4px 10px 0;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}
.img-preview.hidden { display: none; }
.img-preview img {
  max-width: 120px;
  max-height: 80px;
  border-radius: 6px;
  object-fit: cover;
}
.img-preview-remove {
  background: rgba(255, 80, 80, 0.25);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.chat-empty {
  text-align: center; color: #8892a4; padding: 60px 20px; font-size: 14px;
}

.chat-slack-bar { display: none; }

/* 手机端聊天室底部遮罩：键盘弹出瞬间盖住缝隙，避免露出地球 */
.chat-bottom-shield {
  display: none;
}
@media (max-width: 768px) {
  .chat-bottom-shield {
    position: fixed; left: 0; right: 0; top: 0; bottom: 0;
    background: var(--bg-panel);
    z-index: 1049;
    pointer-events: none;
  }
  .chat-bottom-shield.show { display: block; }
}

/* ===== 神秘聊天室解锁弹窗（可爱水豚风格） ===== */
.unlock-overlay {
  position: fixed; inset: 0; z-index: 2600;
  background: rgba(6,10,20,.72);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.unlock-overlay.hidden { display: none; }
.unlock-modal {
  width: 320px; max-width: 92vw;
  background: linear-gradient(165deg, #1c2a4a 0%, #14203a 55%, #101a30 100%);
  border: 1px solid rgba(0,229,160,.35);
  border-radius: 24px;
  padding: 28px 24px 22px;
  text-align: center;
  box-shadow: 0 0 0 4px rgba(0,229,160,.08), 0 18px 50px rgba(0,0,0,.55);
  animation: unlock-pop .28s cubic-bezier(.34,1.56,.64,1);
}
@keyframes unlock-pop {
  from { transform: scale(.82) translateY(14px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.unlock-capy {
  font-size: 64px; line-height: 1;
  margin-bottom: 6px;
  filter: drop-shadow(0 6px 14px rgba(0,229,160,.35));
  animation: capy-bob 2.4s ease-in-out infinite;
}
@keyframes capy-bob {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.unlock-title {
  font-size: 22px; font-weight: 800;
  color: #fff; margin: 6px 0 8px;
  letter-spacing: .5px;
}
.unlock-desc {
  font-size: 14px; color: #a7b4cd; line-height: 1.6;
  margin-bottom: 14px;
}
.unlock-balance {
  display: inline-block;
  font-size: 13px; color: #00E5A0; font-weight: 700;
  background: rgba(0,229,160,.12);
  border: 1px solid rgba(0,229,160,.3);
  border-radius: 20px;
  padding: 5px 14px;
  margin-bottom: 12px;
}
.unlock-error {
  font-size: 13px; color: #ff7a8a; font-weight: 600;
  min-height: 18px; margin-bottom: 8px;
}
.unlock-btns {
  display: flex; gap: 12px; justify-content: center;
}
.unlock-btn {
  flex: 1; max-width: 130px;
  border: none; border-radius: 999px;
  padding: 11px 0; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: transform .15s, filter .15s;
}
.unlock-btn:active { transform: scale(.95); }
.unlock-cancel {
  background: rgba(255,255,255,.08);
  color: #a7b4cd;
  border: 1px solid rgba(255,255,255,.15);
}
.unlock-cancel:hover { filter: brightness(1.15); }
.unlock-go {
  background: linear-gradient(135deg, #00E5A0, #00b8ff);
  color: #04121a;
}
.unlock-go:hover { filter: brightness(1.08); }








/* ===== 手机端最终修复：顶部栏+面板 ===== */
@media (max-width: 768px) {
  /* topbar 提高 z-index，确保不被任何面板覆盖 */
  .topbar {
    z-index: 3000 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 4px 8px !important;
    gap: 4px !important;
    display: flex !important;
    align-items: center !important;
    background: rgba(10, 14, 26, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid rgba(30, 41, 59, 0.8) !important;
  }
  .logo {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
  }
  .logo-icon {
    width: 28px !important;
    height: 28px !important;
    font-size: 18px !important;
  }
  .logo-text { display: none !important; }
  .breadcrumb { display: none !important; }

  .topbar-right {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
  }

  /* 所有顶部按钮：统一尺寸，确保可见 */
  .search-mobile-btn, .lang-btn, .avatar-btn, .social-btn, .shop-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    background: rgba(36, 48, 79, 0.9) !important;
    border: 1px solid rgba(42, 52, 71, 0.8) !important;
    color: #F8FAFC !important;
    font-size: 14px !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
  }
  .search-mobile-btn { font-size: 14px !important; }
  .lang-btn #lang-btn-text { font-size: 0 !important; }
  .lang-btn #lang-btn-text::before { content: '\1F310'; font-size: 14px !important; }
  .avatar-btn {
    border-radius: 50% !important;
    border: 2px solid #00E5A0 !important;
    overflow: hidden !important;
  }
  .avatar-dot {
    font-size: 14px !important;
    width: 28px !important;
    height: 28px !important;
    line-height: 28px !important;
    text-align: center !important;
  }
  .social-btn { position: relative !important; }
  .social-badge {
    position: absolute !important;
    top: -4px !important;
    right: -4px !important;
    font-size: 9px !important;
    min-width: 16px !important;
    height: 16px !important;
    line-height: 16px !important;
  }

  /* 金币徽章 */
  .coin-badge {
    display: flex !important;
    align-items: center !important;
    gap: 3px !important;
    font-size: 12px !important;
    padding: 4px 8px !important;
    color: #FFD60A !important;
    background: rgba(255, 214, 10, 0.1) !important;
    border: 1px solid rgba(255, 214, 10, 0.3) !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    flex-shrink: 0 !important;
    height: 32px !important;
  }
  .coin-icon { font-size: 12px !important; }
  .coin-num { font-size: 12px !important; color: #FFD60A !important; }

  /* ===== 商城面板：fixed 底部弹出，绝不覆盖 topbar ===== */
  .shop-panel {
    position: fixed !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 72vh !important;
    max-height: 72vh !important;
    border-radius: 16px 16px 0 0 !important;
    z-index: 2500 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.6) !important;
    background: #1A2440 !important;
  }
  .shop-head {
    padding: 12px 14px !important;
    font-size: 15px !important;
    position: sticky !important;
    top: 0 !important;
    background: #1A2440 !important;
    z-index: 2 !important;
    border-bottom: 1px solid rgba(30, 41, 59, 0.8) !important;
  }
  .shop-list { padding: 8px !important; max-height: none !important; }
  .shop-item { padding: 10px 12px !important; gap: 10px !important; }
  .shop-item-icon { width: 36px !important; height: 36px !important; font-size: 20px !important; }
  .shop-item-name { font-size: 13px !important; }
  .shop-item-desc { font-size: 11px !important; }
  .shop-buy-btn { height: 30px !important; padding: 0 12px !important; font-size: 12px !important; }

  /* ===== 头像/个人面板：同样 fixed 底部弹出 ===== */
  .profile-panel {
    position: fixed !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 80vh !important;
    max-height: 80vh !important;
    border-radius: 16px 16px 0 0 !important;
    z-index: 2500 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.6) !important;
    background: #1A2440 !important;
  }

  /* 头像/头像框网格 */
  .avatar-grid, .frame-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
  }
  .avatar-cell, .frame-cell {
    padding: 6px 4px !important;
    cursor: pointer !important;
  }
  .avatar-cell-icon, .frame-cell-icon {
    width: 34px !important;
    height: 34px !important;
    font-size: 20px !important;
    line-height: 34px !important;
  }

  /* 地球容器：top 留出 topbar 高度 */
  #map-container { top: 48px !important; }
}


/* 手机端用户上下文菜单：加宽，确保内容完整 */
@media (max-width: 768px) {
  .user-context-menu {
    min-width: 180px !important;
    max-width: 240px !important;
    padding: 6px !important;
  }
  .user-context-menu button {
    padding: 10px 14px !important;
    font-size: 14px !important;
  }
}


/* 搜索按钮 */
.search-inner { display: flex; align-items: center; gap: 4px; }
.search-inner input { flex: 1; }
.search-go-btn {
  width: 32px; height: 32px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text-main); font-size: 14px;
  cursor: pointer;
}
.search-go-btn:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 768px) {
  .search-inner input { height: 36px; font-size: 13px; }
  .search-go-btn { width: 36px; height: 36px; }
}
