/* ========== 基础变量 & 液态玻璃 ========== */
:root {
  --text: #ffffff;
  --text-dim: rgba(255,255,255,0.72);
  --glass-bg: transparent;
  --glass-border: rgba(255,255,255,0.5);
  --glass-shadow: -4px -4px 16px rgba(144,224,170,0.15), 4px 4px 16px rgba(0,0,0,0.07), inset 2px 2px 6px rgba(255,255,255,0.6);
  --accent: #3a8a55;
  --accent-hover: #2d6a41;
  --body-bg: linear-gradient(160deg, #e0f2e9 0%, #c8e6d0 40%, #a5d6b8 100%);
}
[data-theme="dark"] {
  --text: #eaf6ef;
  --text-dim: rgba(234,246,239,0.6);
  --glass-bg: rgba(255,255,255,0.08);
  --glass-border: rgba(255,255,255,0.18);
  --glass-shadow: -6px -6px 20px rgba(64,192,128,0.2), 6px 6px 20px rgba(0,0,0,0.3), inset 2px 2px 6px rgba(255,255,255,0.25);
  --accent: #5fd68f;
  --accent-hover: #4bc97a;
  --body-bg: linear-gradient(160deg, #0d1f17 0%, #12301f 45%, #1a3d2b 100%);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
/* ⚠️ hidden 属性的优先级低于类选择器里的 display，
   不给这条规则的话，凡是被 CSS 设过 display 的元素（flex/block…）都藏不住 */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--body-bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  transition: color 0.5s;
  -webkit-font-smoothing: antialiased;
}
:root {
  --bg-overlay: rgba(0, 0, 0, 0.15);
  /* 背景图加载不出来时的兜底：黄→青，左上到右下 */
  --bg-fallback: linear-gradient(135deg, #ffff00 0%, #00ffff 100%);
}
/* 非默认主题有自己的背景，不需要兜底 */
html[data-theme-id="gold"],
html[data-theme-id="rainbow"],
html[data-theme-id="ny2027"] { --bg-fallback: none; }
[data-theme="dark"] {
  --bg-overlay: rgba(13, 31, 23, 0.45);
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-image: var(--bg-image, var(--bg-fallback));
  opacity: var(--bg-opacity, 0);
  transition: opacity 0.6s ease-in-out;
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: var(--bg-overlay);
  transition: background 0.6s;
}

.liquid-glass {
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow); border-radius: 28px;
  transition: transform 0.35s, box-shadow 0.35s, background 0.4s;
}
.liquid-glass:hover { transform: translateY(-3px); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

.theme-switch {
  flex: 0 0 auto; cursor: pointer; white-space: nowrap;
  padding: 10px 18px; border-radius: 22px; background: var(--glass-bg);
  border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
  font-size: 15px; font-weight: 500; color: var(--text); backdrop-filter: blur(10px); transition: all 0.3s; user-select: none;
}
.theme-switch:hover { transform: scale(1.05); }

/* 纯图标版：等宽高，四条杠居中 */
.theme-switch-icon {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0; width: 42px; height: 42px; border-radius: 13px;
  flex: 0 0 auto; box-sizing: border-box;
}
.theme-switch-icon svg { display: block; }
.theme-switch-icon:active { transform: scale(.94); }

.topbar {
  position: sticky; top: 0; z-index: 99; display: flex; justify-content: flex-start;
  align-items: center; flex-wrap: nowrap; gap: 12px;
  padding: 14px 0; margin-bottom: 32px; background: var(--glass-bg);
  backdrop-filter: blur(16px); border-bottom: 1px solid var(--glass-border);
}
/* 栏目区自己横向滑动，主题按钮固定在最右侧常驻可见 */
.nav-scroll {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  scroll-behavior: smooth; padding: 2px 0;
}
.nav-scroll::-webkit-scrollbar { display: none; }
/* 桌面端：栏目在中间居中，主题按钮固定在最右；放不下时才开始横向滑动 */
@media (min-width: 721px) { .nav-scroll { justify-content: center; } }
.nav-tab {
  padding: 10px 26px; border-radius: 22px; cursor: pointer;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  font-size: 15px; font-weight: 500; color: var(--text); transition: all 0.3s; user-select: none;
}
.nav-tab:hover, .nav-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.page { display: none; }
.page.active { display: block; }
/* 栏目切换：整块从右向左淡入 + 弹性回弹，0.3s */
.page.active > section,
.page.active > .card {
  animation: pageIn .3s cubic-bezier(.22, 1.4, .5, 1) both;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: translateX(0); }
}
/* 同一页内多个板块依次错开，更有层次 */
.page.active > section:nth-child(2) { animation-delay: .04s; }
.page.active > section:nth-child(3) { animation-delay: .08s; }
.page.active > section:nth-child(4) { animation-delay: .12s; }
@media (prefers-reduced-motion: reduce) {
  .page.active > section, .page.active > .card { animation: none !important; }
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

header.hero { text-align: center; padding: 52px 28px 44px; border-radius: 38px; margin-bottom: 40px; }
.hero .icon {
  width: 104px; height: 104px; border-radius: 26px; margin: 0 auto 20px;
  background: var(--accent); display: flex; align-items: center; justify-content: center;
  font-size: 54px; overflow: hidden;
}
.hero .icon img { width: 100%; height: 100%; object-fit: cover; }
.hero p.sub { margin-top: 8px; font-size: 18px; color: var(--text-dim); }
.addr-tag {
  display: inline-block; margin-top: 18px; padding: 10px 24px; border-radius: 24px;
  cursor: pointer; user-select: all; background: var(--glass-bg); border: 1px solid var(--glass-border);
  font-family: monospace; font-size: 16px; color: var(--text); transition: 0.25s;
}
.addr-tag:hover { transform: translateY(-2px); }

.sec-title {
  font-size: 27px;
  font-weight: 700;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left !important;
  justify-content: flex-start !important;
  margin-right: auto !important;
}
.sec-title::before { content: ""; width: 6px; height: 26px; border-radius: 4px; background: linear-gradient(180deg, #5fd68f, #3a8a55); }

.card { padding: 28px; margin-bottom: 24px; }
.intro { line-height: 2; font-size: 16px; padding: 32px 36px; }

.rules-list { list-style: none; padding: 0; }
.rules-list li {
  position: relative; padding: 10px 0 10px 28px; font-size: 15px; line-height: 1.6;
}
.rules-list li::before {
  content: "•"; position: absolute; left: 8px; color: var(--accent); font-size: 20px; line-height: 1.4;
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 14px; margin-bottom: 16px; }
.stat-item { padding: 16px; border-radius: 20px; }
.stat-item .label { font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.stat-item .value { font-size: 17px; font-weight: 600; }
.value.on { color: #22c55e; } .value.off { color: #ef4444; }
.motd { padding: 16px; border-radius: 20px; font-size: 15px; white-space: pre-wrap; margin-bottom: 12px; }
.players-list { padding: 16px; border-radius: 20px; font-size: 15px; margin-bottom: 12px; }

.time-tabs { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.time-tab { padding: 7px 18px; border-radius: 18px; cursor: pointer; background: var(--glass-bg); border: 1px solid var(--glass-border); font-size: 14px; color: var(--text); transition: 0.25s; }
.time-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.chart-card { padding: 24px; margin-bottom: 24px; }
.chart-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; display: flex; justify-content: space-between; }
.chart-wrapper { position: relative; height: 250px; }
.chart-wrapper canvas { width: 100% !important; height: 100% !important; }

footer { border-radius: 38px 38px 0 0; padding: 40px 28px 28px; margin-top: 40px; background: var(--glass-bg); border-top: 1px solid var(--glass-border); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 18px; margin-bottom: 24px; }
.footer-item { padding: 18px; border-radius: 20px; }
.footer-item h4 { font-size: 15px; margin-bottom: 8px; color: var(--accent); }
.footer-item p, .footer-item a { font-size: 14px; color: var(--text); text-decoration: none; }
.copy { text-align: center; color: var(--text-dim); font-size: 13px; }

@media (max-width: 720px) {
  .wrap { padding: 0 14px; }
  /* 手机端：栏目与亮/暗色按钮同一行，一行排开，超出部分横向滑动 */
  .topbar {
    justify-content: flex-start;
    gap: 8px;
    padding: 10px 0 12px;
    margin-bottom: 18px;
  }
  .nav-tab {
    flex: 0 0 auto;
    padding: 9px 14px;
    font-size: 13.5px;
    text-align: center;
    border-radius: 16px;
    white-space: nowrap;
  }
  .theme-switch { padding: 8px 13px; font-size: 13px; border-radius: 16px; }
  .theme-switch-icon { width: 38px; height: 38px; border-radius: 12px; padding: 0; }
  .theme-switch-icon svg { width: 18px; height: 13px; }
  header.hero { border-radius: 28px; padding: 36px 18px 28px; }
  .chart-wrapper { height: 200px; }
}

/* ===== 背景加载指示器 ===== */
#bg-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  transition: opacity 0.6s ease;
  pointer-events: none;
}
#bg-loader.hidden { opacity: 0; pointer-events: none; }
#bg-loader .loader-logo {
  width: 84px; height: 84px; border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
  box-shadow: 0 0 24px rgba(95, 214, 143, 0.55);
  background: rgba(255,255,255,0.08);
}
#bg-loader .loader-text {
  font-size: 18px;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: 1px;
}
#bg-loader .loader-steps {
  display: flex; flex-direction: column; gap: 7px;
  margin-bottom: 18px; min-height: 22px;   /* 只显示一项，预留一行高度防跳动 */
}
/* 默认全部隐藏，只显示当前这一项（.cur） */
#bg-loader .ls-item {
  display: none;
  align-items: center; gap: 8px;
  font-size: 14px; color: #fff;
  animation: lsIn .28s ease both;   /* 切换时淡入，不生硬 */
}
#bg-loader .ls-item.cur { display: flex; }
#bg-loader .ls-item i {
  flex: 0 0 14px; width: 14px; height: 14px; box-sizing: border-box;
  border: 2px solid #2196F3; border-top-color: transparent; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  animation: lsSpin .7s linear infinite;
}
@keyframes lsSpin { to { transform: rotate(360deg); } }
@keyframes lsIn {
  0%   { opacity: 0; transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0); }
}

#bg-loader .progress-bar-bg {
  width: 260px;
  height: 8px;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  overflow: hidden;
}
#bg-loader .progress-bar-fill {
  height: 100%;
  width: 0%;
  background: #2196F3;
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* ===== 进入画面（自定义照片 + ✨ 粒子） ===== */
#intro-splash {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--body-bg);
  background-attachment: fixed;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;                    /* 默认完全透明，避免一进网页就显示照片 */
  visibility: hidden;            /* 隐藏期不参与点击、也不占位遮挡 */
  transition: opacity 2s ease;
}
#intro-splash.visible { visibility: visible; opacity: 1; }   /* 加载动画结束后才变为可见 */
#intro-splash.fading { opacity: 0; }                         /* 淡出，时长见下方 transition */
#intro-splash.gone { display: none; }                        /* 彻底释放，完全不影响页面 */
#intro-splash img {
  max-width: min(70vw, 460px);
  max-height: 70vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 24px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.35);
}
#intro-particles { position: absolute; inset: 0; width: 100%; height: 100%; }
/* 淡出时长需与 index.html 的 SPLASH_FADE 一致 */
#intro-splash.fading { transition: opacity 0.8s ease; opacity: 0; }
#intro-splash.gone { display: none; }

/* ===== 漂浮物装饰层：最上层但不拦截点击 ===== */
#float-layer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  display: block;
}

/* ===== Bug/反馈 按钮 ===== */
.sec-title { justify-content: space-between; }


/* ===== 访客信息卡片 ===== */
.visitor-card { margin-bottom: 24px; }
.visitor-card .v-line { font-size: 15px; line-height: 2.1; }
.visitor-card .v-label { color: var(--text-dim); }

/* ---- 电子时钟 ---- */
.eclock {
  background: linear-gradient(160deg, rgba(0,0,0,.42), rgba(0,0,0,.26));
  border: 1px solid rgba(95,214,143,.28);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 10px;
  box-shadow: inset 0 0 22px rgba(95,214,143,.10);
}
.eclock-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.eclock-date {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-dim);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: .5px;
  flex: 0 0 auto;
  text-align: left;
}
.eclock-time {
  font-family: "DIN Alternate", "DS-Digital", ui-monospace, Menlo, Consolas, monospace;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.1;
  color: #7ee2a8;
  letter-spacing: 2px;
  text-shadow: 0 0 14px rgba(126,226,168,.45);
  font-variant-numeric: tabular-nums;
  flex: 1 1 auto;
  text-align: right;
}
/* 除夕倒计时：同上风格 */
.eclock-eve { margin-bottom: 0; border-color: rgba(255,159,67,.32); box-shadow: inset 0 0 22px rgba(255,159,67,.10); }
.eclock-eve .eclock-date { color: #ffb86b; font-weight: 600; }
.eclock-eve-time { color: #ff9f43; text-shadow: 0 0 14px rgba(255,159,67,.4); }
@media (max-width: 480px) {
  .eclock { padding: 13px 14px; }
  .eclock-time { font-size: 30px; letter-spacing: 1px; }
  .eclock-date { font-size: 13px; }
}

/* ============================================================
新增功能样式：闹钟 / 疑问折叠 / 更多按钮 / 弹窗 / 反馈 / 我的
============================================================ */
/* ---- 服务器介绍配图 ---- */
.intro-img {
display: block; width: 100%; margin-top: 16px;
border-radius: 18px; object-fit: cover; max-height: 320px;
box-shadow: 0 8px 26px rgba(0,0,0,.22);
}
/* ---- 指针装饰：整层在内容之后（z-index -1），卡片会把它磨砂模糊 ---- */
#decoLayer {
  position: fixed; inset: 0;
  z-index: 0;                  /* 高于背景遮罩，低于正文（.wrap 为 1） */
  overflow: hidden;
  pointer-events: none;
}
/* 磨砂跟随圈：模糊身后的背景（与 Astro 版一致） */
#decoBlur {
  position: absolute; top: 0; left: 0;
  border-radius: 50%;
  z-index: 0;
  opacity: 0;
  transition: opacity .35s ease;
  backdrop-filter: blur(8px) saturate(1.1);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
  -webkit-mask-image: radial-gradient(closest-side, rgba(0,0,0,1) 0%, rgba(0,0,0,.8) 40%, rgba(0,0,0,0) 100%);
  mask-image: radial-gradient(closest-side, rgba(0,0,0,1) 0%, rgba(0,0,0,.8) 40%, rgba(0,0,0,0) 100%);
  will-change: transform;
}
#decoBlur.on { opacity: 1; }
#cursorDeco {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 1;
}
/* 细颗粒噪点，压住渐变的塑料感 */
#decoNoise {
  position: absolute; inset: 0; z-index: 2;
  opacity: .03;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIj48ZmlsdGVyIGlkPSJhIiB4PSIwIiB5PSIwIj48ZmVUdXJidWxlbmNlIGJhc2VGcmVxdWVuY3k9Ii43NSIgc3RpdGNoVGlsZXM9InN0aXRjaCIgdHlwZT0iZnJhY3RhbE5vaXNlIi8+PGZlQ29sb3JNYXRyaXggdHlwZT0ic2F0dXJhdGUiIHZhbHVlcz0iMCIvPjwvZmlsdGVyPjxwYXRoIGQ9Ik0wIDBoMzAwdjMwMEgweiIgZmlsdGVyPSJ1cmwoI2EpIiBvcGFjaXR5PSIuMDUiLz48L3N2Zz4=');
}
/* 弹窗打开时收起磨砂圈，避免 backdrop-filter 叠加导致闪烁 */
body.anim-pause #decoBlur { opacity: 0 !important; }

/* ---- 切主题过渡：色块自上而下扫过 ---- */
#themeWipe {
  position: fixed;
  left: 0; top: 0;
  width: 100%; height: 100%;
  z-index: 9997;                 /* 低于弹窗(10000)、低于进入画面(9998) */
  pointer-events: none;
  transform: translateY(-100%);
  opacity: 0;
  background: linear-gradient(180deg, var(--wipe-c1, #5fd68f) 0%, var(--wipe-c2, #0f2027) 100%);
}
#themeWipe.run { animation: themeWipe .72s cubic-bezier(.45, 0, .2, 1) forwards; }
@keyframes themeWipe {
  0%   { transform: translateY(-100%); opacity: 1; }
  42%  { transform: translateY(0);     opacity: 1; }
  58%  { transform: translateY(0);     opacity: 1; }
  100% { transform: translateY(100%);  opacity: 1; }
}

/* ---- 问卷横幅 ---- */
.survey-banner {
  max-width: 1100px; margin: 10px auto 0; padding: 0 24px;
  display: flex; align-items: center; gap: 10px;
  position: relative; z-index: 1;
}
.survey-link {
  flex: 1 1 auto; min-width: 0;
  display: block; padding: 11px 14px;
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(95,214,143,.18), rgba(56,189,248,.18));
  border: 1px solid rgba(95,214,143,.42);
  color: var(--text); text-decoration: none;
  font-size: 13.5px; line-height: 1.5;
  transition: transform .18s ease, box-shadow .18s ease;
}
.survey-link:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.survey-link b { color: #5fd68f; }
.survey-close {
  flex: 0 0 auto;
  background: none; border: 0; cursor: pointer;
  color: var(--text); opacity: .55;
  font-size: 19px; line-height: 1; padding: 6px 8px;
  border-radius: 8px; transition: opacity .18s ease;
}
.survey-close:hover { opacity: 1; background: rgba(255,255,255,.08); }

/* ---- 签到按钮：请求中的加载动画 ---- */
.xbtn.is-busy {
  position: relative; color: transparent !important; pointer-events: none;
}
.xbtn.is-busy::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btnSpin .7s linear infinite;
}
@keyframes btnSpin { to { transform: rotate(360deg); } }

/* ---- 我的：积分 ---- */
.me-points-row { display: flex; gap: 14px; align-items: stretch; }
.me-points-col { flex: 1 1 0; min-width: 0; }
/* ---- 我的：积分 ---- */
.me-points-row { display: flex; gap: 14px; align-items: stretch; }
.me-points-col { flex: 1 1 0; min-width: 0; }

/* ---- 我的：资料区折叠（默认收起） ---- */
.me-fold-title {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; user-select: none;
  margin-top: 14px; padding-top: 12px;
  border-top: 1px dashed var(--glass-border, rgba(255,255,255,.18));
  font-size: 14px; font-weight: 600;
}
.me-fold-arrow {
  font-size: 12px; opacity: .7;
  transition: transform .3s cubic-bezier(.22,1,.36,1);
  display: inline-block;
}
.me-fold-title.open .me-fold-arrow { transform: rotate(180deg); }
/* 展开动画：grid 0fr→1fr，内容高度不定也能平滑 */
.me-fold-body {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .3s cubic-bezier(.22,1,.36,1);
}
.me-fold-inner { overflow: hidden; min-height: 0; }
.me-fold-body.open { grid-template-rows: 1fr; }

/* ---- 限定主题横幅（1080×300~400，高度按比例自适应） ---- */
.is-hidden { display: none !important; }
.theme-banner {
display: block; width: 100%;
aspect-ratio: 1080 / 360;
object-fit: cover;
border-radius: 18px;
box-shadow: 0 8px 26px rgba(0,0,0,.22);
}
/* ---- 疑问 / 说明 折叠栏 ---- */
.faq-item { border-bottom: 1px solid var(--glass-border); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
display: flex; align-items: center; justify-content: space-between; gap: 12px;
padding: 14px 2px; cursor: pointer; font-size: 15px; font-weight: 600; user-select: none;
}
.faq-q:hover { color: var(--accent); }
.faq-arrow { font-style: normal; transition: transform .28s; color: var(--accent); }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-a {
max-height: 0; overflow: hidden; font-size: 14px; line-height: 1.9;
color: var(--text-dim); transition: max-height .32s ease, padding .28s; padding: 0 2px;
}
.faq-item.open .faq-a { max-height: 5000px; padding: 0 2px 16px; }
.faq-empty { font-size: 14px; color: var(--text-dim); padding: 8px 0; }
/* ---- 更多页按钮网格：手机 4 / 电脑 6 ---- */
.link-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 900px) { .link-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; } }
.link-item {
display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
padding: 14px 6px; border-radius: 18px; text-decoration: none; color: var(--text);
border: 1px solid var(--glass-border); background: var(--glass-bg);
box-shadow: var(--glass-shadow); transition: transform .25s, box-shadow .25s;
}
.link-item:hover { transform: translateY(-3px); }
.link-icon { font-size: clamp(20px, 5vw, 26px); line-height: 1; }
.link-name { font-size: 12px; text-align: center; word-break: break-all; line-height: 1.3; }
/* ---- 通用表单 / 按钮 ---- */
.xlabel { display: block; font-size: 13px; color: var(--text-dim); margin: 12px 0 6px; }
.required { color: #ff8a80; }
.xinput {
width: 100%; padding: 11px 13px; border-radius: 14px; font-size: 15px; font-family: inherit;
border: 1px solid rgba(255,255,255,.28); background: rgba(0,0,0,.18); color: var(--text);
outline: none; transition: border .2s, background .2s;
}
.xinput:focus { border-color: var(--accent); background: rgba(0,0,0,.26); }
.xinput::placeholder { color: rgba(255,255,255,.55); }
textarea.xinput { min-height: 150px; resize: vertical; line-height: 1.7; }
.xbtn {
margin-top: 14px; width: 100%; padding: 12px 16px; border: none; border-radius: 14px; cursor: pointer;
font-size: 15px; font-weight: 600; color: #fff; background: var(--accent);
transition: background .25s, transform .2s; font-family: inherit;
}
.xbtn:hover { background: var(--accent-hover); }
.xbtn:active { transform: scale(.98); }
.xbtn:disabled { opacity: .5; cursor: not-allowed; }
.xbtn-sm { width: auto; margin-top: 0; padding: 11px 18px; flex: 0 0 auto; }
.xbtn-gray { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25); }
.xmsg { margin-top: 12px; font-size: 14px; min-height: 20px; text-align: center; word-break: break-all; }
.xmsg.ok { color: #7ee2a8; } .xmsg.err { color: #ffb4b0; }
.hint { font-size: 12px; color: var(--text-dim); margin-top: 8px; line-height: 1.7; }
/* ---- 弹窗 ---- */
/* ⚠️ z-index 必须高于 intro-splash(9998) 与 bg-loader(9999)，否则会被盖住 */
.xmodal {
position: fixed; inset: 0; z-index: 10000; display: none; align-items: center; justify-content: center;
padding: 20px; background: rgba(0,0,0,.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.xmodal.show { display: flex; animation: fadeIn .3s ease; }
.xmodal-box {
width: 100%; max-width: 420px; max-height: 86vh; overflow-y: auto; padding: 24px;
border-radius: 24px; color: #eaf6ef; background: rgba(16,26,21,.96);
border: 1px solid rgba(255,255,255,.18); box-shadow: 0 20px 60px rgba(0,0,0,.45);
}
.xmodal-title { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.xmodal-actions { display: flex; gap: 10px; margin-top: 14px; }
.xmodal-actions .xbtn { flex: 1; margin-top: 0; }
/* 取消用次要样式，和确定区分开 */
.xmodal-actions .xbtn#cfNo {
  background: rgba(255, 255, 255, .14);
  color: #eaf6ef;
  -webkit-text-fill-color: #eaf6ef;
}
.xmodal-body { font-size: 14.5px; line-height: 2; white-space: pre-wrap; word-break: break-word; margin-bottom: 6px; }
.xmodal-tabs { display: flex; gap: 10px; margin-bottom: 16px; }
.xmtab { flex: 1; text-align: center; padding: 9px 0; border-radius: 14px; cursor: pointer; font-size: 14px; background: rgba(255,255,255,.1); }
.xmtab.active { background: var(--accent); color: #fff; font-weight: 600; }
.xmodal-box .xinput { margin-bottom: 10px; }
/* ---- 反馈 ---- */
.lock-tip { font-size: 14.5px; line-height: 2; color: var(--text-dim); text-align: center; padding: 10px 0; }
.fb-mine { margin-top: 22px; border-top: 1px solid var(--glass-border); padding-top: 16px; }
.fb-mine-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.fb-card { padding: 14px; border-radius: 16px; background: rgba(0,0,0,.14); border: 1px solid var(--glass-border); margin-bottom: 12px; }
.fb-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--text-dim); }
.fb-type { padding: 2px 10px; border-radius: 10px; background: rgba(255,255,255,.14); color: var(--text); }
.fb-state { padding: 2px 10px; border-radius: 10px; font-weight: 600; }
.st-new { background: rgba(255,138,128,.2); color: #ffb4b0; }
.st-read { background: rgba(84,160,255,.2); color: #9ecbff; }
.st-ok { background: rgba(95,214,143,.22); color: #7ee2a8; }
.fb-time { margin-left: auto; }
.fb-content { margin-top: 8px; font-size: 14px; line-height: 1.9; word-break: break-word; }
.fb-reply { margin-top: 10px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.8; background: rgba(95,214,143,.12); border-left: 3px solid var(--accent); word-break: break-word; }
/* ---- 我的 ---- */
.me-head { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; flex-wrap: wrap; }
.me-avatar {
width: 56px; height: 56px; border-radius: 18px; flex: 0 0 auto; background: var(--accent); color: #fff;
display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700;
}
.me-basic { flex: 1 1 200px; min-width: 180px; }
.me-block { margin-top: 22px; border-top: 1px solid var(--glass-border); padding-top: 16px; }
.me-block-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.me-row { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.me-row .xinput { flex: 1 1 180px; width: auto; }
.me-points { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.me-points-num { font-size: 32px; font-weight: 700; color: var(--accent); }
.me-points-label { font-size: 13px; color: var(--text-dim); }
/* ---- 栏目：账号位（最右）+ 移动端横向滚动 ---- */
/* 最右侧账号位：未登录「登录 / 注册」，登录后显示用户名 */
.nav-user {
  font-weight: 600; border-style: dashed; max-width: 150px;
  overflow: hidden; text-overflow: ellipsis; position: relative;
}
.nav-user.is-me {
  border-style: solid; background: rgba(95,214,143,.18); border-color: rgba(95,214,143,.5);
}
.nav-user.is-me::before { content: "👤 "; }
.nav-tab { flex: 0 0 auto; white-space: nowrap; }
.theme-switch { flex: 0 0 auto; }
@media (max-width: 720px) {
.me-row .xbtn-sm { width: 100%; }
}

/* ============================================================
登录 / 注册：过渡动画 + 真实加载动画
============================================================ */
/* 弹窗：入场/退场过渡 */
.xmodal { opacity: 0; transition: opacity .28s ease; }
.xmodal.show { opacity: 1; }
.xmodal-box { transform: translateY(24px) scale(.94); opacity: 0; transition: transform .34s cubic-bezier(.22,1,.36,1), opacity .28s ease; }
.xmodal.show .xmodal-box { transform: translateY(0) scale(1); opacity: 1; }
.xmodal.closing { opacity: 0; }
.xmodal.closing .xmodal-box { transform: translateY(12px) scale(.96); opacity: 0; }
/* 弹窗内切换 登录/注册 平滑过渡 */
#paneLogin, #paneReg { animation: paneIn .3s cubic-bezier(.22,1,.36,1); }
@keyframes paneIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
/* 按钮加载动画：转圈 + 呼吸光点 */
.xbtn { position: relative; overflow: hidden; }
.xbtn.loading { color: transparent !important; pointer-events: none; }
.spinner {
position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px;
border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%;
animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* 提交中的进度条：在按钮底部流动，比纯转圈更像真的在跑 */
.xbtn.loading::after {
content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 40%;
background: rgba(255,255,255,.9); border-radius: 0 3px 3px 0; animation: slide 1.1s ease-in-out infinite;
}
@keyframes slide { 0% { left: -40%; } 100% { left: 100%; } }
/* 成功提示：带对勾的绿色条 */
.xmsg.success {
display: flex; align-items: center; justify-content: center; gap: 8px;
padding: 10px 14px; border-radius: 14px; background: rgba(95,214,143,.18);
border: 1px solid rgba(95,214,143,.45); color: #7ee2a8; font-weight: 600;
animation: popIn .38s cubic-bezier(.22,1,.36,1);
}
.xmsg.success .ok-icon {
width: 20px; height: 20px; border-radius: 50%; flex: 0 0 auto; background: #5fd68f; color: #0d1f17;
font-size: 13px; line-height: 20px; font-weight: 700; animation: popIcon .45s cubic-bezier(.22,1,.36,1);
}
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes popIcon { 0% { transform: scale(0); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
/* 顶部吐司提示（登录/注册成功） */
.xtoast {
position: fixed; left: 50%; top: 22px; z-index: 999; transform: translate(-50%, -140%);
padding: 12px 20px; border-radius: 20px; color: #fff; font-size: 14.5px; font-weight: 600;
background: rgba(47,122,74,.96); box-shadow: 0 10px 30px rgba(0,0,0,.35);
backdrop-filter: blur(8px); display: flex; align-items: center; gap: 8px;
opacity: 0; transition: transform .48s cubic-bezier(.22,1,.36,1), opacity .35s ease; pointer-events: none;
max-width: 88vw; text-align: center;
}
.xtoast.show { transform: translate(-50%, 0); opacity: 1; }
.xtoast.err { background: rgba(178,58,52,.96); }

/* ---- 更多页：只显示文字、不显示图标 ---- */
.link-item-text { min-height: 62px; padding: 16px 10px; }
.link-item-text .link-name { font-size: clamp(13px, 3.4vw, 15px); font-weight: 600; }
.link-icon { display: none !important; }

/* ---- 登录框下方：接口状态指示灯 ---- */
.api-status {
  margin-top: 14px; padding: 12px 14px; border-radius: 14px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
}
.api-status-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 600; color: var(--text-dim); margin-bottom: 8px;
}
.api-status-btn {
  cursor: pointer; font-size: 12px; font-weight: 500; color: var(--accent);
  padding: 3px 9px; border-radius: 8px; border: 1px solid var(--glass-border);
  user-select: none; transition: background .2s;
}
.api-status-btn:hover { background: rgba(95,214,143,.12); }
.api-status-btn:active { opacity: .7; }
.api-status-list { list-style: none; margin: 0; padding: 0; }
.api-status-list li {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; font-size: 12.5px; color: var(--text-dim);
  border-top: 1px dashed var(--glass-border);
}
.api-status-list li:first-child { border-top: none; }
.api-dot {
  width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto;
  background: #888; box-shadow: 0 0 0 3px rgba(136,136,136,.18);
  transition: background .3s, box-shadow .3s;
}
.api-dot.ok    { background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.22); animation: dotPulse 2s ease-in-out infinite; }
.api-dot.bad   { background: #f87171; box-shadow: 0 0 0 3px rgba(248,113,113,.22); }
.api-dot.test  { background: #fbbf24; box-shadow: 0 0 0 3px rgba(251,191,36,.22); animation: dotBlink .9s linear infinite; }
@keyframes dotPulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes dotBlink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.api-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.api-tag  { flex: 0 0 auto; font-size: 11px; padding: 1px 7px; border-radius: 6px; background: rgba(255,255,255,.08); }
.api-ms   { flex: 0 0 auto; font-size: 11px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.api-loading { justify-content: center; color: var(--text-dim); font-size: 12.5px; }
.api-summary { margin-top: 8px; font-size: 12px; color: var(--text-dim); text-align: center; }
/* ---- 侧边栏（外观设置） ---- */
.side-mask {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(0,0,0,.5);
  opacity: 0; pointer-events: none;
  transition: opacity .28s ease;
}
.side-mask.show { opacity: 1; pointer-events: auto; }
.sidebar {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 401;
  width: min(86vw, 340px);
  /* 磨砂：半透明 + 背景模糊 */
  background: rgba(22, 34, 28, .42);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border-left: 1px solid rgba(255, 255, 255, .18);
  box-shadow: -8px 0 32px rgba(0, 0, 0, .34);
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.22,.8,.28,1);
  display: flex; flex-direction: column;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
/* 亮色模式磨砂更白，保证对比度 */
[data-theme="light"] .sidebar {
  background: rgba(255, 255, 255, .38);
  border-left-color: rgba(255, 255, 255, .5);
}
/* 叠一层淡高光 */
.sidebar::before {
  content: "";
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(160deg, rgba(255,255,255,.14), rgba(255,255,255,.02));
}
.sidebar.show { transform: translateX(0); }
.side-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 700; margin-bottom: 16px;
}
.side-close { cursor: pointer; padding: 4px 8px; color: var(--text-dim); font-size: 16px; }
.side-close:active { color: var(--text); }
.side-sec { margin-bottom: 18px; }
.side-sec-t { font-size: 12px; color: var(--text-dim); margin-bottom: 9px; letter-spacing: .5px; }
.mode-row { display: flex; gap: 8px; }
.mode-opt {
  flex: 1; text-align: center; padding: 11px 6px; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2);
  font-size: 13.5px; transition: background .2s, border-color .2s, transform .12s;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.mode-opt:active { transform: scale(.96); }
.mode-opt.on { background: rgba(95,214,143,.32); border-color: rgba(95,214,143,.7); color: #b9f5d0; font-weight: 600; }
.theme-list { display: flex; flex-direction: column; gap: 9px; }
.theme-item {
  padding: 12px 13px; border-radius: 13px; cursor: pointer; text-align: left;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2);
  transition: background .2s, border-color .2s, transform .12s;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.theme-item:active { transform: scale(.98); }
.theme-item.on { background: rgba(95,214,143,.30); border-color: rgba(95,214,143,.7); }
.theme-item .ti-n { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.theme-item .ti-d { color: rgba(255,255,255,.75); }
.side-head { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.side-sec-t { color: rgba(255,255,255,.7); }
.side-foot { color: rgba(255,255,255,.7); }
.side-close { color: rgba(255,255,255,.8); }
.theme-item .ti-n { font-size: 13.5px; font-weight: 600; margin-bottom: 3px; }
.theme-item .ti-d { font-size: 11.5px; color: var(--text-dim); line-height: 1.5; }
.theme-swatch { display: flex; gap: 4px; margin-top: 8px; }
.theme-swatch i { width: 22px; height: 10px; border-radius: 3px; display: block; }
/* 主题条目改为定位容器，价格贴右下角 */
.theme-item { position: relative; }
/* 未购买的付费主题：置灰 + 锁标记 */
.theme-item.locked { opacity: .62; }
.theme-item.locked .ti-n::after { content: " 🔒"; font-size: 12px; }
/* 价格：右下角，已解锁时整个不渲染 */
.ti-price {
  position: absolute; right: 10px; bottom: 8px;
  font-size: 11.5px; font-weight: 600;
  color: var(--accent); line-height: 1.4;
}
/* 已下架（仅已购用户可见）：角标提示 */
.theme-item.off-shelf .ti-n::after { content: " · 已下架"; font-size: 11px; opacity: .75; }
.ti-off { margin-top: 3px; font-size: 11px; color: var(--text-dim); opacity: .8; line-height: 1.5; }
.side-foot { margin-top: auto; padding-top: 14px; font-size: 11px; color: var(--text-dim); line-height: 1.6; }

/* ---- 找回账号 / 找回密码 ---- */
.find-admin {
  padding: 14px; border-radius: 13px;
  background: rgba(95,214,143,.10); border: 1px dashed rgba(95,214,143,.4);
}
.find-admin .fa-t { font-size: 14px; font-weight: 700; margin-bottom: 6px; color: #7ee2a8; }
.find-admin .fa-d { font-size: 12.5px; color: var(--text-dim); line-height: 1.7; }
.find-admin .fa-ways { margin-top: 10px; display: flex; flex-direction: column; gap: 7px; }
.find-admin .fa-way {
  font-size: 12.5px; padding: 8px 10px; border-radius: 9px;
  background: rgba(255,255,255,.06); border: 1px solid var(--glass-border);
}
.find-opt {
  display: block; width: 100%; text-align: left; margin-bottom: 10px;
  padding: 13px 14px; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,.06); border: 1px solid var(--glass-border);
  color: var(--text); font-family: inherit; transition: background .2s, border-color .2s;
}
.find-opt:active { background: rgba(95,214,143,.14); border-color: rgba(95,214,143,.45); }
/* 点击过渡：按下反馈 + 面板淡入 */
.find-opt { animation: none; }
.find-opt.fo-pick {
  animation: foPick .16s ease forwards;
}
@keyframes foPick {
  0%   { transform: scale(1); }
  60%  { transform: scale(.965); background: rgba(95,214,143,.22); }
  100% { transform: scale(1); }
}
.fo-in { animation: foIn .3s cubic-bezier(.22,.8,.28,1) both; }
@keyframes foIn {
  0%   { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}
.find-opt .fo-t { display: block; font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.find-opt .fo-d { display: block; font-size: 11.5px; color: var(--text-dim); line-height: 1.5; }
.find-back {
  font-size: 12.5px; color: var(--text-dim); margin-bottom: 10px; cursor: pointer;
  display: inline-block; padding: 4px 0;
}
.find-back:active { color: #7ee2a8; }
.find-sec .xbtn-sm { width: 100%; margin-bottom: 8px; }


.api-summary.ok  { color: #4ade80; }
.api-summary.bad { color: #f87171; }
