/* ============================================================
   极地之境传媒打卡系统 — QQ风格紫灰配色
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* 紫灰配色主色系 — QQ风格（统一浅色） */
  --primary: #3B82F6;
  --primary-dark: #2563EB;
  --primary-light: #93C5FD;
  --primary-bg: #EFF6FF;
  --purple: #3B82F6;
  --purple-light: #93C5FD;
  --purple-bg: #EFF6FF;
  --purple-dark: #2563EB;

  /* 统一浅色背景（类QQ浅色模式色调） */
  --bg: #F5F5FA;
  --bg-soft: #EDEDF5;
  --card: #FFFFFF;
  --card-2: #F8F8FF;
  --text: #2D2D3A;
  --text-soft: #555570;
  --muted: #9999AA;
  --border: #D5D5E0;
  --border-soft: #E5E5F0;

  /* 功能色 */
  --ok: #00B894;
  --bad: #E74C3C;
  --gold: #F39C12;
  --silver: #95A5A6;
  --bronze: #D35400;

  /* 圆角与阴影 */
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 2px 12px rgba(0, 0, 0, .08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, .12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, .15);

  /* 交互反馈 */
  --hover-bg: rgba(0,0,0,0.03);
  --active-bg: rgba(0,0,0,0.06);
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(ellipse 900px 500px at 50% -80px, rgba(59, 130, 246, 0.04), transparent 60%),
    radial-gradient(ellipse 500px 400px at 80% 90%, rgba(59, 130, 246, 0.02), transparent 50%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* 暗色滚动条 - 仅在内联滚动区域显示，页面级滚动条隐藏 */
body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body::-webkit-scrollbar {
  display: none;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #3A3A4A; }

/* ---------- 登录页品牌头部 ---------- */
.brand-header {
  text-align: center;
  padding: 48px 20px 24px;
}
.brand-logo {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 99, 235, .3);
}
.brand-logo svg { width: 40px; height: 40px; color: #fff; }
.brand-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}
.brand-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

/* ---------- 登录页 — 自然光线氛围 · 浅色基调 ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 120px;
  margin: -20px -16px -110px;
  position: relative;
  overflow: hidden;
  /* 自然光线渐变基底 — 粉黄蓝白柔和过渡 */
  background:
    linear-gradient(112deg, #fff5f8 0%, #fff8f0 25%, #f0f5ff 50%, #fff8f0 75%, #fff5f8 100%);
  background-size: 200% 200%;
  animation: hyg-flow-bg 12s ease-in-out infinite;
}
body.desktop-mode .login-page {
  margin: -28px -24px -110px;
}
/* 自然光线层 A — 从左上角射入的淡粉色光线 */
.login-page::before {
  content: '';
  position: absolute;
  top: -10%;
  left: -5%;
  width: 55%;
  height: 120%;
  background: linear-gradient(160deg,
    rgba(255, 220, 230, 0.18) 0%,
    rgba(255, 220, 230, 0.05) 35%,
    transparent 60%
  );
  transform: rotate(-8deg);
  pointer-events: none;
  z-index: 0;
  animation: hyg-ray-sweep-a 14s ease-in-out infinite;
}
/* 自然光线层 B — 从右上角射入的淡黄色光线 */
.login-page::after {
  content: '';
  position: absolute;
  top: -5%;
  right: -8%;
  width: 50%;
  height: 110%;
  background: linear-gradient(200deg,
    rgba(255, 235, 190, 0.15) 0%,
    rgba(255, 235, 190, 0.04) 30%,
    transparent 55%
  );
  transform: rotate(12deg);
  pointer-events: none;
  z-index: 0;
  animation: hyg-ray-sweep-b 16s ease-in-out infinite;
}
/* 光线氛围层 — 多层细光束叠加 */
.login-page .hyg-glass-reflection {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
/* 光束 1 — 从左侧斜射的淡蓝光束 */
.login-page .hyg-glass-reflection::before {
  content: '';
  position: absolute;
  top: 15%;
  left: -20%;
  width: 35%;
  height: 3px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(180, 210, 255, 0.12) 20%,
    rgba(180, 210, 255, 0.08) 50%,
    transparent 80%
  );
  transform: rotate(35deg);
  animation: hyg-ray-beam-a 10s ease-in-out infinite;
}
/* 光束 2 — 从右侧斜射的淡粉光束 */
.login-page .hyg-glass-reflection::after {
  content: '';
  position: absolute;
  bottom: 25%;
  right: -15%;
  width: 40%;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 200, 210, 0.10) 25%,
    rgba(255, 200, 210, 0.06) 60%,
    transparent 100%
  );
  transform: rotate(-28deg);
  animation: hyg-ray-beam-b 12s ease-in-out infinite;
  animation-delay: -5s;
}
/* 额外细光束 — 氛围感 */
.hyg-extra-ray {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}
.hyg-extra-ray:nth-of-type(1) {
  top: 55%;
  left: -10%;
  width: 45%;
  height: 1.5px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 225, 200, 0.08) 30%,
    rgba(255, 225, 200, 0.04) 60%,
    transparent 100%
  );
  transform: rotate(42deg);
  animation: hyg-ray-beam-c 15s ease-in-out infinite;
  animation-delay: -3s;
}
.hyg-extra-ray:nth-of-type(2) {
  top: 30%;
  right: -5%;
  width: 35%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(200, 220, 255, 0.07) 25%,
    rgba(200, 220, 255, 0.03) 65%,
    transparent 100%
  );
  transform: rotate(-15deg);
  animation: hyg-ray-beam-d 18s ease-in-out infinite;
  animation-delay: -8s;
}

.login-page > * {
  position: relative;
  z-index: 1;
}

/* ---------- 登录页 — 自然光线氛围 · 浅色基调 ---------- */
@keyframes hyg-flow-bg {
  0% { background-position: 0% 0%; }
  25% { background-position: 50% 30%; }
  50% { background-position: 100% 50%; }
  75% { background-position: 50% 70%; }
  100% { background-position: 0% 0%; }
}
/* 光线层 A 缓慢扫动 */
@keyframes hyg-ray-sweep-a {
  0%, 100% { transform: rotate(-8deg) translateX(0); opacity: 0.6; }
  25% { transform: rotate(-8deg) translateX(20px); opacity: 1; }
  50% { transform: rotate(-8deg) translateX(-10px); opacity: 0.5; }
  75% { transform: rotate(-8deg) translateX(15px); opacity: 0.8; }
}
/* 光线层 B 缓慢扫动 */
@keyframes hyg-ray-sweep-b {
  0%, 100% { transform: rotate(12deg) translateX(0); opacity: 0.5; }
  30% { transform: rotate(12deg) translateX(-15px); opacity: 0.9; }
  60% { transform: rotate(12deg) translateX(10px); opacity: 0.4; }
  80% { transform: rotate(12deg) translateX(-8px); opacity: 0.7; }
}
/* 光束 A 脉动 */
@keyframes hyg-ray-beam-a {
  0%, 100% { opacity: 0.3; transform: rotate(35deg) translateX(0); }
  20% { opacity: 0.8; transform: rotate(35deg) translateX(30px); }
  40% { opacity: 0.2; transform: rotate(35deg) translateX(-10px); }
  60% { opacity: 0.6; transform: rotate(35deg) translateX(20px); }
  80% { opacity: 0.4; transform: rotate(35deg) translateX(5px); }
}
/* 光束 B 脉动 */
@keyframes hyg-ray-beam-b {
  0%, 100% { opacity: 0.3; transform: rotate(-28deg) translateX(0); }
  25% { opacity: 0.7; transform: rotate(-28deg) translateX(-20px); }
  50% { opacity: 0.2; transform: rotate(-28deg) translateX(15px); }
  75% { opacity: 0.5; transform: rotate(-28deg) translateX(-10px); }
}
/* 细光束 C 漂移 */
@keyframes hyg-ray-beam-c {
  0%, 100% { opacity: 0.2; transform: rotate(42deg) translateX(0); }
  33% { opacity: 0.6; transform: rotate(42deg) translateX(25px); }
  66% { opacity: 0.3; transform: rotate(42deg) translateX(-15px); }
}
/* 细光束 D 漂移 */
@keyframes hyg-ray-beam-d {
  0%, 100% { opacity: 0.15; transform: rotate(-15deg) translateX(0); }
  40% { opacity: 0.5; transform: rotate(-15deg) translateX(-20px); }
  70% { opacity: 0.25; transform: rotate(-15deg) translateX(10px); }
}

/* ====== 登录框 — 柔光玻璃卡片 ====== */
.login-box {
  width: 100%;
  max-width: 380px;
  text-align: center;
  background: transparent;
  border: none;
  border-radius: 20px;
  padding: 40px 32px 28px;
  box-shadow: none;
  transition: all .4s cubic-bezier(.25,.1,.25,1);
}

.login-brand {
  font-size: 26px;
  font-weight: 800;
  color: #1d1d1f;
  letter-spacing: 3px;
  margin-bottom: 32px;
}
.login-subtitle {
  font-size: 16px;
  font-weight: 600;
  color: #555570;
  margin-bottom: 20px;
}
.register-inviter-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(147,51,234,0.1));
  border-radius: 12px;
  border: 1px solid rgba(59,130,246,0.2);
  margin-bottom: 14px;
}
.register-inviter-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #3B82F6;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.register-inviter-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.register-inviter-avatar span {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.register-inviter-detail {
  flex: 1;
  min-width: 0;
}
.register-inviter-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #1d1d1f);
}
.register-inviter-label span {
  color: var(--primary, #3B82F6);
}
.register-inviter-meta {
  font-size: 12px;
  color: var(--muted, #8e8e93);
  margin-top: 2px;
}
.login-form { text-align: left; }
.login-field { margin-bottom: 14px; }
.login-field input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid #d1d1d6;
  border-radius: 999px;
  font-size: 15px;
  background: #f5f5f7;
  color: #1d1d1f;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.login-field input::placeholder { color: #8e8e93; }
.login-field input:focus {
  outline: none;
  border-color: #3B82F6;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.btn-block { width: 100%; padding: 14px; border-radius: 999px; font-size: 16px; }
.login-foot { margin-top: 18px; display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.login-foot .link-text-btn { color: #3B82F6; font-size: 14px; }
.login-foot-divider { width: 1px; height: 14px; background: #d1d1d6; }
.login-tip { margin-top: 28px; color: #8e8e93; }
.login-agreement { color: #8e8e93; }
.login-agreement a { color: #3B82F6; }
.login-page .view-mode-btn {
  color: #555570;
}
.login-page .view-mode-btn.active {
  background: #3B82F6;
  color: #fff;
}
.login-page .view-mode-btn:not(.active):hover {
  background: #e5e5ea;
}
.login-page .quick-login-label {
  color: #8e8e93;
}
.login-page .error-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}
.login-page .error-box.hidden {
  display: none;
}

/* 注册表单（form-stack 在登录页内） */
.login-page .form-stack label {
  color: #3a3a4a;
}
.login-page .form-stack input,
.login-page .form-stack select {
  background: #f5f5f7;
  border-color: #d1d1d6;
  color: #1d1d1f;
}
.login-page .form-stack input::placeholder {
  color: #8e8e93;
}
.login-page .form-stack input:focus,
.login-page .form-stack select:focus {
  background: #ffffff;
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.login-page .form-stack .field-err {
  color: #b91c1c;
}
.login-page .btn-primary {
  background: #1d1d1f;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .1s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.login-page .btn-primary:hover {
  background: #000;
  transform: scale(1.02);
}
.login-page .btn-primary:active {
  transform: scale(0.98);
}
.login-page .btn-plain {
  color: #3B82F6;
  background: transparent;
  border: 1px solid #d1d1d6;
}
.login-page .btn-plain:hover {
  background: #f5f5f7;
}

/* ---------- 显示模式选择（手机版 / 电脑版） ---------- */
.view-mode-toggle {
  margin-top: 20px;
  text-align: center;
}
.view-mode-label {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
}
.view-mode-btns {
  display: flex;
  gap: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}
.view-mode-btn {
  flex: 1;
  padding: 8px 0;
  border: none;
  background: transparent;
  color: var(--text-soft);
  font-size: 13px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.view-mode-btn.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
.view-mode-btn:not(.active):hover {
  background: var(--border);
}

/* ---------- 快速登录 ---------- */
.quick-login-area { margin-bottom: 16px; }
.quick-login-label {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 10px;
}
.quick-login-list {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.quick-login-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  transition: opacity .15s;
}
.quick-login-item:hover { opacity: .7; }
.quick-login-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(59, 130, 246, .25);
}
.quick-login-name {
  font-size: 11px;
  color: var(--text-soft);
  max-width: 56px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 顶部工具行 ---------- */
.top-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  font-size: 14px;
}
.link-text { color: var(--primary); text-decoration: none; transition: color .15s; }
.link-text:hover { color: var(--primary-dark); }
.link-text-btn {
  background: none;
  border: none;
  color: var(--bad);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
}
.link-text-btn:hover { text-decoration: underline; }

/* 管理后台 — 固定顶部导航栏（统一浅色） */
.admin-top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  padding: 10px 16px 6px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.admin-top-bar .top-actions {
  margin-bottom: 6px;
}
.admin-top-bar .tabs {
  margin-bottom: 0;
  padding-bottom: 6px;
}
/* 磨砂玻璃模式 — 顶部导航栏透明毛玻璃 */
/* 管理面板内容区：桌面版左侧边栏 + 右侧内容区 */
#admin-app-view {
  padding-top: 110px;
}

/* ---------- 管理后台：左侧边栏 + 右侧内容区 ---------- */
@media (min-width: 1024px) {
  .admin-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: auto;
    width: 240px;
    display: flex;
    flex-direction: column;
    padding: 16px 0 16px 12px;
    overflow-y: auto;
    z-index: 99999;
    border-right: 1px solid rgba(0, 0, 0, 0.07);
    border-bottom: none;
  }
  .admin-top-bar .top-actions {
    margin-bottom: 12px;
    padding: 0 8px 12px;
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .admin-top-bar .tabs {
    flex-direction: column;
    overflow-x: visible;
    flex-wrap: nowrap;
    gap: 2px;
    padding: 0 4px;
  }
  .admin-top-bar .tab-btn {
    text-align: left;
    justify-content: flex-start;
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: none;
    border-left: 3px solid transparent;
    font-size: 14px;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s;
  }
  .admin-top-bar .tab-btn:hover {
    background: var(--hover-bg);
    border-left-color: var(--primary-light);
  }
  .admin-top-bar .tab-btn.active {
    background: var(--primary-bg);
    border-left-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
  }
  #admin-app-view {
    margin-left: 240px;
    padding: 24px 28px 60px;
  }
}

/* 移动端：保持原有顶部水平标签栏 */
@media (max-width: 1023px) {
  .admin-top-bar .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 12px;
    gap: 6px;
  }
  .admin-top-bar .tabs::-webkit-scrollbar { display: none; }
  .admin-top-bar .tab-btn {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

/* ---------- 小标签图片管理面板：左选择 + 右显示 ---------- */
.tag-img-layout {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  min-height: 400px;
}
.tag-img-sidebar {
  flex: 0 0 280px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--card-2);
}
.tag-img-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--card);
}
.tag-img-sidebar-list {
  flex: 1;
  overflow-y: auto;
  max-height: 500px;
  padding: 8px;
}
.tag-img-sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 4px;
}
.tag-img-sidebar-item:hover {
  background: var(--hover-bg);
}
.tag-img-sidebar-item.active {
  background: var(--primary-bg);
  border: 1px solid var(--primary-light);
}
.tag-img-sidebar-item img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid var(--border-soft);
  flex-shrink: 0;
}
.tag-img-sidebar-item-name {
  flex: 1;
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tag-img-sidebar-item-count {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-soft);
  background: var(--bg-soft);
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.tag-img-display {
  flex: 1;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 24px;
  background: var(--card);
  overflow-y: auto;
  max-height: 500px;
}
.tag-img-display-preview {
  text-align: center;
  margin-bottom: 20px;
}
.tag-img-display-preview img {
  max-width: 200px;
  max-height: 200px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
}
.tag-img-display-info {
  margin-bottom: 16px;
}
.tag-img-display-info-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
}
.tag-img-display-info-row .label {
  color: var(--muted);
}
.tag-img-display-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.tag-img-assign-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}
.tag-img-assign-section label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
.tag-img-assign-section select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
.tag-img-user-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
  background: var(--bg);
}
.tag-img-user-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.tag-img-user-item:hover {
  background: var(--bg-soft);
}
.tag-img-user-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.tag-img-user-item span {
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tag-img-sidebar-video-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

/* ===================== 商城 & 背包 ===================== */

/* 弹窗顶部导航：返回按钮固定左上角，标题居中 */
.modal-nav-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 12px 8px;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}
.modal-nav-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.modal-nav-spacer {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
/* 返回按钮：视觉尺寸 32×32（与原关闭按钮一致），热区扩展至 44×44 */
.modal-back-btn {
  position: relative;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.15s;
}
.modal-back-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}
.modal-back-btn:hover { background: var(--hover-bg); }
.modal-back-btn::before {
  content: '';
  position: absolute;
  inset: -6px; /* 32 + 6×2 = 44px 点击热区 */
}

/* 商城/背包 — 物品类别分区 Tab（头像框 / 背景图） */
.item-cat-tabs {
  display: flex;
  gap: 10px;
  padding: 14px 16px 4px;
}
.item-cat-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.item-cat-tab:hover {
  border-color: #3B82F6;
  color: #3B82F6;
}
.item-cat-tab.active {
  background: #3B82F6;
  border-color: #3B82F6;
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.28);
}
.item-cat-count {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--border-soft);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}
.item-cat-tab.active .item-cat-count {
  background: rgba(255, 255, 255, 0.22);
}

/* 购买成功 — 「立即使用 / 稍后在背包中使用」选择弹窗 */
.purchase-apply-box {
  max-width: 340px;
  text-align: center;
  padding: 26px 24px 22px;
}
.purchase-apply-icon {
  font-size: 34px;
  line-height: 1;
  margin-bottom: 6px;
}
.purchase-apply-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.purchase-apply-preview-wrap {
  width: 108px;
  height: 108px;
  margin: 0 auto 12px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.purchase-apply-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.purchase-apply-preview.is-frame {
  /* 头像框为环形贴图，用 contain 完整展示 */
  object-fit: contain;
  padding: 8px;
}
.purchase-apply-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.purchase-apply-cat {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.purchase-apply-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  padding: 16px;
}

/* ===================== 商城全屏页面 ===================== */
.shop-page-body {
  margin: 0;
  padding: 0;
  background: var(--bg-soft);
  min-height: 100vh;
}
.shop-page-main {
  max-width: 540px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--card);
  box-shadow: 0 0 40px rgba(0,0,0,0.06);
}
.shop-page-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  padding-top: max(14px, env(safe-area-inset-top));
  background: var(--card);
  border-bottom: 1px solid var(--border-soft);
}
.shop-page-back {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s;
}
.shop-page-back:hover { background: var(--border-soft); }
.shop-page-back svg { width: 20px; height: 20px; }
.shop-page-title {
  flex: 1;
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
  text-align: center;
}
.shop-page-coins {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  color: #92400E;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
}
.shop-page-grid {
  padding: 12px;
}
.shop-card {
  background: var(--bg-card, var(--bg-soft));
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
}
.shop-card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--bg-soft);
}
.shop-card-info {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.shop-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shop-card-price {
  font-size: 13px;
  color: #F5A623;
  font-weight: 700;
}
.shop-card-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 8px;
  background: #3B82F6;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
}
.shop-card-btn:hover { background: #2D6BE6; }
.shop-card-btn:disabled {
  background: var(--border-soft);
  color: var(--muted);
  cursor: not-allowed;
}
/* 火花装扮"去使用"按钮样式 — 可点击的已购买状态 */
.shop-card-btn.owned:not(:disabled) {
  background: var(--primary-light);
  color: var(--primary);
}
.shop-card-btn.owned:not(:disabled):hover {
  background: var(--primary);
  color: #fff;
}

/* 装扮使用 — 好友选择列表 */
.costume-friend-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}
.costume-friend-item:hover {
  background: var(--bg-soft);
}
.costume-friend-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-soft);
}
.costume-friend-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.costume-friend-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.costume-friend-arrow {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex-shrink: 0;
}

/* 背包 */
.backpack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  padding: 16px 0;
}
.backpack-card {
  background: var(--bg-soft);
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid transparent;
  text-align: center;
  position: relative;
}
.backpack-card.equipped {
  border-color: #3B82F6;
}
.backpack-card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.backpack-card-name {
  font-size: 12px;
  color: var(--text);
  padding: 6px 4px 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.backpack-card-btn {
  display: block;
  width: 100%;
  padding: 6px;
  border: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: #3B82F6;
  color: #fff;
}
.backpack-card-btn:hover { background: #2D6BE6; }
.backpack-card-btn.equipped {
  background: #e74c3c;
  color: #fff;
}
.backpack-card-btn.equipped:hover {
  background: #c0392b;
}
.backpack-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #3B82F6;
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 8px;
}
.tag-img-search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  margin-bottom: 8px;
  box-sizing: border-box;
}
.tag-img-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}
@media (max-width: 768px) {
  .tag-img-layout {
    flex-direction: column;
  }
  .tag-img-sidebar {
    flex: none;
  }
  .tag-img-sidebar-list {
    max-height: 250px;
  }
}

/* ---------- 页面标题 ---------- */
.page-head {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin: 8px 0 18px;
}

/* ---------- 布局 ---------- */
.container { max-width: 100%; margin: 0 auto; padding: 20px 16px 110px; min-height: 100vh; }
body.desktop-mode .container { padding: 28px 24px 110px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-soft);
  padding: 22px;
  margin-bottom: 16px;
}
.card h2 {
  font-size: 17px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.card h3 { font-size: 15px; margin: 14px 0 10px; }

/* 无边框卡片：一体化设计 */
.card-flat {
  border: none;
  box-shadow: none;
  background: transparent;
  padding: 0;
  margin-bottom: 0;
}
.card-flat > h2 {
  font-size: 22px;
  font-weight: 800;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 20px;
  letter-spacing: .5px;
}
.card-flat > h2 .muted {
  font-size: 14px;
  font-weight: 400;
}

/* ---------- 一体化表单增强 ---------- */
.card-flat .form-stack input,
.card-flat .form-stack select,
.card-flat .form-stack textarea {
  background: var(--card);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.card-flat .form-stack input:focus,
.card-flat .form-stack select:focus,
.card-flat .form-stack textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .15);
  background: var(--card-2);
}
.card-flat .form-stack input::placeholder { color: var(--muted); }
.card-flat .field-label {
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 2px;
}
.card-flat .field-label .muted { font-weight: 400; }
.card-flat .chips .chip {
  background: var(--card);
  border: 1.5px solid var(--border-soft);
}
.card-flat .chips .chip:hover {
  border-color: var(--primary-light);
  background: var(--card-2);
}
.card-flat #preview h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}
.card-flat .hint {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

/* ---------- 职位标签 ---------- */
.pos-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.pos-super    { background: #3A2010; color: #FF8C00; border: 1px solid #CC7000; }
.pos-ops      { background: #0F2B3D; color: #4A90D9; border: 1px solid #2A6FAF; }
.pos-ops-lead { background: #3D1A2E; color: #FF69B4; border: 1px solid #CC5599; }
.pos-plan     { background: #0F2D1A; color: #4CAF50; border: 1px solid #2E7D32; }
.pos-owner    { background: #2D1A0A; color: #C17B3C; border: 1px solid #8B4513; }
.pos-regular  { background: #1E1E26; color: #888898; border: 1px solid #33333F; }
.pos-internal { background: #1A0F2E; color: #9b59b6; border: 1px solid #6c3483; }

.pos-none     { background: var(--bg-soft); color: var(--muted); border: 1px solid var(--border); }

/* ---------- 用户等级徽章 ---------- */
.level-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
  vertical-align: middle;
}
.level-1 { background: linear-gradient(135deg, #FACC15, #F59E0B); color: #1a1a00; }
.level-2 { background: linear-gradient(135deg, #6B7280, #4B5563); color: #fff; }
.level-3 { background: #2A2A36; color: #888898; border: 1px solid #3A3A48; }

/* ---------- 表单 ---------- */
.form-stack label { display: block; margin-bottom: 12px; font-size: 14px; color: var(--text-soft); }
.form-stack input, .form-stack select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
/* 确保 hidden 属性的 input 不被 display:block 覆盖 */
.form-stack input[hidden] { display: none !important; }
.form-stack textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  resize: vertical;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.form-stack input:focus, .form-stack select:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--card-2);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .18);
}
.form-stack textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--card-2);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .18);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-actions { display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; }

/* ---------- 按钮 ---------- */
.btn-primary, .btn-plain, .btn-danger, .btn-mini {
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-size: 15px;
  cursor: pointer;
  transition: filter .15s, transform .05s, background .15s;
}
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; box-shadow: 0 2px 8px rgba(37, 99, 235, .25); }
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 4px 16px rgba(37, 99, 235, .3); }
.btn-primary:active { transform: scale(.98); }
.btn-plain { background: var(--bg-soft); color: var(--text-soft); }
.btn-plain:hover { background: var(--border); }
.btn-danger { background: #3A1A18; color: var(--bad); }
.btn-danger:hover { background: #4A211E; }
.btn-mini { padding: 6px 14px; font-size: 13px; border-radius: 8px; background: var(--bg-soft); }
.btn-mini:hover { background: var(--border); }
.btn-mini.primary { background: var(--primary-bg); color: var(--primary-light); }
.btn-mini.danger { background: #3A1A18; color: var(--bad); }
.btn-mini.danger:hover { background: #4A211E; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 退出登录按钮：圆形紫色 ---------- */
.btn-logout {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter .15s, transform .05s;
  box-shadow: 0 2px 12px rgba(37, 99, 235, .3);
  flex-shrink: 0;
}
.btn-logout:hover { filter: brightness(1.1); }
.btn-logout:active { transform: scale(.92); }
.btn-logout svg { width: 18px; height: 18px; }

/* ---------- 微信风格个人页 ---------- */
.wx-profile-header {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  background: transparent;
}
.wx-profile-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  position: relative;
  z-index: 1;
}

/* 头像 */
.wx-avatar-wrap {
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}
.wx-avatar {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  border: 3px solid var(--card);
  box-shadow: var(--shadow-md);
  transition: transform .15s;
  user-select: none;
  overflow: hidden;
}
.wx-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.wx-avatar-wrap:hover .wx-avatar { transform: scale(1.04); }
.wx-avatar-edit {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--card);
  box-shadow: var(--shadow);
}
.wx-avatar-edit svg { width: 14px; height: 14px; }

/* 信息区 */
.wx-profile-info {
  flex: 1;
  min-width: 0;
  padding-top: 4px;
}
.wx-profile-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wx-profile-qq {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

/* 详情列表 */
.wx-info-list { padding: 4px 0; }
.wx-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
}
.wx-info-item:last-child { border-bottom: none; }
.wx-info-label {
  font-size: 14px;
  color: var(--muted);
}
.wx-info-value {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

/* ---------- 头像编辑器弹窗 ---------- */
.avatar-editor { padding: 4px 0; }
.avatar-preview-wrap {
  display: flex;
  justify-content: center;
  padding: 12px 0 20px;
}
.avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  font-size: 36px;
  border: none;
  box-shadow: var(--shadow-md);
}
.avatar-section { margin-bottom: 18px; }
.avatar-section .field-label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

/* 文字选择 */
.avatar-chars {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.avatar-char-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, transform .1s;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- 账号管理条例弹窗 ---------- */
.rules-modal-box {
  max-width: 560px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border-radius: 20px;
  background: var(--card);
  color: var(--text);
}
.rules-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.rules-modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.rules-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  color: var(--text-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
  flex-shrink: 0;
}
.rules-modal-close:hover {
  background: var(--text-soft);
  color: #fff;
}
.rules-modal-close svg {
  width: 18px;
  height: 18px;
}
.rules-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 24px;
  -webkit-overflow-scrolling: touch;
}

/* ---------- 主题模式选择弹窗 ---------- */
.theme-modal-box {
  max-width: 380px;
  width: 90%;
  padding: 0;
  overflow: hidden;
  border-radius: 20px;
  background: var(--card);
  color: var(--text);
}
.theme-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.theme-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  color: var(--text-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
  flex-shrink: 0;
}
.theme-modal-close:hover {
  background: var(--text-soft);
  color: #fff;
}
.theme-modal-close svg {
  width: 18px;
  height: 18px;
}
.theme-modal-options {
  padding: 12px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.theme-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--bg-soft);
  border: 2px solid transparent;
}
.theme-option:hover {
  background: var(--card-2);
  border-color: var(--border);
}
.theme-option.active {
  border-color: var(--primary);
  background: var(--primary-bg);
}
.theme-option-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-soft);
}
.theme-option-icon svg {
  width: 20px;
  height: 20px;
}
.theme-option.active .theme-option-icon {
  color: var(--primary);
  background: var(--primary-bg);
}
.theme-option-label {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.theme-option-check {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.theme-option-check svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
}
.rules-section {
  margin-bottom: 24px;
}
.rules-section:last-child {
  margin-bottom: 0;
}
.rules-section h4 {
  font-size: 17px;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-bg);
}
.rules-section p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-soft);
  margin: 0 0 10px;
}
.rules-section ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.rules-section ul li {
  position: relative;
  padding: 8px 0 8px 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  border-bottom: 1px solid var(--border-soft);
}
.rules-section ul li:last-child {
  border-bottom: none;
}
.rules-section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.6;
}
.rules-section ul li strong {
  color: var(--text);
}
.rules-footer {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}
.avatar-char-btn:hover { border-color: var(--primary-light); }
.avatar-char-btn.active {
  border-color: var(--primary);
  background: var(--primary-bg);
  transform: scale(1.05);
}
.avatar-custom-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 15px;
}
.avatar-custom-input:focus {
  outline: none;
  border-color: var(--primary);
}

/* 颜色选择 */
.avatar-colors {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
}
.avatar-color-btn {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform .1s, border-color .15s;
  padding: 0;
}
.avatar-color-btn:hover { transform: scale(1.12); }
.avatar-color-btn.active {
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--primary);
  transform: scale(1.1);
}

/* 头像 Tab 切换 */
.avatar-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border-soft);
}
.avatar-tab {
  flex: 1;
  padding: 10px 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color .15s;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.avatar-tab:hover { color: var(--text); }
.avatar-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.avatar-tab-content { animation: fadeIn .2s ease; }

/* 图片选择网格 */
.avatar-image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-height: 240px;
  overflow-y: auto;
}
.avatar-image-option {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid transparent;
  cursor: pointer;
  transition: border-color .15s, transform .1s;
  position: relative;
}
.avatar-image-option img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-image-option:hover { transform: scale(1.03); }
.avatar-image-option.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

/* ---------- 分段选择（相册上传） ---------- */
.seg { display: inline-flex; border: 1px solid var(--border-soft); border-radius: 999px; overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
.seg-btn {
  padding: 10px 28px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.seg-btn + .seg-btn { border-left: 1px solid var(--border-soft); }
.seg-btn:hover { color: var(--text-soft); background: var(--card-2); }
.seg-btn.active { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; box-shadow: 0 2px 8px rgba(37, 99, 235, .25); }

/* ---------- 信息行 / 徽章 ---------- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; }
.badge-ok { background: #123A2E; color: var(--ok); }
.badge-no { background: #3A1A18; color: var(--bad); }
.badge-warn { background: #3A2E12; color: #F0A020; }
.badge-info { background: #1A2238; color: #6BA0F0; }

/* ---------- 打卡完成数据 ---------- */
.checkin-done-box {
  background: linear-gradient(135deg, var(--card) 0%, var(--card-2) 100%);
  border: 1px solid rgba(45, 212, 168, .12);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.checkin-done-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ok);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.checkin-done-title::before {
  content: '';
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ok), #1FAE89);
  display: inline-flex;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(45, 212, 168, .25);
}
.checkin-done-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
}
.checkin-done-row:last-child { border-bottom: none; padding-bottom: 0; }
.checkin-done-row:first-of-type { padding-top: 0; }
.checkin-done-label { color: var(--muted); min-width: 70px; font-size: 13px; }
.checkin-done-val { font-weight: 600; color: var(--text); }

/* 排行榜内联按钮 */
.rank-inline-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 12px;
  border: 1px solid var(--primary-bg);
  border-radius: 999px;
  background: var(--primary-bg);
  color: var(--primary-light);
  font-size: 12px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.rank-inline-btn:hover {
  background: #2E2848;
  border-color: var(--primary-light);
}
.rank-inline-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-color: var(--primary);
  color: #fff;
}

/* ---------- 导出月度打卡记录 ---------- */
#export-month-section {
  text-align: center;
  padding: 20px 24px;
}
#export-month-section h2 {
  margin-bottom: 4px;
}
#export-month-section #btn-export-month-pdf {
  min-width: 200px;
}
#export-month-section #btn-export-month-pdf:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---------- 预览 ---------- */
.preview-box {
  background: linear-gradient(135deg, var(--card) 0%, var(--card-2) 100%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px 22px;
  font-size: 14px;
  box-shadow: var(--shadow);
}
.preview-box .row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.preview-box .row:last-child { border-bottom: none; }
.preview-box .k { color: var(--muted); font-size: 13px; }
.preview-box .v { font-weight: 600; color: var(--text); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
table.list th, table.list td { padding: 10px 10px; text-align: left; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
table.list th { color: var(--muted); font-weight: 600; background: var(--bg); }
table.list tr:last-child td { border-bottom: none; }
table.list tr:hover td { background: var(--primary-bg); }
table.list .num { text-align: right; font-variant-numeric: tabular-nums; }

/* 用户状态徽章（管理后台） */
.ban-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.ban-badge.active {
  background: #e8f8f0;
  color: #27ae60;
  border: 1px solid #a3e4c1;
}
.ban-badge.banned {
  background: #fdecea;
  color: #e74c3c;
  border: 1px solid #f5b7b1;
}

/* ---------- Tab 标签 ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tab-btn {
  padding: 7px 16px;
  border: 1.5px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  color: var(--muted);
  transition: background .15s, border-color .15s, color .15s;
}
.tab-btn:hover { border-color: var(--primary-light); color: var(--primary); }
.tab-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .2);
}

/* 后台导航栏红点 badge */
.tab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e74c3c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 2px 4px rgba(231, 76, 60, .4);
  pointer-events: none;
}
#admin-tabs .tab-btn {
  position: relative;
}

/* 排行榜 Tab */
#rank-tabs .tab-btn {
  background: var(--primary-bg);
  border-color: var(--primary-bg);
  color: var(--primary-light);
}
#rank-tabs .tab-btn:hover {
  background: #2E2848;
  border-color: var(--primary-light);
}
#rank-tabs .tab-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-color: var(--primary);
  color: #fff;
}

/* （奖台样式已移至排行榜弹窗区域） */

/* ---------- 提示 ---------- */
.hint { color: var(--muted); font-size: 13px; margin-top: 8px; }
.ok-text { color: var(--ok); }
.bad-text { color: var(--bad); }
.error-box { color: var(--bad); font-size: 14px; margin-top: 8px; }
.check-list { list-style: none; }
.check-list li { padding: 6px 0; border-bottom: 1px dashed var(--border-soft); }
.check-list li.ok::before { content: "通过 "; color: var(--ok); }
.check-list li.bad::before { content: "失败 "; color: var(--bad); }
.hash-box { background: #1F2937; color: #9FE8C0; padding: 12px 14px; border-radius: var(--radius-sm); overflow-x: auto; font-size: 13px; margin-top: 8px; word-break: break-all; white-space: pre-wrap; }

/* ---------- 统计卡片 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.stat {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
  transition: transform .15s, box-shadow .15s;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat .v { font-size: 24px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.stat .k { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ---------- 弹窗（整页样式） ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: block;
  z-index: 999999;
  padding: 0;
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
  animation: modalIn .18s ease;
}
@keyframes modalIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--card);
  border-radius: 0;
  padding: 28px 24px 120px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: none;
  min-height: 100vh;
  border-left: 1px solid var(--border-soft);
  border-right: 1px solid var(--border-soft);
}
.modal h3 {
  margin-bottom: 18px;
  font-size: 20px;
  font-weight: 700;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
}
.modal-wide { max-width: 900px; }

/* 整页弹窗：底部操作栏粘性置底 */
.modal form .form-actions:last-child,
.modal > .form-actions:last-child {
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, transparent, var(--card) 28%);
  padding: 18px 0 4px;
  margin-top: 24px;
  backdrop-filter: blur(2px);
}

/* ---------- 后台：进度指标行 ---------- */
.progress-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.progress-row input { padding: 8px 10px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 13px; background: var(--bg); }
.progress-row .pr-label { flex: 2; min-width: 0; }
.progress-row .pr-current, .progress-row .pr-target { flex: 1; min-width: 0; }
.act-desc { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

/* 项目图片上传区 */
.proj-img-section { margin-top: 14px; }
.proj-img-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.proj-img-thumb {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.proj-img-thumb img { width: 100%; height: 100%; object-fit: cover; }
.proj-img-del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.proj-img-upload-btn {
  width: 80px;
  height: 80px;
  border: 2px dashed var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s, color .15s;
}
.proj-img-upload-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- 其他 ---------- */
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mt8 { margin-top: 8px; }
.mt16 { margin-top: 16px; }
.btn-link { display: inline-block; text-decoration: none; line-height: 1.4; }
.field { margin-bottom: 12px; }
.field-label { color: var(--text-soft); font-size: 14px; display: block; }
.field-label .req { color: var(--bad); }
.field-err { display: block; color: var(--bad); font-size: 12px; margin-top: 4px; min-height: 0; }

/* ---------- 活动 chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip {
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--primary-light); color: var(--primary); }
.chip.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .2);
}

/* 活动使用量数字 */
.chip-usage {
  font-size: 11px;
  opacity: .7;
  margin-left: 4px;
  font-weight: 400;
}
.chip.active .chip-usage { opacity: .9; }

/* ---------- 项目卡片（QQ频道风格） ---------- */
.qq-section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.qq-section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, var(--primary), var(--primary-light));
  border-radius: 2px;
}

/* 项目广场：网格布局 */
#project-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 600px) {
  #project-list { grid-template-columns: 1fr; }
}

/* 项目卡片：QQ频道风格 */
.project-card {
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 0;
  margin-bottom: 0;
  background: var(--card);
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .15s;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  border-color: var(--primary-light);
  box-shadow: 0 6px 20px rgba(37, 99, 235, .15);
  transform: translateY(-3px);
}
.project-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* 卡片头部：渐变条 + 图标 */
.project-card-banner {
  height: 60px;
  background: linear-gradient(135deg, var(--primary-bg), var(--bg-soft));
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}
.project-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .3);
}
.project-card-banner-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.project-card-badge {
  flex-shrink: 0;
}

/* 卡片内容区 */
.project-card-body {
  padding: 12px 16px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.project-intro {
  font-size: 13px; color: var(--muted); margin-top: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  line-height: 1.5;
}
.project-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: 10px; font-size: 12px;
  border-top: 1px solid var(--border-soft);
}
.project-foot .muted { display: flex; align-items: center; gap: 4px; }
.project-foot .link-text { font-size: 12px; }

.project-detail-title { font-size: 18px; border: none; padding: 0; margin: 12px 0 4px; }
.project-meta { font-size: 13px; margin-bottom: 12px; }
.project-intro-full { font-size: 14px; line-height: 1.7; background: var(--bg); border-radius: var(--radius-sm); padding: 12px 14px; }
.join-box { margin-top: 16px; text-align: center; padding: 18px 0 6px; border-top: 1px dashed var(--border); }

/* 项目图片展示 */
.project-images { margin-top: 16px; }
.project-images h3 { font-size: 14px; margin-bottom: 8px; }
.project-images-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.project-images-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  cursor: pointer;
  transition: transform .15s;
}
.project-images-grid img:hover { transform: scale(1.03); }

/* 管理后台头像图片网格 */
.avatar-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
}
.avatar-admin-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  aspect-ratio: 1;
}
.avatar-admin-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-admin-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.avatar-admin-del:hover { background: var(--bad); }

/* 我的参与项目（横向滚动频道卡片） */
.my-projects-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}
.my-projects-scroll::-webkit-scrollbar { height: 4px; }
.my-projects-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.my-project-mini {
  min-width: 160px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 0;
  background: var(--card);
  cursor: pointer;
  transition: border-color .2s, transform .15s;
  overflow: hidden;
  flex-shrink: 0;
}
.my-project-mini:hover { border-color: var(--primary-light); transform: translateY(-2px); }
.my-project-mini .mpm-banner {
  height: 44px;
  background: linear-gradient(135deg, var(--primary-bg), var(--bg-soft));
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
}
.my-project-mini .mpm-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.my-project-mini .mpm-title {
  font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text);
}
.my-project-mini .mpm-meta {
  font-size: 11px; color: var(--muted); margin-top: 0;
  padding: 8px 12px;
}
.my-projects-empty { color: var(--muted); font-size: 13px; padding: 12px 0; }

/* ---------- 进度条 ---------- */
.progress-item { margin-bottom: 14px; }
.progress-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.progress-track { height: 8px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transition: width .4s ease;
}

/* ---------- 底部导航栏（统一浅色毛玻璃） ---------- */
.island-nav {
  position: fixed;
  left: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  height: 60px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.12);
  display: flex;
  align-items: stretch;
  padding: 6px 8px;
  z-index: 90;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.island-pill {
  position: absolute;
  top: 5px;
  left: 0;
  height: calc(100% - 10px);
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  pointer-events: none;
  transition: transform .25s ease, width .25s ease;
  opacity: 1;
  z-index: 1;
}
.island-item {
  flex: 1;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  border-radius: 999px;
  min-height: 44px;
  min-width: 56px;
  padding: 0 10px;
  transition: color .2s;
}
.island-item svg { width: 20px; height: 20px; }
.island-item:hover { color: var(--primary-light); }
.island-item.active { color: var(--primary); }
.island-item:focus-visible { outline: 2px solid var(--primary); outline-offset: -4px; }

/* ---------- 主页：项目卡片 + 滚动文字 ---------- */
.home-project-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.home-project-banner {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.home-project-banner-placeholder {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-bg), var(--bg-soft));
  color: var(--muted);
  font-size: 14px;
}
.home-project-body { padding: 16px 18px; }
.home-project-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
/* 横向滚动播放文字（跑马灯） */
.marquee-box {
  overflow: hidden;
  position: relative;
  border-radius: 8px;
  background: var(--bg-soft);
  padding: 8px 0;
}
.marquee-track {
  display: inline-block;
  white-space: nowrap;
  animation: marquee-scroll 18s linear infinite;
  font-size: 13px;
  color: var(--text-soft);
  padding-left: 100%;
}
.marquee-track:hover { animation-play-state: paused; }
@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
.home-section-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
}

/* ---------- Toast ---------- */
#toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  background: rgba(30, 28, 46, .95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 14px;
  z-index: 2147483648;
  transition: transform .25s ease;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
}
#toast.show { transform: translateX(-50%) translateY(0); }
#toast.err { background: rgba(231, 76, 60, .95); }

/* ---------- 初始化加载动画 ---------- */
.init-loading {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  z-index: 9999;
}
.init-loading.hidden { display: none; }
.init-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: init-spin 0.7s linear infinite;
}
@keyframes init-spin { to { transform: rotate(360deg); } }

/* ---------- 底部右侧圆形投稿按钮（统一浅色毛玻璃） ---------- */
.fab-submit {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(59, 130, 246, 0.15);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  color: var(--primary);
  cursor: pointer;
  z-index: 91;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.fab-submit:hover {
  transform: scale(1.08);
  background: rgba(59, 130, 246, 0.15);
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.2), 0 2px 8px rgba(0, 0, 0, 0.08);
}
.fab-submit:active { transform: scale(0.95); }
.fab-submit svg { width: 26px; height: 26px; }

/* ---------- 主页模块容器 ---------- */
#module-home .card.card-flat {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
body.desktop-mode #module-home {
  padding-top: 8px;
}

/* ---------- 投稿卡片（主页）— 横排优先，自适应宽度 ---------- */
/* ============================================================
   主页投稿 — 统一瀑布流排列（电脑版与手机版一致）
   ============================================================ */
#home-submissions {
  display: block;
}
#home-submissions-content {
  display: block;
}

/* 统一瀑布流容器 */
.home-unified-grid {
  column-count: 2;
  column-gap: 8px;
}
.home-unified-grid .sub-card {
  break-inside: avoid;
  margin-bottom: 8px;
  display: inline-block;
  width: 100%;
}
.home-unified-grid .sub-card.has-image {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.home-unified-grid .sub-card:not(.has-image) {
  width: 100%;
  max-width: 100%;
}
.home-unified-grid .sub-card-banner img {
  width: 100%;
  max-width: 100%;
  height: auto;
}

/* 平板及更大屏幕：增加列数以充分利用宽度 */
@media (min-width: 769px) {
  .home-unified-grid {
    column-count: 3;
    column-gap: 10px;
  }
  .home-unified-grid .sub-card {
    margin-bottom: 10px;
  }
}
/* 大屏桌面：4列瀑布流 */
@media (min-width: 1200px) {
  .home-unified-grid {
    column-count: 4;
    column-gap: 12px;
  }
}
/* 超大屏：5列 */
@media (min-width: 1600px) {
  .home-unified-grid {
    column-count: 5;
  }
}

/* 手机版微调 */
@media (max-width: 768px) {
  .home-unified-grid {
    column-count: 2;
    column-gap: 6px;
  }
  .home-unified-grid .sub-card {
    margin-bottom: 6px;
  }
  .home-unified-grid .sub-card-images-scroll img {
    width: 90%;
  }
}

/* 旧的分栏布局 CSS 已废弃 — 保留空声明避免残留引用 */
.home-layout-desktop,
.home-text-column,
.home-image-column,
.home-mobile-mixed {
  display: none !important;
}

.sub-card {
  border-radius: 20px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.28s ease;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.10);
}
.sub-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.sub-card:active { transform: translateY(0) scale(0.98); }

/* 图片完整显示，不裁剪 */
.sub-card-banner {
  width: 100%;
  overflow: visible;
  line-height: 0;
  position: relative;
}
/* 图片标题叠加层 — 在图片顶部显示 */
.sub-card-title-overlay {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 10px 12px;
  background: linear-gradient(rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.65) 30%, rgba(0,0,0,0.40) 55%, rgba(0,0,0,0.15) 80%, transparent 100%);
  color: #fff;
  z-index: 2;
  pointer-events: none;
}
.sub-card-banner img {
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
}
.sub-card-images-scroll {
  position: relative;
}
.sub-card-images-scroll img {
  width: 60%;
  height: auto;
  object-fit: contain;
}
.overlay-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.overlay-text {
  font-size: 11px;
  line-height: 1.3;
  opacity: 0.9;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
/* 电脑版：图片高度限制 */
body.desktop-mode .sub-card-banner {
  max-height: 320px;
  overflow: hidden;
}
body.desktop-mode .sub-card-images-scroll {
  max-height: 320px;
  overflow-y: hidden;
}
body.desktop-mode .sub-card-images-scroll img {
  max-height: 320px;
}
body.desktop-mode .overlay-title {
  font-size: 14px;
}
body.desktop-mode .overlay-text {
  font-size: 11px;
}
/* 有图时隐藏 body 文字框，无图时紧凑显示 */
.sub-card.has-image .sub-card-body {
  display: none;
}
.sub-card:not(.has-image) .sub-card-body {
  display: block;
  padding: 14px 16px;
}
.sub-card-img-count {
  z-index: 3;
}

/* 多图横向滚动 — 一排展示多张图，横向滚动 */
.sub-card-images-scroll {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 2px;
  position: relative;
}
.sub-card-images-scroll::-webkit-scrollbar {
  height: 3px;
}
.sub-card-images-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
}
.sub-card-images-scroll img {
  flex: 0 0 auto;
  width: 60%;
  height: auto;
  scroll-snap-align: start;
  display: block;
}

/* ---------- 首页卡片图片加载光效（Shimmer） ---------- */
.sub-card-banner {
  background: linear-gradient(90deg, var(--card-2) 0%, var(--card) 30%, var(--card-2) 60%, var(--card) 100%);
  background-size: 200% 100%;
  animation: img-shimmer 1.8s ease-in-out infinite;
  min-height: 120px;
}
.sub-card-banner.loaded {
  animation: none;
  background: none;
  min-height: 0;
}
.sub-card-banner img {
  opacity: 0;
  transition: opacity 0.5s ease;
}
.sub-card-banner.loaded img {
  opacity: 1;
}
.sub-card-images-scroll {
  background: linear-gradient(90deg, var(--card-2) 0%, var(--card) 30%, var(--card-2) 60%, var(--card) 100%);
  background-size: 200% 100%;
  animation: img-shimmer 1.8s ease-in-out infinite;
  min-height: 120px;
}
.sub-card-images-scroll.loaded {
  animation: none;
  background: none;
  min-height: 0;
}
.sub-card-images-scroll img {
  opacity: 0;
  transition: opacity 0.5s ease;
}
.sub-card-images-scroll.loaded img {
  opacity: 1;
}

/* 卡片内容 */
.sub-card-body { padding: 10px 12px; }
.sub-card:not(:has(.sub-card-banner img)):not(:has(.sub-card-images-scroll img)) .sub-card-body {
  padding: 14px 16px;
}
.sub-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sub-card-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--border-soft, #eee); font-size: 14px; }
.admin-table th { font-weight: 600; color: var(--text-soft, #888); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.admin-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.sub-card-author {
  font-weight: 500;
  color: var(--text-soft);
  font-size: 11px;
  padding: 1px 6px;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
}
.sub-card-channel-badge {
  margin-left: auto;
  font-size: 10px;
  color: var(--primary);
  background: rgba(59, 130, 246, 0.1);
  padding: 2px 10px;
  border-radius: 10px;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(59,130,246,0.15);
}
.sub-card-bookmark {
  display: none !important;
}

.sub-card-push {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--muted);
  transition: color .2s, background .2s;
}
.sub-card-push:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
}
.sub-card-push svg { width: 14px; height: 14px; }

.sub-card-likes {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 999px;
  transition: color .2s, background .2s;
}
.sub-card-likes:hover { background: var(--bg-soft); color: var(--text-soft); }
.sub-card-likes.liked { color: #ff4757; }
.sub-card-likes svg { width: 12px; height: 12px; }
.sub-card-likes .like-count { font-size: 11px; font-weight: 600; }

/* 分享按钮 — 帖子列表卡片操作区最右侧图标 */
.sub-card-share {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--muted);
  cursor: pointer;
  border-radius: 50%;
  transition: color .2s, background .2s;
}
.sub-card-share:hover { background: var(--bg-soft); color: var(--primary); }
.sub-card-share svg { width: 13px; height: 13px; }
.channel-post-meta .sub-card-share { margin-left: 4px; }
.channel-post-meta .sub-card-share svg { width: 14px; height: 14px; }

/* 快捷点赞按钮 — 右下角悬浮，与底部点赞样式一致 */
.sub-card-quick-like {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 3;
  border: 1.5px solid rgba(255,255,255,0.15);
}
.sub-card-quick-like:hover {
  background: rgba(0,0,0,0.5);
  border-color: rgba(255,255,255,0.3);
  transform: scale(1.1);
}
.sub-card-quick-like.liked {
  color: #ff4757;
  background: rgba(255,71,87,0.2);
  border-color: rgba(255,71,87,0.4);
}
.sub-card-quick-like.liked:hover {
  background: rgba(255,71,87,0.3);
  transform: scale(1.1);
}
.sub-card-quick-like svg {
  width: 14px;
  height: 14px;
}

/* ---------- 旧版电脑分栏布局已废弃，统一使用 .home-unified-grid 瀑布流 ---------- */

.sub-card-img-count {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 3px;
}

/* 无图卡片 */
.sub-card-postno {
  font-size: 10px;
  color: var(--muted);
  background: var(--border);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ---------- 投稿弹窗（全屏自适应 + 现代设计） ---------- */
.submit-modal-mask {
  background: rgba(245, 245, 250, 0.95);
  padding: 0 !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.submit-modal-box {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 248, 255, 0.95) 100%);
  color: var(--text);
  margin: 0;
  overflow: hidden;
}
.submit-modal-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background:
    linear-gradient(180deg,
      rgba(59, 130, 246, 0.15) 0%,
      rgba(74, 144, 217, 0.08) 50%,
      transparent 100%);
  pointer-events: none;
  z-index: 0;
}
.submit-modal-box::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background:
    linear-gradient(0deg,
      rgba(59, 130, 246, 0.12) 0%,
      transparent 100%);
  pointer-events: none;
  z-index: 0;
}
.submit-modal-box > * {
  position: relative;
  z-index: 1;
}

/* 投稿弹窗标题栏 */
.submit-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  background: rgba(0, 0, 0, 0.2);
}
.submit-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.5px;
}
.submit-modal-header-right {
  width: 40px;
}
.submit-modal-box .submit-close-btn {
  position: static;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
  z-index: 3;
}
.submit-modal-box .submit-close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}
.submit-modal-box .submit-close-btn svg { width: 22px; height: 22px; }

/* 提交弹窗：可滚动内容区 */
.submit-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px 100px;
  -webkit-overflow-scrolling: touch;
}

/* 投稿表单 - 现代布局 */
.submit-form {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.submit-field {
  position: relative;
}
.submit-field input,
.submit-field textarea {
  width: 100%;
  display: block;
  padding: 16px 18px;
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.5;
}
.submit-field input {
  height: 54px;
}
.submit-field textarea {
  min-height: 140px;
  resize: none;
}

/* 提交按钮：独立悬浮在页面正下方（炫彩光影效果） */
.submit-modal-box .submit-confirm-btn {
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #3B82F6, #4A90D9, #B0B0C0, #3B82F6);
  background-size: 300% 300%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s ease;
  z-index: 10;
  animation: submit-confirm-glow 4s ease infinite;
}
@keyframes submit-confirm-glow {
  0%   { background-position: 0% 50%; box-shadow: 0 4px 20px rgba(59, 130, 246, 0.5), 0 2px 8px rgba(0,0,0,0.3); }
  25%  { background-position: 50% 50%; box-shadow: 0 4px 24px rgba(74, 144, 217, 0.55), 0 2px 8px rgba(0,0,0,0.3); }
  50%  { background-position: 100% 50%; box-shadow: 0 4px 20px rgba(176, 176, 192, 0.5), 0 2px 8px rgba(0,0,0,0.3); }
  75%  { background-position: 50% 50%; box-shadow: 0 4px 24px rgba(74, 144, 217, 0.55), 0 2px 8px rgba(0,0,0,0.3); }
  100% { background-position: 0% 50%; box-shadow: 0 4px 20px rgba(59, 130, 246, 0.5), 0 2px 8px rgba(0,0,0,0.3); }
}
.submit-modal-box .submit-confirm-btn:hover {
  transform: translateX(-50%) scale(1.1);
  box-shadow: 0 6px 28px rgba(59, 130, 246, 0.6), 0 2px 8px rgba(0,0,0,0.3);
}
.submit-modal-box .submit-confirm-btn:active {
  transform: translateX(-50%) scale(0.92);
}
.submit-modal-box .submit-confirm-btn svg { width: 28px; height: 28px; }
/* 表单元素：现代卡片风格 */
.submit-modal-box input,
.submit-modal-box textarea {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
  text-align: left;
}
.submit-modal-box input:focus,
.submit-modal-box textarea:focus {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(255,255,255,0.12);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  outline: none;
}
.submit-modal-box input::placeholder,
.submit-modal-box textarea::placeholder {
  color: rgba(255,255,255,0.35);
}
.submit-modal-box .seg-btn {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s ease;
}
.submit-modal-box .seg-btn.active {
  background: rgba(59, 130, 246, 0.4);
  color: #fff;
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}
.submit-modal-box .seg-btn:hover:not(.active) {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.submit-modal-box .image-grid-add {
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.4);
}
.submit-modal-box .image-grid-add:hover {
  border-color: rgba(255,255,255,0.35);
  color: rgba(255,255,255,0.6);
}
.submit-modal-box .hashtag-preview {
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 12px;
  margin-top: -8px;
}
.submit-modal-box .image-grid-picker {
  margin: 0 auto;
}
.submit-modal-box .submit-display-options {
  text-align: center;
  padding: 4px 0;
}
.submit-modal-box .submit-display-options .field-label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.3px;
}
.submit-modal-box .submit-owner-select {
  text-align: center;
  padding: 4px 0;
}
.submit-modal-box .submit-owner-select select {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 15px;
  width: 100%;
  max-width: 320px;
  cursor: pointer;
  transition: border-color .2s ease;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.submit-modal-box .submit-owner-select select:focus {
  border-color: rgba(59, 130, 246, 0.6);
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.submit-modal-box .submit-owner-select label {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  display: block;
  margin-bottom: 8px;
}
@media (max-width: 600px) {
  .submit-modal-box .submit-confirm-btn {
    width: 56px;
    height: 56px;
  }
  .submit-modal-box .submit-confirm-btn svg {
    width: 26px;
    height: 26px;
  }
  .submit-field textarea {
    min-height: 120px;
  }
  .submit-form {
    gap: 16px;
  }
  .submit-modal-body {
    padding: 20px 16px 90px;
  }
}
/* 正方形图片添加按钮 — 田字格 2×2 网格 */
.submit-image-grid .image-grid-picker {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}
.image-grid-add-square {
  width: 100%;
  aspect-ratio: 1;
  border: 2px dashed rgba(255,255,255,0.2);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255,255,255,0.4);
  transition: all .25s ease;
  background: rgba(255,255,255,0.04);
  gap: 6px;
}
.image-grid-add-square:hover {
  border-color: rgba(59, 130, 246, 0.6);
  color: rgba(59, 130, 246, 0.8);
  background: rgba(59, 130, 246, 0.08);
  transform: scale(1.02);
}
.image-grid-add-square svg {
  width: 36px;
  height: 36px;
}
.image-grid-add-square span {
  font-size: 13px;
  color: inherit;
}
.submit-image-grid .image-grid-item {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ---------- 目的地选择 ---------- */
.dest-select-box {
  max-width: 420px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.dest-select-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}
.dest-select-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.dest-back-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s;
}
.dest-back-btn:hover { background: var(--text-soft); color: #fff; }
.dest-back-btn svg { width: 18px; height: 18px; }
.dest-search-wrap {
  position: relative;
  padding: 12px 16px;
  flex-shrink: 0;
}
.dest-search-icon {
  position: absolute;
  left: 26px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-soft);
  pointer-events: none;
}
.dest-search-input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  box-sizing: border-box;
  outline: none;
  transition: border-color .2s;
}
.dest-search-input:focus {
  border-color: var(--primary);
}
.dest-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0 12px;
}
.dest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: none;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background .15s;
}
.dest-item:hover { background: var(--border); }
.dest-item-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3B82F6, #4A90D9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}
.dest-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dest-item-name {
  font-size: 15px;
  font-weight: 500;
}
.dest-item-sub {
  font-size: 12px;
  color: var(--text-soft);
}

/* ---------- 投稿详情弹窗 ---------- */
.sub-detail-box {
  max-width: 100%;
  width: 100%;
  max-height: 100vh;
  min-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  border-radius: 0;
  background: var(--bg);
  box-shadow: none;
  margin: 0;
}
/* 移动端：铺满屏幕 */
@media (max-width: 767px) {
  .sub-detail-box {
    max-width: 100%;
    width: 100%;
    max-height: 100vh;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
  }
  .sub-detail-body {
    padding: 20px 16px 100px;
  }
  .sub-detail-title {
    font-size: 20px;
  }
  .sub-detail-images {
    padding: 0 16px;
  }
  .sub-detail-image-item {
    width: 85%;
    height: 280px;
  }
}
/* 桌面端：全屏覆盖、正文居中限宽 */
@media (min-width: 768px) {
  .sub-detail-box {
    margin: 0;
  }
  .sub-detail-body {
    padding: 28px 32px 100px;
    max-width: 760px;
    margin: 0 auto;
  }
  .sub-detail-title {
    font-size: 24px;
  }
  .sub-detail-images {
    padding: 0 32px;
    max-width: 760px;
    margin: 0 auto;
  }
  .sub-detail-images-wrap.single-image .sub-detail-images {
    padding: 20px 20px 0;
  }
}
.sub-detail-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--text-soft);
  border: 1px solid var(--border);
  position: sticky;
  top: 12px;
  left: 12px;
  margin: 12px 0 0 12px;
  cursor: pointer;
  transition: all .15s;
  z-index: 10;
}
.sub-detail-close:hover {
  background: var(--card-2);
  color: var(--text);
  border-color: var(--primary);
}
.sub-detail-close svg {
  width: 20px;
  height: 20px;
}
.sub-detail-images-wrap {
  position: relative;
  padding: 0 0 20px;
}
/* 共享元素放大动画的飞行图层（从卡片图片放大、移动到详情页图片位置） */
.hero-zoom-img {
  object-fit: cover;
  pointer-events: none;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform, opacity;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}
.sub-detail-body { padding: 24px 24px 80px; }
.sub-detail-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 12px;
  line-height: 1.45;
}
.sub-detail-content {
  font-size: 15px;
  color: var(--text);
  line-height: 1.7;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.sub-detail-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  padding: 12px 0 0;
  margin-bottom: 8px;
}
.sub-detail-author { font-weight: 600; color: var(--text-soft); }
.go-author-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.go-author-home-btn:hover {
  border-color: var(--primary);
  background: rgba(59,130,246,0.1);
}

/* 作者主页弹窗 */
/* ======== 用户个人主页（全新美化版） ======== */
.author-profile-modal .ap-modal {
  position: relative;
  max-width: 500px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--bg);
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
}
.ap-back-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 20;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.35);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s, transform 0.2s;
}
.ap-back-btn:hover { background: rgba(0,0,0,0.5); transform: scale(1.08); }
.ap-back-btn svg { width: 20px; height: 20px; }

/* Hero 背景区 */
.ap-hero {
  height: 180px;
  width: 100%;
  position: relative;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}
.ap-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(0,0,0,0.08) 0%,
    rgba(0,0,0,0.12) 35%,
    rgba(0,0,0,0.3) 65%,
    rgba(0,0,0,0.55) 88%,
    rgba(0,0,0,0.7) 100%);
}

/* 头像 + 信息区 */
.ap-body {
  text-align: center;
  padding: 0 20px 16px;
  margin-top: -56px;
  position: relative;
  z-index: 10;
}
.ap-avatar-wrap {
  width: 88px;
  height: 88px;
  margin: 0 auto 10px;
  border-radius: 50%;
  border: 4px solid var(--bg);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.ap-hero-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.ap-hero-avatar-text {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  font-size: 34px;
  font-weight: 700;
  color: #fff;
}
.ap-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.ap-tags { margin-bottom: 10px; }
.ap-position-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--bg-soft);
  padding: 3px 10px;
  border-radius: 12px;
}
.ap-tag-image {
  display: inline-block;
  height: 28px;
  width: auto;
  vertical-align: middle;
  margin-left: 4px;
  border-radius: 6px;
}
.ap-tag-video {
  display: inline-block;
  height: 28px;
  width: auto;
  vertical-align: middle;
  margin-left: 4px;
  border-radius: 6px;
  object-fit: cover;
}

/* 头像框 */
/* 统一头像框 — 所有页面通用
   画布编辑器 300x300，头像占位直径=200px (2/3 比例)
   显示端 overlay = 150% 头像尺寸，头像占 frame 的 2/3，与编辑器一致 */
.avatar-frame-overlay {
  position: absolute;
  top: -25%;
  left: -25%;
  width: 150%;
  height: 150%;
  pointer-events: none;
  object-fit: fill;
  z-index: 5;
}
.avatar-frame-wrap {
  position: relative;
  display: inline-block;
  overflow: visible;
  margin: 0 auto 10px;
}
.avatar-frame-wrap .ap-avatar-wrap {
  border: 0;
  margin: 0;
}

/* ============================================================
   头像框 — transform 居中缩放方案（最精确可靠）
   原理：头像框图片 = 300x300px（编辑器画布大小）
   头像在画布中 = 200px直径，居中
   显示端：头像框图片居中放在头像容器上，从中心缩放
   缩放比例 = 显示头像直径 / 200
   ============================================================ */

/* 作者资料弹窗头像框 — 头像88px → 缩放=88/200=0.44 */
.avatar-frame-wrap.ap-frame-wrap .avatar-frame-overlay {
  position: absolute;
  top: 50% !important;
  left: 50% !important;
  width: 300px !important;
  height: 300px !important;
  transform: translate(-50%, -50%) scale(0.44) !important;
  transform-origin: center center !important;
  pointer-events: none;
  object-fit: fill !important;
  z-index: 5;
  display: block !important;
  max-width: none !important;
  max-height: none !important;
}

/* 我的页面头像框包裹器 — 包裹器=头像尺寸，框从中心缩放溢出 */
.my-avatar-frame-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0;
  z-index: 2;
  overflow: visible;
  display: block;
  flex-shrink: 0;
}
.my-avatar-frame-wrap.has-frame .my-profile-avatar {
  border: 0;
  box-shadow: none;
}
/* 我的页面头像框 — 头像120px → 缩放=120/200=0.6 */
.my-avatar-frame-wrap.has-frame .avatar-frame-overlay {
  position: absolute;
  top: 50% !important;
  left: 50% !important;
  width: 300px !important;
  height: 300px !important;
  transform: translate(-50%, -50%) scale(0.6) !important;
  transform-origin: center center !important;
  pointer-events: none;
  object-fit: fill !important;
  z-index: 5;
  display: block !important;
  max-width: none !important;
  max-height: none !important;
}

/* 统计数据 */
.ap-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 14px;
}
.ap-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px;
}
.ap-stat-num {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.ap-stat-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.ap-stat-sep {
  width: 1px;
  height: 24px;
  background: var(--border-soft);
}

/* 关注按钮 */
.ap-follow-btn {
  display: inline-block;
  padding: 8px 28px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 20px;
  border: none;
  background: #3B82F6;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 8px;
}
.ap-follow-btn:hover { background: #2D6BE6; transform: translateY(-1px); }
.ap-follow-btn.following {
  background: var(--bg-soft);
  color: var(--text-soft);
}
.ap-spark-btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border: 1px solid #FF8C00;
  border-radius: 20px;
  background: transparent;
  color: #FF8C00;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 8px;
  margin-left: 8px;
}
.ap-spark-btn:active { transform: scale(0.96); }
.ap-meta-line {
  font-size: 12px;
  color: var(--muted);
}

/* 帖子列表 */
.ap-posts {
  padding: 16px 20px;
  border-top: 1px solid var(--border-soft);
}
.ap-posts-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.ap-no-posts {
  text-align: center;
  color: var(--muted);
  padding: 24px 0;
  font-size: 14px;
}
.ap-private-notice {
  text-align: center;
  padding: 32px 20px;
}
.ap-posts-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ap-post-card {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: 10px;
  background: var(--bg-soft);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.ap-post-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.ap-post-card:active {
  transform: translateY(0);
}
.ap-post-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  background-color: var(--border-soft);
}
.ap-post-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ap-post-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ap-post-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* 底部固定操作栏 — 固定在屏幕最下端 */
.sub-detail-footer-actions {
  position: fixed;
  bottom: 0;
  left: 0;
  transform: none;
  width: 100%;
  max-width: 100%;
  background: var(--bg);
  border-top: 1px solid var(--border-soft);
  z-index: 99999999;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
  border-radius: 0;
}

/* 圆形按钮行 */
.sub-detail-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 8px 16px;
}

/* 圆形按钮通用样式 */
.sub-detail-actions-row .circle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  position: relative;
}
.sub-detail-actions-row .circle-btn:hover {
  border-color: var(--primary);
  background: var(--bg);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}
.sub-detail-actions-row .circle-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* 点赞按钮 — 主页卡片风格 SVG 心形 */
.sub-detail-actions-row .sub-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.sub-detail-actions-row .sub-like-btn:hover {
  background: var(--bg-soft);
  color: var(--text-soft);
}
.sub-detail-actions-row .sub-like-btn svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}
.sub-detail-actions-row .sub-like-btn:hover svg {
  transform: scale(1.15);
}
.sub-detail-actions-row .sub-like-btn.liked {
  color: var(--bad);
  border-color: rgba(231, 76, 60, 0.3);
}
.sub-detail-actions-row .sub-like-btn.liked:hover {
  background: rgba(231, 76, 60, 0.08);
}
.sub-detail-actions-row .sub-like-btn .like-count {
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

/* 举报按钮 */
.sub-detail-actions-row .sub-report-btn {
  color: var(--muted);
}
.sub-detail-actions-row .sub-report-btn:hover {
  border-color: #ff4757;
  color: #ff4757;
}

/* 举报按钮 — 文本样式（与点赞按钮大小一致） */
.sub-report-text-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.sub-report-text-btn:hover {
  border-color: #ff4757;
  color: #ff4757;
  background: var(--bg);
}

/* 详情页收藏按钮（与点赞按钮大小一致） */
.sub-detail-actions-row .sub-bookmark-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.sub-detail-actions-row .sub-bookmark-btn:hover {
  background: var(--bg-soft);
  color: var(--primary);
}
.sub-detail-actions-row .sub-bookmark-btn svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}
.sub-detail-actions-row .sub-bookmark-btn:hover svg {
  transform: scale(1.15);
}
.sub-detail-actions-row .sub-bookmark-btn.bookmarked {
  color: #fdcb6e;
  border-color: rgba(253, 203, 110, 0.3);
}
.sub-detail-actions-row .sub-push-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.08);
  cursor: pointer;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.sub-detail-actions-row .sub-push-btn:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--accent);
}
.sub-detail-actions-row .sub-push-btn svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}
.sub-detail-actions-row .sub-push-btn:hover svg {
  transform: scale(1.15);
}

/* 详情页分享按钮（与收藏按钮大小一致） */
.sub-detail-actions-row .sub-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.sub-detail-actions-row .sub-share-btn:hover {
  background: var(--bg-soft);
  color: var(--primary);
  border-color: var(--primary);
}
.sub-detail-actions-row .sub-share-btn svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}
.sub-detail-actions-row .sub-share-btn:hover svg {
  transform: scale(1.15);
}

/* 关注按钮 */
.sub-detail-actions-row .follow-btn {
  color: var(--muted);
}
.sub-detail-actions-row .follow-btn.following {
  color: var(--primary);
  border-color: var(--primary);
}
.sub-detail-actions-row .follow-btn.following svg {
  fill: var(--primary);
}
.sub-detail-actions-row .follow-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* 分割线 */
.sub-detail-actions-row .sub-action-divider {
  width: 1px;
  height: 28px;
  background: var(--border-soft);
  flex-shrink: 0;
}

/* 评论输入框 — 固定在底部操作栏最下方，胶囊形状 */
.sub-detail-footer-actions .comments-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-soft);
  padding: 6px 6px 6px 16px;
  border-top: 1px solid var(--border-soft);
  border-radius: 999px;
  margin: 6px 12px 10px;
  position: relative;
  bottom: 0;
  z-index: 2;
}

.sub-like-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.sub-like-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.sub-like-btn.liked {
  background: linear-gradient(135deg, #ff4757, #ff3860);
  border-color: transparent;
  color: #fff;
}
.sub-like-btn.liked:hover {
  background: linear-gradient(135deg, #ff3860, #ff2450);
  color: #fff;
}
.sub-like-btn svg { width: 20px; height: 20px; }

/* ---------- 举报按钮 ---------- */
.sub-report-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.sub-report-btn:hover {
  border-color: #ff4757;
  color: #ff4757;
  background: var(--bg);
  transform: translateY(-1px);
}
.sub-report-btn svg { width: 16px; height: 16px; }

/* ---------- 举报弹窗 ---------- */
.report-modal-box {
  max-width: 420px;
  padding: 28px 24px;
}
.report-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  text-align: center;
}
.report-modal-hint {
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 16px;
}
.report-reasons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.report-reason-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 14px;
  color: var(--text);
}
.report-reason-item:hover {
  border-color: var(--primary);
  background: var(--bg-soft);
}
.report-reason-item input[type="radio"] {
  accent-color: var(--primary);
}
.report-reason-input {
  width: 100%;
  min-height: 60px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
  margin-bottom: 16px;
}
.report-reason-input:focus {
  outline: none;
  border-color: var(--primary);
}
.report-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ---------- 评论举报按钮 ---------- */
.comment-report-btn {
  font-size: 11px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s;
}
.comment-report-btn:hover {
  color: #ff4757;
  background: var(--bg-soft);
}

/* ---------- 管理后台举报列表 ---------- */
.report-item {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  margin-bottom: 10px;
}
.report-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.report-type {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-soft);
  color: var(--text-soft);
}
.report-time {
  font-size: 12px;
  color: var(--muted);
}
.report-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 6px;
}
.report-reason {
  font-size: 13px;
  color: var(--text);
  padding: 8px 10px;
  background: var(--bg-soft);
  border-radius: 6px;
  margin-bottom: 10px;
}
.report-actions {
  display: flex;
  gap: 8px;
}
.btn-plain.btn-sm {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
}
.report-actions .btn-sm {
  font-size: 12px;
  padding: 4px 12px;
}
.tag-warn {
  background: #fff3cd;
  color: #856404;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.tag-ok {
  background: #d4edda;
  color: #155724;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.tag-muted {
  background: #e2e3e5;
  color: #383d41;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

/* ---------- 投稿须知按钮 ---------- */
.sub-detail-rules-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px dashed var(--border);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 16px;
}
.sub-detail-rules-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg);
}

/* ---------- 投稿须知弹窗 ---------- */
.rules-modal-box {
  max-width: 560px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 32px 28px;
}
.rules-modal-box h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 20px;
  text-align: center;
}
.rules-section {
  margin-bottom: 20px;
}
.rules-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  padding-left: 12px;
  border-left: 3px solid var(--primary);
}
.rules-section p, .rules-section li {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-soft);
  margin-bottom: 4px;
}
.rules-section ul {
  padding-left: 20px;
  margin: 0;
}
.rules-section .rules-warn {
  color: var(--bad);
  font-weight: 600;
}

/* ---------- 首次投稿须知遮罩 ---------- */
.first-submit-rules-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.first-submit-rules-box {
  background: var(--bg);
  border-radius: 16px;
  max-width: 540px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 32px 28px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
}
.first-submit-rules-box h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  margin-bottom: 8px;
}
.first-submit-rules-box .rules-subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}
.first-submit-rules-box .rules-agree-btn {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #3B82F6);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 20px;
  transition: opacity 0.2s;
}
.first-submit-rules-box .rules-agree-btn:hover {
  opacity: 0.9;
}
.first-submit-rules-box .rules-agree-btn:active {
  transform: scale(0.98);
}

/* ---------- 投稿菜单弹窗 ---------- */
.submit-menu-box { max-width: 360px; text-align: center; }
.submit-menu-list { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.submit-menu-btn { padding: 14px; font-size: 16px; }

/* ---------- 号主收件箱 ---------- */
.inbox-box { max-width: 560px; max-height: 80vh; overflow-y: auto; }
.inbox-item {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--bg-soft);
}
.inbox-item-banner { width: 100%; overflow: hidden; }
.inbox-item-banner img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  display: block;
}
.inbox-item-body { padding: 16px 18px; }
.inbox-item-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.inbox-item-summary {
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 8px;
}
.inbox-item-content {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 10px;
  white-space: pre-wrap;
  word-break: break-word;
}
.inbox-item-time {
  font-size: 12px;
  color: var(--muted);
  padding-top: 8px;
  border-top: 1px solid var(--border-soft);
}

/* ---------- 排行榜弹窗 ---------- */
.rank-modal-body { min-width: 280px; }

/* 排行榜头部 */
.rank-header {
  text-align: center;
  padding: 28px 20px 20px;
  background: linear-gradient(135deg, var(--primary-bg), var(--bg-soft));
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.rank-header::before {
  content: '';
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 100px;
  background: radial-gradient(ellipse, rgba(59, 130, 246, .15), transparent 70%);
  pointer-events: none;
}
.rank-header-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(59, 130, 246, .35);
}
.rank-header-icon svg { width: 28px; height: 28px; color: #fff; }
.rank-header-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.rank-header-month {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

/* 奖台容器 */
.podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  padding: 20px 0 0;
  margin-bottom: 8px;
}
.podium-item {
  width: 30%;
  max-width: 180px;
  border-radius: 14px 14px 0 0;
  text-align: center;
  padding: 16px 8px 14px;
  position: relative;
  animation: podiumRise .4s ease backwards;
}
.podium-item.podium-1 { animation-delay: .15s; }
.podium-item.podium-2 { animation-delay: 0s; }
.podium-item.podium-3 { animation-delay: .3s; }
@keyframes podiumRise {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 奖台柱体 */
.podium-1 {
  order: 2; height: 140px;
  background: linear-gradient(180deg, rgba(253, 203, 110, .15), rgba(253, 203, 110, .06));
  border: 1.5px solid rgba(253, 203, 110, .35);
  box-shadow: 0 -4px 24px rgba(253, 203, 110, .12), inset 0 1px 0 rgba(253, 203, 110, .15);
}
.podium-2 {
  order: 1; height: 100px;
  background: linear-gradient(180deg, rgba(178, 190, 195, .12), rgba(178, 190, 195, .05));
  border: 1.5px solid rgba(178, 190, 195, .3);
  box-shadow: 0 -2px 16px rgba(178, 190, 195, .08), inset 0 1px 0 rgba(178, 190, 195, .12);
}
.podium-3 {
  order: 3; height: 80px;
  background: linear-gradient(180deg, rgba(225, 112, 85, .12), rgba(225, 112, 85, .05));
  border: 1.5px solid rgba(225, 112, 85, .3);
  box-shadow: 0 -2px 16px rgba(225, 112, 85, .08), inset 0 1px 0 rgba(225, 112, 85, .12);
}

/* 奖台头像 */
.podium-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  position: relative;
}
.podium-1 .podium-avatar {
  background: linear-gradient(135deg, #FDCB6E, #F0B84A);
  color: #1a1a1a;
  box-shadow: 0 0 0 3px rgba(253, 203, 110, .2), 0 4px 12px rgba(253, 203, 110, .25);
}
.podium-2 .podium-avatar {
  background: linear-gradient(135deg, #B2BEC3, #A0AEB5);
  color: #1a1a1a;
  box-shadow: 0 0 0 3px rgba(178, 190, 195, .15), 0 4px 12px rgba(178, 190, 195, .2);
}
.podium-3 .podium-avatar {
  background: linear-gradient(135deg, #E17055, #C9764A);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(225, 112, 85, .15), 0 4px 12px rgba(225, 112, 85, .2);
}

/* 奖牌图标 */
.podium-medal {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.3));
}

.podium-name {
  font-weight: 700;
  margin-top: 2px;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}
.podium-val {
  font-size: 12px;
  margin-top: 2px;
  opacity: .8;
  font-variant-numeric: tabular-nums;
  color: var(--text-soft);
}
.podium-empty {
  color: var(--muted);
  text-align: center;
  padding: 40px 0;
  font-size: 14px;
}

/* 排行榜总计卡片 */
.rank-total-card {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  text-align: center;
  margin: 12px 0;
}
.rank-total-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.rank-total-val {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

/* 排行榜关闭按钮 */
.rank-close-btn {
  width: 100%;
  padding: 13px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-soft);
  font-size: 15px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  margin-top: 16px;
}
.rank-close-btn:hover {
  background: var(--border);
  border-color: var(--primary-light);
  color: var(--text);
}

/* ---------- 帖子详情评论区 ---------- */
.sub-detail-comments {
  border-top: 1px solid var(--border);
  margin-top: 12px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.comments-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.comments-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 12px;
}
.comment-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.comment-item:last-child {
  border-bottom: none;
}
.comment-avatar {
  flex-shrink: 0;
}
.comment-avatar-img,
.comment-avatar-text {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
}
.comment-avatar-text {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.comment-body {
  flex: 1;
  min-width: 0;
}
.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.comment-nickname {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.comment-time {
  font-size: 11px;
  color: var(--muted);
}
.comment-delete-btn {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s;
}
.comment-delete-btn:hover {
  color: var(--primary);
  background: var(--bg-soft);
}
.comment-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-soft);
  word-break: break-word;
}
/* 评论输入区 — 胶囊形状，手机端固定在评论区底部，键盘弹出时可见 */
.comments-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-soft);
  border-radius: 999px;
  padding: 6px 6px 6px 16px;
  border: 1px solid var(--border);
  transition: border-color 0.2s, box-shadow 0.2s;
  position: sticky;
  bottom: 0;
  z-index: 2;
}
.comments-input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}
.comments-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  resize: none;
  min-height: 20px;
  max-height: 80px;
  outline: none;
  font-family: inherit;
  line-height: 1.5;
  padding: 4px 0;
}
.comments-input::placeholder {
  color: var(--muted);
}
.comments-send-btn {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.comments-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.comments-send-btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 回复指示器 */
.reply-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0 6px;
  font-size: 12px;
  color: var(--primary);
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 6px;
}
.reply-indicator.hidden {
  display: none;
}
.reply-target-name {
  flex: 1;
  font-weight: 600;
  font-size: 13px;
}
.reply-cancel-btn {
  flex-shrink: 0;
  padding: 2px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}
.reply-cancel-btn:hover {
  border-color: var(--bad);
  color: var(--bad);
}

/* 回复列表（缩进） */
.comment-reply {
  margin-left: 42px;
  padding-left: 12px;
  border-left: 2px solid var(--border-soft);
}
.comment-reply .comment-item {
  padding: 8px 0;
}
.comment-reply .comment-avatar-img,
.comment-reply .comment-avatar-text {
  width: 28px;
  height: 28px;
  font-size: 11px;
}
.comment-reply .comment-nickname {
  font-size: 12px;
}

/* 回复按钮 */
.comment-reply-btn {
  font-size: 11px;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s;
}
.comment-reply-btn:hover {
  background: var(--bg-soft);
  text-decoration: underline;
}

/* 回复标签 */
.comment-reply-tag {
  font-size: 11px;
  color: var(--muted);
}
.comment-reply-tag-name {
  color: var(--primary);
  font-weight: 500;
}

/* ---------- 投稿详情头部（作者信息） ---------- */
.sub-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 8px;
  border-top: 1px solid var(--border-soft);
  margin-top: 16px;
  cursor: pointer;
  transition: background 0.12s;
  border-radius: 8px;
  margin-left: -8px;
  margin-right: -8px;
  padding-left: 8px;
  padding-right: 8px;
}
.sub-detail-header:hover {
  background: var(--hover-bg);
}
.sub-detail-header:active {
  background: var(--active-bg);
}
.sub-detail-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.sub-detail-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sub-detail-avatar-text {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}
.sub-detail-author-info {
  flex: 1;
  min-width: 0;
}
.sub-detail-author-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.sub-detail-meta {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.sub-detail-post-no {
  font-family: monospace;
}

/* ---------- 投稿详情多图展示（横向滚动） ---------- */
.sub-detail-images {
  width: 100%;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 24px;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}
.sub-detail-image-item {
  flex: 0 0 auto;
  width: 85%;
  max-width: 480px;
  height: clamp(260px, 42vh, 420px);
  overflow: hidden;
  border-radius: 12px;
}
.sub-detail-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* 单图模式：保留圆角，显示原图比例不裁剪 */
.sub-detail-images-wrap.single-image .sub-detail-images {
  padding: 16px 16px 0;
  display: block;
}
.sub-detail-images-wrap.single-image .sub-detail-image-item {
  width: 100%;
  max-width: none;
  height: auto;
  border-radius: 16px;
  max-height: none;
  overflow: hidden;
}
.sub-detail-images-wrap.single-image .sub-detail-image-item img {
  object-fit: contain;
  width: 100%;
  height: auto;
  max-height: none;
}
/* 滚动条美化 */
.sub-detail-images::-webkit-scrollbar {
  height: 6px;
}
.sub-detail-images::-webkit-scrollbar-track {
  background: var(--bg-soft);
  border-radius: 3px;
}
.sub-detail-images::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
.sub-detail-images::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* ---------- 图片加载光效动画（Shimmer） ---------- */
@keyframes img-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes img-fade-in {
  0%   { opacity: 0; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}

.sub-detail-image-item {
  position: relative;
  background: linear-gradient(
    90deg,
    var(--card-2) 0%,
    var(--card) 30%,
    var(--card-2) 60%,
    var(--card) 100%
  );
  background-size: 200% 100%;
  animation: img-shimmer 1.8s ease-in-out infinite;
}

.sub-detail-image-item img {
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
  transform: scale(0.95);
}

.sub-detail-image-item.loaded {
  animation: none;
  background: none;
}

.sub-detail-image-item.loaded img {
  opacity: 1;
  transform: scale(1);
  animation: img-fade-in 0.5s ease forwards;
}

/* 单图模式兼容 */
.sub-detail-images-wrap.single-image .sub-detail-image-item {
  background: linear-gradient(
    90deg,
    var(--card-2) 0%,
    var(--card) 30%,
    var(--card-2) 60%,
    var(--card) 100%
  );
  background-size: 200% 100%;
  animation: img-shimmer 1.8s ease-in-out infinite;
}
.sub-detail-images-wrap.single-image .sub-detail-image-item.loaded {
  animation: none;
  background: none;
}

/* ---------- 管理端投稿多图展示 ---------- */
.admin-sub-images {
  margin-bottom: 10px;
}

/* ---------- 风险投稿卡片 ---------- */
.risk-review-item {
  border: 1px solid var(--danger);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
  border-left: 4px solid var(--danger);
  background: rgba(255, 71, 87, 0.04);
}
.risk-review-item .risk-badge {
  display: inline-block;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  margin-right: 8px;
}

/* ---------- 账号切换 ---------- */
.account-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.account-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--card-2);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  transition: border-color 0.2s;
}
.account-item.active {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.08);
}
.account-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}
.account-info {
  flex: 1;
  min-width: 0;
}
.account-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.account-qq {
  font-size: 12px;
  color: var(--muted);
}
.account-current-tag {
  display: inline-block;
  font-size: 11px;
  color: var(--primary-light);
  background: rgba(59, 130, 246, 0.15);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 4px;
}
.account-pos {
  font-size: 11px;
  color: var(--text-soft);
  background: var(--border);
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.account-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ---------- 顶部栏（统一浅色） ---------- */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 300;
  box-sizing: border-box;
}
.top-bar-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s;
}
.top-bar-avatar:hover { transform: scale(1.08); }
.top-bar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.top-bar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  text-align: center;
}
.top-bar-menu {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  color: var(--text-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
  padding: 0;
}
.top-bar-menu:hover { background: var(--border); }
.top-bar-menu svg { width: 20px; height: 20px; }

/* 顶部栏右侧占位（包含主题切换按钮，保持搜索框居中） */
.top-bar-right-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* 顶部栏 — 铃铛通知图标 */
.top-bar-bell {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-soft);
  transition: all 0.2s;
  flex-shrink: 0;
}
.top-bar-bell:hover {
  background: var(--bg-soft);
  color: var(--text);
}
.top-bar-bell svg {
  width: 20px;
  height: 20px;
}
.bell-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: #ff4757;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 6px rgba(255, 71, 87, 0.4);
  pointer-events: none;
  box-sizing: border-box;
  line-height: 1;
}

/* 通知下拉面板 */
.notification-panel {
  position: fixed;
  top: 64px;
  right: 16px;
  width: 360px;
  max-width: calc(100vw - 32px);
  max-height: 480px;
  background: var(--card);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: notifIn .15s ease;
}
@keyframes notifIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.notification-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}
.notification-panel-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.notification-mark-all {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.notification-mark-all:hover {
  background: var(--primary-bg);
}
.notification-list {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--border-soft);
}
.notif-item:last-child {
  border-bottom: none;
}
.notif-item:hover {
  background: var(--hover-bg);
}
.notif-item.notif-unread {
  background: var(--primary-bg);
}
.notif-item.notif-unread:hover {
  background: var(--hover-bg);
}
.notif-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}
.notif-icon.notif-follow { color: var(--primary); }
.notif-icon.notif-growth { color: #F59E0B; }
.notif-icon.notif-approve { color: var(--ok); }
.notif-icon.notif-reject { color: var(--bad); }
.notif-body {
  flex: 1;
  min-width: 0;
}
.notif-msg {
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
  word-break: break-word;
}
.notif-time {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.notif-unread .notif-msg {
  font-weight: 600;
}
.notif-unread .notif-msg::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  margin-right: 6px;
  vertical-align: middle;
}

/* 磨砂玻璃 — 通知面板 */

/* 顶部栏搜索框 — 自适应填充 */
.top-bar-search {
  flex: 1;
  margin: 0 16px 0 12px;
  min-width: 0;
  max-width: 100%;
  position: relative;
}
.top-bar-search input {
  width: 100%;
  min-width: 0;
  height: 40px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 14px;
  padding: 0 40px 0 18px;
  outline: none;
  box-sizing: border-box;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.top-bar-search input::placeholder {
  color: rgba(0,0,0,0.25);
}
.top-bar-search input:focus {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
/* 搜索框一键清除按钮 */
.search-clear-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.06);
  color: rgba(0,0,0,0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
  z-index: 2;
}
.search-clear-btn:hover {
  background: rgba(0,0,0,0.12);
  color: rgba(0,0,0,0.6);
}
.search-clear-btn svg {
  width: 16px;
  height: 16px;
}

/* body padding when top bar present */
body.has-top-bar .container { padding-top: 68px; }

/* ---------- 我的页面（统一浅色） ---------- */
body.my-page {
  background: #f5f5fa;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
body.my-page::before {
  display: none;
}
body.my-page .container {
  padding-top: 60px; /* 预留固定顶部栏高度 */
  padding-bottom: 100px;
  position: relative;
  z-index: 1;
}
body.my-page .my-profile-name {
  color: var(--text);
  text-shadow: none;
}
body.my-page .my-profile-sub {
  color: var(--text-soft);
}
body.my-page .wx-info-label {
  color: var(--muted);
}
body.my-page .wx-info-value {
  color: var(--text);
}
body.my-page .wx-info-item {
  border-bottom: 1px solid var(--border);
}
body.my-page .card h3 {
  color: var(--text);
}
body.my-page .card .hint {
  color: var(--muted);
}
body.my-page .my-close-btn {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
/* 我的页面底部管理条例卡片 */
body.my-page #my-rules-card {
  margin-top: 4px;
  border-color: rgba(59, 130, 246, 0.15);
}
body.my-page #my-rules-card .wx-info-label {
  color: var(--primary);
  font-weight: 500;
}
.my-page #my-rules-card {
  border-color: rgba(59, 130, 246, 0.2);
}

/* ============================================================
   我的页面：UI陈列优化（背景渐变、卡片分组视觉）
   ============================================================ */
/* 头部渐变背景装饰 */
body.my-page .my-profile-hero::after {
  display: none;
}
/* 头部分组标题 */
.my-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.5px;
}
.my-section-header::before,
.my-section-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  opacity: 0.4;
}
/* 卡片之间的间距微调 */
body.my-page #my-posts-entry,
body.my-page #my-bookmarks-entry {
  margin-top: 0 !important;
}
body.my-page #my-invite-entry + #my-posts-entry {
  margin-top: 0 !important;
}
/* 卡片组圆角统一 */
body.my-page .card {
  border-radius: 14px;
  margin-left: 16px;
  margin-right: 16px;
}
body.my-page #my-invite-entry {
  border-radius: 14px 14px 14px 14px;
}
body.my-page #my-posts-entry {
  border-radius: 0 0 0 0;
}
body.my-page #my-invite-entry + #my-posts-entry,
body.my-page #my-bookmarks-entry {
  border-radius: 0 0 14px 14px;
}
/* 我的页面：统计栏暗色模式适配 */

/* 我的页面关闭按钮 */
.my-close-btn {
  position: fixed;
  top: calc(60px + 12px);
  left: 14px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 150;
  padding: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: background 0.2s, transform 0.2s;
}
.my-close-btn:hover { background: rgba(255,255,255,0.2); transform: scale(1.08); }
.my-close-btn svg { width: 22px; height: 22px; }

/* 我的页面右上角主题切换按钮（已移除，保留样式占位） */

/* 大头像居中区域 */
.my-profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 150px 20px 24px;
  text-align: center;
  position: relative;
}
.my-profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  cursor: pointer;
  border: 4px solid #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  position: relative;
  z-index: 2;
}
.my-profile-avatar:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.4);
}
.my-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.my-profile-avatar .avatar-edit-hint {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 11px;
  padding: 4px 0;
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.my-profile-avatar:hover .avatar-edit-hint { opacity: 1; }
.my-profile-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-top: 18px;
}
.my-profile-sub {
  font-size: 14px;
  color: var(--text-soft);
  margin-top: 6px;
}
.my-profile-sub span { margin: 0 6px; }

/* ---------- 我的页面：升级账号区域 ---------- */
.my-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.profile-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 16px;
}
#my-upgrade-section { margin-top: 8px; }
#my-more-section { margin-top: 16px; }

/* ---------- 更多面板 ---------- */
.more-modal-box { max-width: 380px; }
.more-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.more-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: none;
  background: var(--card);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 15px;
  color: var(--text);
  transition: background 0.2s;
  text-align: left;
  width: 100%;
}
.more-item:hover { background: var(--border-soft); }
.more-item svg { width: 22px; height: 22px; color: var(--primary); flex-shrink: 0; }
.more-item-text { flex: 1; }
.more-item-value { font-size: 13px; color: var(--text-soft); }

/* 联系管理员信息 */
.contact-info { padding: 8px 0; }
.contact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}
.contact-row:last-child { border-bottom: none; }
.contact-label { font-size: 14px; color: var(--text-soft); }
.contact-value { font-size: 14px; color: var(--text); font-weight: 500; }

/* ---------- 账号切换弹窗 ---------- */
.account-switch-modal .account-list {
  max-height: 360px;
  overflow-y: auto;
}

/* ---------- 九宫格图片选择 ---------- */
.image-grid-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.image-grid-item {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--border);
}
.image-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-grid-cover-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(59, 130, 246, 0.9);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.image-grid-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}
.image-grid-add {
  width: 100%;
  aspect-ratio: 1;
  border: 2px dashed var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  transition: border-color 0.2s, color 0.2s;
}
.image-grid-add:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.image-grid-add svg { width: 28px; height: 28px; }

/* ---------- 搜索弹窗 ---------- */
.search-modal-box {
  max-width: 680px;
  margin: 0 auto;
  border-radius: 0;
  min-height: 100vh;
  padding: 0;
}
.search-modal-header {
  display: flex;
  align-items: center;
  padding: 12px 10px 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  gap: 10px;
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 2;
}
.search-modal-header input {
  flex: 1;
  height: 40px;
  border: none;
  border-radius: 20px;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font-size: 15px;
  padding: 0 16px;
  outline: none;
  box-sizing: border-box;
}
.search-modal-header input::placeholder {
  color: rgba(255,255,255,0.3);
}
.search-modal-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s;
  white-space: nowrap;
}
.search-modal-close:hover {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.8);
}
.search-modal-body {
  padding: 0;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.search-section {
  padding: 12px 16px;
}
.search-section-title {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  margin-bottom: 8px;
  padding-left: 4px;
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 4px;
}
.search-result-item:hover {
  background: rgba(255,255,255,0.06);
}
.search-result-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}
.search-result-avatar img {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  object-fit: cover;
  flex-shrink: 0;
}
.search-result-avatar span {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.search-result-thumb {
  width: 60px;
  height: 45px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
.search-result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.search-result-info {
  flex: 1;
  min-width: 0;
}
.search-result-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.search-result-sub {
  font-size: 12px;
  color: rgba(0,0,0,0.45);
}
.search-result-item-with-btn {
  display: flex;
  align-items: center;
  gap: 10px;
}
.search-follow-btn,
.search-join-btn {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.search-follow-btn:hover,
.search-join-btn:hover {
  background: var(--primary);
  color: #fff;
}
.search-follow-btn.following {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  opacity: 0.8;
}
.search-follow-btn:disabled,
.search-join-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- 井号标签 ---------- */
.hashtag {
  color: #4a9eff;
  font-weight: 500;
}
.hashtag-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.hashtag-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  color: var(--primary);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
}
.hashtag-chip.matched {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--primary);
}
.hashtag-chip.unmatched {
  color: var(--muted);
  background: var(--border);
  border-color: var(--border-soft);
}
.sub-card-activities {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.sub-card-activity-tag {
  font-size: 11px;
  color: var(--primary);
  background: rgba(59, 130, 246, 0.08);
  padding: 2px 8px;
  border-radius: 8px;
}

/* ---------- QQ 频道风格：横向滚动胶囊 ---------- */
.channel-page {
  padding: 0;
}
.channel-scroll-wrapper {
  padding: 12px 0 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.channel-scroll-wrapper::-webkit-scrollbar {
  display: none;
}
.channel-scroll-list {
  display: inline-flex;
  gap: 8px;
  padding: 0 12px;
}
.channel-scroll-item {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  transition: all .2s;
  min-width: 0;
}
.channel-scroll-item:hover {
  background: var(--card-2);
  border-color: var(--primary);
}
.channel-scroll-item:active {
  transform: scale(0.98);
}
.channel-scroll-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.channel-scroll-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.channel-scroll-avatar-text {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.channel-scroll-avatar.create {
  background: linear-gradient(135deg, #3B82F6, #4A90D9);
  font-size: 18px;
  color: #fff;
}
.channel-action-item {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(74, 144, 217, 0.05)) !important;
  border-color: var(--primary) !important;
}
.channel-scroll-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1;
  white-space: nowrap;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 频道主黄橙色渐变动画标签 */
.channel-creator-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #FACC15, #F97316, #FACC15, #F97316);
  background-size: 300% 300%;
  animation: creator-tag-glow 3s ease infinite;
  vertical-align: middle;
  margin-left: 4px;
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.4);
}
@keyframes creator-tag-glow {
  0%   { background-position: 0% 50%; box-shadow: 0 0 8px rgba(250, 204, 21, 0.4); }
  25%  { background-position: 50% 50%; box-shadow: 0 0 12px rgba(249, 115, 22, 0.6); }
  50%  { background-position: 100% 50%; box-shadow: 0 0 8px rgba(250, 204, 21, 0.4); }
  75%  { background-position: 50% 50%; box-shadow: 0 0 12px rgba(249, 115, 22, 0.6); }
  100% { background-position: 0% 50%; box-shadow: 0 0 8px rgba(250, 204, 21, 0.4); }
}

.channel-create-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  margin-top: 8px;
  border-radius: var(--radius-sm);
  border: 1.5px dashed var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
  width: 100%;
}
.channel-create-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(59, 130, 246, 0.05);
}
.channel-create-btn svg { width: 18px; height: 18px; }

/* ---------- 精选频道帖子（与主页卡片风格一致） ---------- */
.channel-featured-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  padding: 16px 12px 8px;
}
.channel-featured-posts {
  padding: 0 12px 8px;
}
.channel-featured-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
@media (max-width: 900px) {
  .channel-featured-grid {
    gap: 8px;
  }
}
@media (max-width: 600px) {
  .channel-featured-grid {
    gap: 6px;
  }
}
/* 电脑版模式 */
body.desktop-mode .channel-featured-grid {
  gap: 14px;
}
/* 图片投稿：按实际尺寸显示，不裁剪 */
.channel-featured-grid .sub-card.has-image {
  width: fit-content;
  max-width: 400px;
  min-width: 150px;
  align-self: flex-start;
}
/* 文字投稿：紧凑显示，不拉伸 */
.channel-featured-grid .sub-card:not(.has-image) {
  width: fit-content;
  max-width: 200px;
  overflow: visible;
  align-self: flex-start;
}
@media (max-width: 900px) {
  body.desktop-mode .channel-featured-grid {
    gap: 12px;
  }
  .channel-featured-grid .sub-card.has-image {
    max-width: 360px;
    min-width: 140px;
  }
}
@media (max-width: 600px) {
  body.desktop-mode .channel-featured-grid {
    gap: 10px;
  }
  .channel-featured-grid .sub-card.has-image {
    max-width: 300px;
    min-width: 120px;
  }
  .channel-featured-grid .sub-card:not(.has-image) {
    max-width: 160px;
  }
}
/* 手机版（非电脑模式）：两列瀑布流排列 */
@media (max-width: 768px) {
  body:not(.desktop-mode) .channel-featured-grid {
    column-count: 2;
    column-gap: 6px;
    display: block;
  }
  body:not(.desktop-mode) .channel-featured-grid .sub-card {
    break-inside: avoid;
    margin-bottom: 6px;
    display: inline-block;
    width: 100%;
  }
  body:not(.desktop-mode) .channel-featured-grid .sub-card.has-image {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  body:not(.desktop-mode) .channel-featured-grid .sub-card-banner img {
    width: 100%;
    max-width: 100%;
  }
  body:not(.desktop-mode) .channel-featured-grid .sub-card-images-scroll img {
    width: 90%;
  }
}

/* 频道中的帖子卡片 — 与主页投稿卡片风格一致 */
.channel-post {
  border-radius: 10px;
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.channel-post:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.channel-post:active { transform: translateY(0); }
.channel-post.has-image .channel-post-body {
  display: none;
}
.channel-post:not(.has-image) .channel-post-body {
  display: block;
  padding: 10px 12px;
}
.channel-post-banner {
  width: 100%;
  overflow: visible;
  line-height: 0;
  position: relative;
  background: linear-gradient(90deg, var(--card-2) 0%, var(--card) 30%, var(--card-2) 60%, var(--card) 100%);
  background-size: 200% 100%;
  animation: img-shimmer 1.8s ease-in-out infinite;
  min-height: 120px;
}
.channel-post-banner.loaded {
  animation: none;
  background: none;
  min-height: 0;
}
.channel-post-banner img {
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.channel-post-banner.loaded img {
  opacity: 1;
}
.channel-post-images-scroll {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 2px;
  position: relative;
  background: linear-gradient(90deg, var(--card-2) 0%, var(--card) 30%, var(--card-2) 60%, var(--card) 100%);
  background-size: 200% 100%;
  animation: img-shimmer 1.8s ease-in-out infinite;
  min-height: 120px;
}
.channel-post-images-scroll.loaded {
  animation: none;
  background: none;
  min-height: 0;
}
.channel-post-images-scroll::-webkit-scrollbar {
  height: 3px;
}
.channel-post-images-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
}
.channel-post-images-scroll img {
  flex: 0 0 auto;
  width: 60%;
  height: auto;
  scroll-snap-align: start;
  display: block;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.channel-post-images-scroll.loaded img {
  opacity: 1;
}
.channel-post-body { padding: 8px 10px; }
.channel-post-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.channel-post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}
.channel-post-author {
  font-weight: 600;
  color: var(--text-soft);
}
.channel-post-time {
  color: var(--muted);
  flex-shrink: 0;
}

/* 电脑版：图片高度限制，和主页保持一致 */
body.desktop-mode .channel-post-banner {
  max-height: 320px;
  overflow: hidden;
}
body.desktop-mode .channel-post-images-scroll {
  max-height: 320px;
  overflow-y: hidden;
}
body.desktop-mode .channel-post-images-scroll img {
  max-height: 320px;
}
/* 频道精选帖子在电脑版不限制图片高度 */
body.desktop-mode .channel-featured-grid .sub-card-banner {
  max-height: none;
  overflow: visible;
}
body.desktop-mode .channel-featured-grid .sub-card-images-scroll {
  max-height: none;
  overflow-y: visible;
}

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .container { padding: 12px 10px 104px; }
  .login-page { margin: -12px -10px -104px; }
  .card { padding: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .podium { gap: 8px; }
  .podium-item { width: 32%; }
  .podium-1 { height: 120px; }
  .podium-2 { height: 88px; }
  .podium-3 { height: 70px; }
  .podium-avatar { width: 38px; height: 38px; font-size: 14px; }
  .brand-title { font-size: 18px; }
  .checkin-done-label { min-width: 60px; }
  .modal { padding: 20px 14px 110px; border-left: none; border-right: none; }
  .modal h3 { font-size: 18px; }
}
@media (max-width: 400px) {
  .container { padding: 10px 8px 104px; }
  .login-page { margin: -10px -8px -104px; }
  .sub-card-title {
    font-size: 12px;
  }
  .sub-card-body {
    padding: 6px 8px;
  }
  .channel-featured-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- 首次注册欢迎动画 ---------- */
.welcome-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1s ease;
  cursor: pointer;
}
.welcome-overlay.welcome-visible {
  opacity: 1;
}
.welcome-overlay.welcome-fading {
  opacity: 0;
  transition: opacity 0.5s ease;
}
.welcome-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 600px 500px at 30% 30%, rgba(10, 10, 40, 0.95), transparent 60%),
    radial-gradient(ellipse 500px 450px at 70% 20%, rgba(30, 60, 180, 0.35), transparent 55%),
    radial-gradient(ellipse 400px 350px at 60% 80%, rgba(59, 130, 246, 0.25), transparent 50%),
    radial-gradient(ellipse 500px 400px at 20% 70%, rgba(80, 80, 120, 0.2), transparent 55%),
    radial-gradient(ellipse 700px 600px at 50% 50%, rgba(5, 5, 20, 0.85), transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: welcome-drift 8s ease-in-out infinite;
}
@keyframes welcome-drift {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    filter: brightness(1);
  }
  15% {
    transform: scale(1.08) rotate(2deg);
    filter: brightness(1.1);
  }
  30% {
    transform: scale(0.95) rotate(-1.5deg);
    filter: brightness(0.9);
  }
  50% {
    transform: scale(1.05) rotate(1deg);
    filter: brightness(1.15);
  }
  70% {
    transform: scale(0.98) rotate(-2deg);
    filter: brightness(0.95);
  }
  85% {
    transform: scale(1.06) rotate(1.5deg);
    filter: brightness(1.05);
  }
}
.welcome-text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  animation: welcome-fade-up 1.2s ease-out 0.3s both;
}
@keyframes welcome-fade-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.welcome-title {
  font-size: 28px;
  font-weight: 300;
  color: rgba(255,255,255,0.6);
  letter-spacing: 8px;
}
.welcome-brand {
  font-size: 72px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 6px;
  text-shadow:
    0 0 30px rgba(59, 130, 246, 0.5),
    0 0 60px rgba(74, 144, 217, 0.3),
    0 0 100px rgba(59, 130, 246, 0.15);
  animation: welcome-glow-pulse 3s ease-in-out infinite;
}
@keyframes welcome-glow-pulse {
  0%, 100% {
    text-shadow: 0 0 30px rgba(59, 130, 246, 0.5), 0 0 60px rgba(74, 144, 217, 0.3);
  }
  50% {
    text-shadow: 0 0 40px rgba(59, 130, 246, 0.7), 0 0 80px rgba(74, 144, 217, 0.5), 0 0 120px rgba(59, 130, 246, 0.25);
  }
}
.welcome-hint {
  position: absolute;
  bottom: 60px;
  z-index: 1;
  font-size: 14px;
  color: rgba(255,255,255,0.35);
  letter-spacing: 3px;
  animation: welcome-hint-pulse 2s ease-in-out infinite;
}
@keyframes welcome-hint-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.7; }
}

/* ---------- 版本号弹窗（全屏动态光影背景） ---------- */
/* GPU 加速 transform 动画，彻底消除闪烁 */
@keyframes version-bg-drift-1 {
  0%   { transform: translate(0%, 0%); }
  25%  { transform: translate(-15%, -10%); }
  50%  { transform: translate(-25%, -20%); }
  75%  { transform: translate(-10%, -5%); }
  100% { transform: translate(0%, 0%); }
}
@keyframes version-bg-drift-2 {
  0%   { transform: translate(0%, 0%); }
  25%  { transform: translate(20%, 15%); }
  50%  { transform: translate(30%, 25%); }
  75%  { transform: translate(10%, 8%); }
  100% { transform: translate(0%, 0%); }
}
@keyframes version-bg-drift-3 {
  0%   { transform: translate(0%, 0%); }
  25%  { transform: translate(-10%, 20%); }
  50%  { transform: translate(-20%, 30%); }
  75%  { transform: translate(-5%, 10%); }
  100% { transform: translate(0%, 0%); }
}
.version-modal-mask {
  background: #0a0a14;
  padding: 0 !important;
  z-index: 2147483647 !important;
  overflow: hidden !important;
}
.version-modal-bg-layer {
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
  opacity: 0.55;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  perspective: 1000px;
  background: linear-gradient(135deg,
    hsla(210, 70%, 35%, 0.9),
    hsla(270, 60%, 30%, 0.85),
    hsla(0, 0%, 35%, 0.6),
    hsla(0, 0%, 10%, 0.8),
    hsla(210, 70%, 35%, 0.9)
  );
  background-size: 200% 200%;
  animation: version-bg-drift-1 16s linear infinite;
}
.version-modal-bg-layer.layer-2 {
  z-index: 1;
  top: -30%;
  left: -30%;
  width: 160%;
  height: 160%;
  background: linear-gradient(45deg,
    hsla(270, 60%, 30%, 0.7),
    hsla(0, 0%, 10%, 0.7),
    hsla(210, 65%, 32%, 0.7),
    hsla(0, 0%, 38%, 0.5),
    hsla(270, 60%, 30%, 0.7)
  );
  background-size: 200% 200%;
  animation: version-bg-drift-2 20s linear infinite;
  animation-delay: -5s;
}
.version-modal-bg-layer.layer-3 {
  z-index: 2;
  top: -40%;
  left: -20%;
  width: 180%;
  height: 180%;
  background: linear-gradient(225deg,
    hsla(0, 0%, 15%, 0.6),
    hsla(210, 70%, 30%, 0.6),
    hsla(270, 55%, 28%, 0.6),
    hsla(0, 0%, 40%, 0.4),
    hsla(0, 0%, 15%, 0.6)
  );
  background-size: 200% 200%;
  animation: version-bg-drift-3 24s linear infinite;
  animation-delay: -10s;
}
.version-modal-box {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 3;
  pointer-events: auto;
  -webkit-overflow-scrolling: touch;
}
.version-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s;
}
.version-modal-close:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}
.version-modal-close svg {
  width: 20px;
  height: 20px;
}
/* 顶部：版本号区域 */
.version-modal-top {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 60px 20px 20px;
  position: relative;
  z-index: 3;
  min-height: 160px;
}
.version-modal-version {
  position: relative;
  z-index: 1;
  font-size: 56px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 40px rgba(59, 130, 246, 0.4), 0 0 80px rgba(74, 144, 217, 0.2);
  letter-spacing: 2px;
  line-height: 1.2;
}
.version-modal-sub {
  position: relative;
  z-index: 1;
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  margin-top: 6px;
  letter-spacing: 4px;
}

/* 滚动区域：更新内容 + 底部按钮 */
.version-modal-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px 20px 40px;
  position: relative;
  z-index: 3;
  min-height: 0;
}
.version-modal-changelog {
  max-width: 420px;
  margin: 0 auto;
  padding: 20px;
  background: rgba(245, 245, 250, 0.6);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.changelog-title {
  font-size: 15px;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
  margin: 0 0 14px 0;
  letter-spacing: 2px;
}
.changelog-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.changelog-list li {
  position: relative;
  padding: 8px 0 8px 18px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.75);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.changelog-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: rgba(59, 130, 246, 0.7);
  font-size: 16px;
}
.changelog-list li:last-child {
  border-bottom: none;
}
.changelog-loading,
.changelog-empty {
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  padding: 20px 0;
  letter-spacing: 1px;
}
.version-modal-footer {
  padding: 24px 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 3;
}
.version-modal-footer .version-modal-sub {
  margin-top: 0;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
}

/* 版本弹窗 — 申请内测版本按钮 */
.btn-beta-apply {
  display: inline-block;
  padding: 10px 28px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #3B82F6, #93C5FD);
  border: none;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 1px;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}
.btn-beta-apply:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.5);
  background: linear-gradient(135deg, #8B7CF5, #B2ABFF);
}
.btn-beta-apply:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* ---------- 小屏设备适配 ---------- */
@media (max-width: 480px) {
  .version-modal-top {
    padding: 50px 16px 16px;
    min-height: 140px;
  }
  .version-modal-version {
    font-size: 42px;
  }
  .version-modal-sub {
    font-size: 12px;
  }
  .version-modal-scroll {
    padding: 12px 16px 30px;
  }
  .version-modal-changelog {
    padding: 16px;
    border-radius: 12px;
  }
  .changelog-title {
    font-size: 14px;
  }
  .changelog-list li {
    font-size: 13px;
    padding: 6px 0 6px 16px;
  }
  .version-modal-close {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
  }
  .version-modal-close svg {
    width: 18px;
    height: 18px;
  }
  .channel-featured-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- 低端设备/低功耗模式：降低模糊以提升性能 ---------- */
@media (max-width: 360px), (prefers-reduced-motion: reduce) {
  .version-modal-bg-layer {
    filter: blur(30px);
    opacity: 0.4;
  }
  .version-modal-bg-layer.layer-2 {
    filter: blur(30px);
    opacity: 0.3;
  }
  .version-modal-bg-layer.layer-3 {
    filter: blur(30px);
    opacity: 0.25;
  }
  
  body.my-page::before {
    display: none;
  }
  body.my-page .card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.95);
  }
}

/* ---------- 大屏设备优化 ---------- */
@media (min-width: 768px) {
  .version-modal-top {
    padding: 80px 40px 24px;
    min-height: 200px;
  }
  .version-modal-version {
    font-size: 72px;
  }
  .version-modal-scroll {
    padding: 24px 40px 50px;
  }
  .version-modal-changelog {
    max-width: 520px;
    padding: 28px;
  }
}

/* ---------- 频道详情主页 ---------- */
.channel-detail-mask {
  background: rgba(245, 245, 250, 0.95);
  padding: 0 !important;
  z-index: 1000;
}
.channel-detail-box {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  animation: channel-detail-in 0.3s ease-out;
}
@keyframes channel-detail-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.channel-detail-cover {
  position: relative;
  width: 100%;
  height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  flex-shrink: 0;
}
.channel-detail-back {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.3);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background 0.2s;
}
.channel-detail-back:hover {
  background: rgba(0,0,0,0.5);
}
.channel-detail-back svg {
  width: 20px;
  height: 20px;
}
.channel-detail-cover-info {
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 2;
}
.channel-detail-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 3px solid rgba(255,255,255,0.8);
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.channel-detail-avatar-text {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}
.channel-detail-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.channel-detail-meta {
  flex: 1;
  min-width: 0;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}
.channel-detail-name {
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.channel-detail-number {
  font-size: 13px;
  opacity: 0.85;
  margin-top: 2px;
}
.channel-detail-stats {
  display: flex;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.channel-detail-stat {
  font-size: 13px;
  color: var(--muted);
}
.channel-detail-posts {
  flex: 1;
  padding: 12px 16px;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
/* 频道内投稿布局，与主页一致 */
@media (max-width: 900px) {
  .channel-detail-posts {
    gap: 8px;
  }
}
@media (max-width: 600px) {
  .channel-detail-posts {
    gap: 6px;
  }
}
/* 电脑版模式 */
body.desktop-mode .channel-detail-posts {
  gap: 14px;
}
.channel-post.has-image {
  width: fit-content;
  max-width: 400px;
  min-width: 150px;
  align-self: flex-start;
}
.channel-post:not(.has-image) {
  width: fit-content;
  max-width: 200px;
  overflow: visible;
  align-self: flex-start;
}
@media (max-width: 900px) {
  body.desktop-mode .channel-detail-posts {
    gap: 12px;
  }
  .channel-post.has-image {
    max-width: 360px;
    min-width: 140px;
  }
}
@media (max-width: 600px) {
  body.desktop-mode .channel-detail-posts {
    gap: 10px;
  }
  .channel-post.has-image {
    max-width: 300px;
    min-width: 120px;
  }
  .channel-post:not(.has-image) {
    max-width: 160px;
  }
}
/* 手机版（非电脑模式）：两列瀑布流排列 */
@media (max-width: 768px) {
  body:not(.desktop-mode) .channel-detail-posts {
    column-count: 2;
    column-gap: 6px;
    display: block;
  }
  body:not(.desktop-mode) .channel-post {
    break-inside: avoid;
    margin-bottom: 6px;
    display: inline-block;
    width: 100%;
  }
  body:not(.desktop-mode) .channel-post.has-image {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  body:not(.desktop-mode) .channel-post-banner img {
    width: 100%;
    max-width: 100%;
  }
  body:not(.desktop-mode) .channel-post-images-scroll img {
    width: 90%;
  }
}

/* ---------- 频道目的地选择器 ---------- */
.channel-dest-box {
  max-width: 420px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.channel-dest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.channel-dest-header h3 {
  margin: 0;
  font-size: 18px;
}
.channel-dest-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.channel-dest-close:hover {
  background: var(--card-2);
  color: var(--text);
}
.channel-dest-close svg {
  width: 18px;
  height: 18px;
}
.channel-dest-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}
.channel-dest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.15s;
  text-align: left;
}
.channel-dest-item:hover {
  background: var(--card-2);
}
.channel-dest-item:active {
  background: var(--border);
}
.channel-dest-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}
.channel-dest-info {
  flex: 1;
  min-width: 0;
}
.channel-dest-name {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.channel-dest-owner {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* ---------- 频道设置按钮 ---------- */
.channel-detail-settings-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.25);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: background 0.2s;
}
.channel-detail-settings-btn:hover {
  background: rgba(255,255,255,0.4);
}
.channel-detail-settings-btn svg {
  width: 20px;
  height: 20px;
}

/* ---------- 频道设置弹窗 ---------- */
.channel-settings-box {
  max-width: 480px;
  max-height: 85vh;
  min-height: auto;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  margin: 5vh auto;
  border-radius: 16px;
}
.channel-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.channel-settings-header h3 {
  margin: 0;
  font-size: 18px;
}
.channel-settings-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.channel-settings-close:hover {
  background: var(--card-2);
  color: var(--text);
}
.channel-settings-close svg {
  width: 18px;
  height: 18px;
}
.channel-settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.channel-settings-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}
.channel-settings-footer .channel-create-btn {
  width: 100%;
  max-width: 300px;
}
.settings-section {
  margin-bottom: 24px;
}
.settings-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.settings-sub-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.settings-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  background: var(--card);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.settings-input:focus {
  border-color: var(--accent);
}
.settings-input.small {
  width: 80px;
  padding: 8px 10px;
  font-size: 13px;
}
.settings-color {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px;
  cursor: pointer;
  background: none;
}
.settings-avatar-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.settings-avatar-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.settings-preview-text {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}
.settings-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.settings-avatar-options {
  flex: 1;
  min-width: 0;
}
.settings-avatar-field {
  margin-bottom: 10px;
}
.settings-avatar-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}
.settings-upload-btn {
  padding: 8px 16px;
  border: 1px dashed var(--accent);
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.settings-upload-btn:hover {
  background: var(--accent);
  color: #fff;
}
.settings-cover-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.settings-cover-preview-wrapper {
  width: 100%;
  height: 120px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.settings-cover-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   我的页面右上角三点菜单按钮
   ============================================================ */
.my-more-btn {
  position: fixed;
  top: calc(60px + 12px);
  right: 14px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 150;
  padding: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: background 0.2s, transform 0.2s;
}
.my-more-btn:hover { background: rgba(255,255,255,0.2); transform: scale(1.08); }
.my-more-btn svg { width: 22px; height: 22px; }
body.my-page .my-more-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
body.my-page .my-more-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}
body.my-page .my-close-btn {
  color: #fff;
}

/* ============================================================
   我的页面：昵称单独一行 + 小标签单独一行
   ============================================================ */
.my-profile-name-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
  width: 100%;
}
.my-profile-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-top: 0 !important;
  display: block;
}
/* 小标签单独一行 */
.my-profile-tag-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
  width: 100%;
}
.my-profile-tag {
  display: inline-flex;
  align-items: center;
}
/* 小标签行内各标签间距统一（去除各自 margin-left） */
.my-profile-tag-row .pos-tag,
.my-profile-tag-row .level-badge,
.my-profile-tag-row .channel-creator-tag,
.my-profile-tag-row .my-profile-tag-image {
  margin-left: 0;
  margin-right: 0;
}
/* 小标签图片 */
.my-profile-tag-image {
  display: inline-block;
  height: 28px;
  max-width: 120px;
  object-fit: contain;
  border-radius: 6px;
  vertical-align: middle;
}
/* 小标签视频 */
.my-profile-tag-video {
  display: inline-block;
  height: 28px;
  width: auto;
  vertical-align: middle;
  border-radius: 6px;
  object-fit: cover;
}
.my-profile-tag-row .my-profile-tag-video {
  margin-left: 0;
  margin-right: 0;
}
/* 我的页面 — 个人主页背景图（已迁移到 .my-profile-banner） */
/* 我的页面 — 背景横幅（头像上半部分覆盖） */
.my-profile-banner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 210px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-size: cover;
  background-position: center;
  z-index: 0;
  overflow: hidden;
}
.my-profile-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  /* 双层过渡：底部 42% 平滑溶解到页面背景色（背景图→头像区域自然衔接），
     顶层轻柔暗纱保证顶部标题可读性；var(--bg) 自动适配深/浅色模式 */
  background:
    linear-gradient(to bottom,
      transparent 0%,
      var(--bg) 100%) left bottom / 100% 42% no-repeat,
    linear-gradient(to bottom,
      rgba(0,0,0,0.10) 0%,
      rgba(0,0,0,0.12) 40%,
      rgba(0,0,0,0.18) 70%,
      rgba(0,0,0,0.22) 100%) left top / 100% 100% no-repeat;
  pointer-events: none;
}
/* 背景图交叉过渡层：双层交叉淡入淡出（0.4s，自然平滑） */
.my-profile-banner-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.4s ease;
  will-change: opacity;
  pointer-events: none;
}
.my-profile-avatar {
  position: relative;
  z-index: 1;
}
.my-profile-name-row,
.my-profile-tag-row,
.my-profile-qq,
#my-approval-status {
  position: relative;
  z-index: 1;
}
/* 我的页面 — 头像框统一由 .avatar-frame-wrap 处理（见上方统一头像框定义） */
.my-profile-qq {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
  text-align: center;
}

/* ==================== 头像框制作编辑器 ==================== */
.frame-builder {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  min-height: 400px;
}
.frame-sidebar {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 12px;
  max-height: 520px;
  overflow-y: auto;
}
.frame-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  gap: 8px;
  flex-wrap: wrap;
}
.frame-element-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  min-height: 60px;
}
.frame-element-item {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  position: relative;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.1s;
}
.frame-element-item:hover {
  border-color: var(--primary);
  transform: scale(1.05);
}
.frame-element-item:active {
  cursor: grabbing;
}
.frame-element-item img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  pointer-events: none;
}
.frame-element-item .frame-element-del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  font-size: 10px;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.frame-element-item:hover .frame-element-del {
  display: flex;
}
.frame-saved-item {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.frame-saved-item img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  pointer-events: none;
}
.frame-saved-item .frame-saved-del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(220,53,69,0.8);
  color: #fff;
  border: none;
  font-size: 10px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.frame-saved-item:hover .frame-saved-del {
  display: flex;
}
.frame-canvas-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
}
.frame-canvas-wrapper {
  position: relative;
  border-radius: 12px;
  overflow: visible;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  background: 
    linear-gradient(45deg, #eee 25%, transparent 25%),
    linear-gradient(-45deg, #eee 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eee 75%),
    linear-gradient(-45deg, transparent 75%, #eee 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.frame-canvas-wrapper canvas {
  display: block;
  cursor: pointer;
  max-width: 100%;
  height: auto;
}
/* 火花装扮编辑器画布更大一些 */
#sc-canvas-wrapper {
  width: min(520px, 90%);
}
#sc-canvas {
  width: 100%;
  height: auto;
}
.frame-canvas-wrapper canvas.dragging {
  cursor: grabbing;
}
.frame-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

/* 头像框制作 — 用户端实时预览
   几何与用户端完全一致：画布300x300、头像直径200px（2/3），
   显示端 overlay 300px 从中心缩放：120px头像→scale(0.6)，88px头像→scale(0.44) */
.frame-live-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--bg-soft);
}
.flp-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.flp-row {
  display: flex;
  gap: 32px;
  align-items: flex-end;
}
.flp-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.flp-label {
  font-size: 11px;
  color: var(--muted);
}
/* 火花装扮编辑器 — 实时预览容器（与火花页渲染方式一致） */
.sc-preview-container {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto;
}
.sc-preview-container svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
#sc-preview-costume {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}
.flp-avatar {
  position: relative;
  border-radius: 50%;
  flex-shrink: 0;
}
.flp-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.flp-120 { width: 120px; height: 120px; }
.flp-88  { width: 88px;  height: 88px;  }
.flp-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  transform: translate(-50%, -50%) scale(0.6);
  transform-origin: center center;
  pointer-events: none;
  object-fit: fill;
  z-index: 5;
  max-width: none;
  max-height: none;
}
.flp-88 .flp-frame {
  transform: translate(-50%, -50%) scale(0.44);
}
.frame-props-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.frame-prop-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.frame-prop-row input[type="range"] {
  width: 100%;
}
body.dark-mode .frame-canvas-wrapper {
  background: 
    linear-gradient(45deg, #2a2a2a 25%, transparent 25%),
    linear-gradient(-45deg, #2a2a2a 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #2a2a2a 75%),
    linear-gradient(-45deg, transparent 75%, #2a2a2a 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
@media (max-width: 768px) {
  .frame-builder {
    flex-direction: column;
  }
  .frame-sidebar {
    width: 100%;
    max-height: 300px;
  }
  .frame-element-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================================
   我的页面三点菜单弹窗
   ============================================================ */
.my-menu-modal-box {
  max-width: 380px;
  padding: 0 !important;
  overflow: hidden;
  border-radius: var(--radius) !important;
}
.my-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border-soft);
}
.my-menu-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}
.my-menu-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s;
}
.my-menu-close:hover { background: var(--border-soft); }
.my-menu-close svg { width: 18px; height: 18px; }
.my-menu-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.my-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.15s;
  color: var(--text);
}
.my-menu-item:last-child { border-bottom: none; }
.my-menu-item:hover { background: var(--border-soft); }
.my-menu-item-label { font-size: 15px; }
.my-menu-item-arrow { font-size: 18px; color: var(--text-soft); }
.my-menu-item-value { font-size: 13px; color: var(--primary); }
.my-menu-item-danger .my-menu-item-label { color: var(--bad); }
.my-menu-item-danger .my-menu-item-arrow { color: var(--bad); }

/* ============================================================
   我的页面：统计数据栏
   ============================================================ */
.my-stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 16px 20px;
  margin: 0 16px 16px;
  background: rgba(255,255,255,0.06);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
}
.my-stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
}
.my-stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.my-stat-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.my-stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
}
/* 浅色模式适配 */
.my-stats-bar {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.06);
}
.my-stat-divider {
  background: rgba(0,0,0,0.1);
}

/* 我的页面：统计项可点击 */
.my-stat-item {
  cursor: pointer;
  transition: opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.my-stat-item:active {
  opacity: 0.6;
}
.my-stat-item:active {
  opacity: 0.6;
}

/* 粉丝/关注列表弹窗 */
.follow-list-modal .modal {
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.follow-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}
.follow-list-close {
  background: none;
  border: none;
  color: var(--muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s;
}
.follow-list-close:hover {
  background: var(--hover-bg);
}
.follow-list-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.follow-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.12s;
}
.follow-list-item:hover {
  background: var(--hover-bg);
}
.follow-list-item:active {
  background: var(--active-bg);
}
.follow-list-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.follow-list-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.follow-list-avatar span {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}
.follow-list-info {
  flex: 1;
  min-width: 0;
}
.follow-list-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.follow-list-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 浅色模式适配 */
.follow-list-header {
  border-bottom-color: rgba(0,0,0,0.08);
}
.follow-list-item:hover {
  background: rgba(0,0,0,0.03);
}
.follow-list-item:active {
  background: rgba(0,0,0,0.06);
}

/* ============================================================
   我的页面：投稿列表（两列瀑布流）
   ============================================================ */
#my-posts-section { margin-top: 4px; }
.my-posts-title {
  padding: 0 4px;
  margin-bottom: 12px;
}
.my-posts-grid {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.my-posts-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.my-post-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: rgba(255,255,255,0.06);
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
}
.my-post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.my-post-card-img {
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
}
.my-post-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.my-post-card:hover .my-post-card-img img {
  transform: scale(1.05);
}
.my-post-card-info {
  padding: 10px 12px 12px;
  min-width: 0;
}
.my-post-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.my-post-card-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}
/* 浅色模式适配 */
.my-post-card {
  background: rgba(255,255,255,0.85);
  border-color: rgba(0,0,0,0.06);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.my-post-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.my-post-card-img {
  background: rgba(0,0,0,0.03);
}

/* 收藏列表项样式 */
.my-post-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background 0.15s;
  gap: 12px;
}
.my-post-item:last-child {
  border-bottom: none;
}
.my-post-item:hover {
  background: var(--hover-bg);
  margin: 0 -12px;
  padding: 14px 12px;
  border-radius: 8px;
  border-bottom-color: transparent;
}
.my-post-item:last-child:hover {
  border-bottom-color: transparent;
}
.my-post-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.my-post-meta {
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
}

/* ============================================================
   邀请页面 & 设置页邀请入口按钮
   ============================================================ */

/* — 设置页：邀请入口按钮 — */
#my-invite-entry { margin-top: 4px; padding: 0; }
.my-invite-entry-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  padding: 16px;
  cursor: pointer;
  color: var(--text);
  font-size: 15px;
  transition: background 0.15s;
  border-radius: 12px;
}
.my-invite-entry-btn:hover {
  background: var(--hover-bg);
}
.my-invite-entry-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.my-invite-entry-left svg {
  width: 22px;
  height: 22px;
  color: var(--primary);
  flex-shrink: 0;
}
.my-invite-entry-right {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}
.my-invite-entry-right svg {
  width: 16px;
  height: 16px;
}
.my-invite-entry-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 0 6px;
}

/* — 邀请页面（invites.html） — */
.invites-back-btn {
  position: fixed;
  top: 14px;
  left: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.25);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 150;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.invites-back-btn:hover {
  background: rgba(0,0,0,0.4);
  transform: scale(1.08);
}
.invites-back-btn svg {
  width: 20px;
  height: 20px;
}
.invites-hero {
  text-align: center;
  padding: 60px 16px 24px;
}
.invites-hero-icon {
  display: inline-flex;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-bg);
  color: var(--primary);
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.invites-hero-icon svg {
  width: 32px;
  height: 32px;
}
.invites-hero-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
}
.invites-hero-desc {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
#invite-code-card {
  margin-top: 0;
}
.invite-code-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}
.invite-code-label {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}
.invite-code-value {
  flex: 1;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--primary);
  font-family: monospace;
}
#invite-list-section {
  margin-top: 12px;
}
.invite-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.invite-list-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.invite-list-count {
  font-size: 13px;
  color: var(--muted);
}
.invite-list-count strong {
  color: var(--primary);
  font-size: 15px;
}
.invite-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.inviter-header {
  margin-bottom: 12px;
}
.inviter-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.inviter-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(147,51,234,0.08));
  border-radius: 12px;
  border: 1px solid rgba(59,130,246,0.15);
}
.inviter-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.inviter-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.inviter-avatar span {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.inviter-detail {
  flex: 1;
  min-width: 0;
}
.inviter-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.inviter-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.invite-user-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-soft);
  border-radius: 10px;
  transition: background 0.15s;
}
.invite-user-item:hover {
  background: var(--hover-bg);
}
.invite-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}
.invite-user-info {
  flex: 1;
  min-width: 0;
}
.invite-user-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.invite-user-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* 磨砂玻璃模式 — 邀请页面 */

/* 磨砂玻璃 — 设置页入口按钮 hover */

/* ============================================================
   帖子详情页：头部关注按钮（胶囊形，放在作者信息右侧）
   ============================================================ */
.sub-header-follow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.sub-header-follow-btn:hover {
  background: var(--primary);
  color: #fff;
}
.sub-header-follow-btn.following {
  border-color: var(--muted);
  color: var(--muted);
  background: var(--bg-soft);
}

/* ============================================================
   帖子详情页：举报按钮文本圆圈
   ============================================================ */
.report-text-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.5px;
}

/* ===================== 下拉刷新（重写版） ===================== */

/* 刷新提示条 — 默认隐藏在顶部上方 */
.pull-refresh-bar {
  position: relative;
  z-index: 10;
  width: 100%;
  overflow: hidden;
  pointer-events: none;
  will-change: transform;
}

/* 内部内容区 */
.pull-refresh-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

/* 刷新图标 */
.pull-refresh-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--primary);
  transition: transform 0.15s ease;
  will-change: transform;
}

/* 就绪状态 — 图标高亮 */
.pull-refresh-bar.ready .pull-refresh-icon {
  color: #4CAF50;
}

/* 刷新中 — 图标旋转动画 */
.pull-refresh-icon.spinning {
  animation: pullRefreshSpin 0.8s linear infinite;
  color: var(--primary);
}

@keyframes pullRefreshSpin {
  to { transform: rotate(360deg); }
}

/* 刷新中状态 — 提示条背景微光 */
.pull-refresh-bar.refreshing .pull-refresh-bar-inner {
  color: rgba(255,255,255,0.8);
}

/* 提示文字 */
.pull-refresh-text {
  white-space: nowrap;
}

/* 主页容器支持滚动到顶部触发下拉 */
#home-submissions {
  overscroll-behavior: contain;
}

/* 深色磨砂玻璃模式 — 详情页底部固定操作栏 */

/* 浅色磨砂玻璃模式 — 详情页底部固定操作栏 */

/* 浅色模式：顶部栏背景变白 */
.top-bar {
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

/* 浅色模式：我的页面 → 浅灰背景 */
.my-page {
  background: #f5f5fa;
  animation: none;
}
.my-page .card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
.my-page::before {
  display: none;
}



/* 统一浅色：投稿卡片描边 */
.sub-card,
.channel-post,
.channel-featured-grid .sub-card {
  border: 1px solid rgba(0, 0, 0, 0.10);
}
.submit-modal-mask {
  background: rgba(245, 245, 250, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.submit-modal-box::before,
.submit-modal-box::after {
  opacity: 0.3;
}
/* 浅色模式：标题栏 */
.submit-modal-header {
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.submit-modal-title {
  color: var(--text);
}
.submit-modal-box .submit-close-btn {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-soft);
}
.submit-modal-box .submit-close-btn:hover {
  background: rgba(0, 0, 0, 0.12);
}
/* 浅色模式：投稿弹窗表单元素文字颜色修复 */
.submit-form input,
.submit-form textarea {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  color: var(--text);
}
.submit-form input:focus,
.submit-form textarea:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.submit-form input::placeholder,
.submit-form textarea::placeholder {
  color: var(--muted);
}
.submit-modal-box .seg-btn {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-soft);
  border: 1px solid var(--border);
}
.submit-modal-box .seg-btn.active {
  background: var(--primary-bg);
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}
.submit-modal-box .seg-btn:hover:not(.active) {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text);
}
.submit-modal-box .image-grid-add {
  border-color: var(--border);
  color: var(--muted);
}
.submit-modal-box .image-grid-add:hover {
  border-color: var(--text-soft);
  color: var(--text-soft);
}
.submit-modal-box .hashtag-preview {
  background: var(--bg-soft);
}
.submit-modal-box .submit-confirm-btn {
  background: linear-gradient(135deg, #3B82F6, #4A90D9);
  color: #fff;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}
/* 浅色模式：投稿弹窗 select 选择器 */
.submit-modal-box .submit-owner-select select {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  color: var(--text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23555570' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.submit-modal-box .submit-owner-select select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.submit-modal-box .submit-owner-select label {
  color: var(--muted);
}
.submit-modal-box .submit-display-options .field-label {
  color: var(--muted);
}
/* 浅色模式：投稿弹窗图片网格项 */
.submit-modal-box .image-grid-item {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border);
}
.submit-modal-box .image-grid-cover-badge {
  background: var(--primary);
  color: #fff;
}
.submit-modal-box .image-grid-del {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}
/* 浅色模式：图片添加按钮 */
.image-grid-add-square {
  border-color: var(--border);
  color: var(--muted);
  background: rgba(0, 0, 0, 0.02);
}
.image-grid-add-square:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(37, 99, 235, 0.06);
}

/* ============================================================
   深色模式 — 暗夜柔光（类名切换）
   ============================================================ */
/* html.dark-mode: 在 <body> 解析前就生效，防止白屏闪烁 */
html.dark-mode {
  --primary-bg: rgba(59, 130, 246, 0.15);
  --purple-bg: rgba(59, 130, 246, 0.15);
  --primary-light: #60A5FA;
  --purple-light: #60A5FA;
  --bg: #12121a;
  --bg-soft: #1a1a26;
  --card: #1e1e2e;
  --card-2: #252538;
  --text: #e8e8f0;
  --text-soft: #a0a0b8;
  --muted: #6a6a80;
  --border: #2a2a40;
  --border-soft: #222238;
  --hover-bg: rgba(255,255,255,0.04);
  --active-bg: rgba(255,255,255,0.08);
  --shadow: 0 2px 12px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  background: #12121a;
}

body.dark-mode {
  background:
    radial-gradient(ellipse 900px 500px at 50% -80px, rgba(59, 130, 246, 0.06), transparent 60%),
    radial-gradient(ellipse 500px 400px at 80% 90%, rgba(59, 130, 246, 0.03), transparent 50%),
    var(--bg);
}

/* 卡片 */
body.dark-mode .card,
body.dark-mode .card-flat {
  background: var(--card);
  border-color: var(--border);
}

/* 底部导航栏 */
body.dark-mode .island-nav {
  background: rgba(30, 30, 46, 0.85);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
body.dark-mode .island-nav .nav-item {
  color: var(--text-soft);
}
body.dark-mode .island-nav .nav-item.active {
  color: var(--primary-light);
}
body.dark-mode .island-nav .nav-item.active::before {
  background: var(--primary);
}

/* 投稿浮动按钮 */
body.dark-mode .fab-submit {
  background: rgba(30, 30, 46, 0.85);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  color: var(--text);
}
body.dark-mode .fab-submit:hover {
  background: rgba(40, 40, 60, 0.9);
}

/* 顶部栏 */
body.dark-mode .app-top-bar {
  background: rgba(18, 18, 26, 0.85);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
body.dark-mode .top-bar {
  background: rgba(18, 18, 26, 0.85);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
body.dark-mode .top-bar-search input {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
  color: var(--text);
}
body.dark-mode .top-bar-search input::placeholder {
  color: rgba(255,255,255,0.3);
}
body.dark-mode .top-bar-search input:focus {
  background: rgba(255,255,255,0.12);
  border-color: var(--primary);
}
body.dark-mode .top-bar-menu:hover,
body.dark-mode .top-bar-bell:hover {
  background: rgba(255,255,255,0.08);
}
body.dark-mode .search-clear-btn {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.4);
}
body.dark-mode .search-clear-btn:hover {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
}

/* 菜单 */
body.dark-mode .my-menu-modal-content {
  background: var(--card);
}
body.dark-mode .my-menu-item {
  color: var(--text);
}
body.dark-mode .my-menu-item:hover {
  background: var(--hover-bg);
}
body.dark-mode .my-menu-item-value {
  color: var(--text-soft);
}

/* 模态框 */
body.dark-mode .modal-mask {
  background: rgba(0,0,0,0.6);
}
body.dark-mode .modal,
body.dark-mode .modal-box {
  background: var(--card);
  border-color: var(--border);
}
body.dark-mode .modal h3,
body.dark-mode .modal-box h3 {
  color: var(--text);
}
body.dark-mode .modal-close {
  background: var(--bg-soft);
  color: var(--text-soft);
}
body.dark-mode .modal-close:hover {
  background: var(--border);
  color: var(--text);
}

/* 主题模态框 */
body.dark-mode .theme-modal-box {
  background: var(--card);
}
body.dark-mode .theme-modal-header {
  border-bottom-color: var(--border);
}
body.dark-mode .theme-option {
  background: var(--bg-soft);
}
body.dark-mode .theme-option:hover {
  background: var(--card-2);
  border-color: var(--border);
}
body.dark-mode .theme-option.active {
  border-color: var(--primary);
  background: var(--primary-bg);
}

/* 表单输入框 */
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
  background: var(--bg-soft);
  border-color: var(--border);
  color: var(--text);
}
body.dark-mode input:focus,
body.dark-mode select:focus,
body.dark-mode textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
  color: var(--muted);
}

/* 按钮 */
body.dark-mode .btn {
  background: var(--bg-soft);
  color: var(--text);
  border-color: var(--border);
}
body.dark-mode .btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
body.dark-mode .btn-primary:hover {
  background: var(--primary-dark);
}

/* 分段选择器 / Tab */
body.dark-mode .segment {
  background: var(--bg-soft);
}
body.dark-mode .segment-btn {
  color: var(--text-soft);
}
body.dark-mode .segment-btn.active {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* 管理后台顶部栏 */
body.dark-mode .admin-top-bar {
  background: rgba(18, 18, 26, 0.9);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
@media (min-width: 1024px) {
  body.dark-mode .admin-top-bar {
    border-right: 1px solid rgba(255,255,255,0.06);
    border-bottom: none;
  }
  body.dark-mode .admin-top-bar .tab-btn.active {
    border-left-color: var(--primary);
    background: rgba(59, 130, 246, 0.12);
  }
}
body.dark-mode .admin-top-bar .tab-btn {
  color: var(--text-soft);
}
body.dark-mode .admin-top-bar .tab-btn.active {
  color: var(--primary-light);
  border-bottom-color: var(--primary);
}

/* 管理后台表格 */
body.dark-mode .admin-table {
  border-color: var(--border);
}
body.dark-mode .admin-table th {
  background: var(--bg-soft);
  color: var(--text-soft);
  border-bottom-color: var(--border);
}
body.dark-mode .admin-table td {
  border-bottom-color: var(--border-soft);
  color: var(--text);
}
body.dark-mode .admin-table tr:hover td {
  background: var(--hover-bg);
}

/* 统计卡片 */
body.dark-mode .stat-card {
  background: var(--card);
  border-color: var(--border);
}
body.dark-mode .stat-card .stat-value {
  color: var(--text);
}
body.dark-mode .stat-card .stat-label {
  color: var(--text-soft);
}

/* 项目卡片 / 投稿卡片 */
body.dark-mode .project-card {
  background: var(--card);
  border-color: var(--border);
}
body.dark-mode .project-card .project-title {
  color: var(--text);
}
body.dark-mode .project-card .project-desc {
  color: var(--text-soft);
}
body.dark-mode .post-card {
  background: var(--card);
  border-color: var(--border);
}
body.dark-mode .post-card .post-meta {
  color: var(--text-soft);
}

/* 投稿弹窗 */
body.dark-mode .submit-modal-box {
  background: var(--card);
}
body.dark-mode .submit-modal-box .image-grid-item {
  background: rgba(0,0,0,0.3);
  border-color: var(--border);
}
body.dark-mode .submit-modal-box .image-grid-cover-badge {
  background: var(--primary);
  color: #fff;
}
body.dark-mode .submit-modal-box .image-grid-del {
  background: rgba(0,0,0,0.6);
  color: #fff;
}
body.dark-mode .image-grid-add-square {
  border-color: var(--border);
  color: var(--muted);
  background: rgba(0,0,0,0.15);
}
body.dark-mode .image-grid-add-square:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
  background: rgba(37, 99, 235, 0.1);
}

/* 我的页面背景 */
body.dark-mode.my-page {
  background: var(--bg);
}

/* 通知 / 提示 */
body.dark-mode .toast {
  background: rgba(30, 30, 46, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.06);
}

/* 空状态 / 占位文字 */
body.dark-mode .empty-state {
  color: var(--text-soft);
}
body.dark-mode .empty-state .empty-icon {
  color: var(--muted);
}

/* 头像 */
body.dark-mode .avatar-ring {
  border-color: var(--border);
}

/* 加载动画 */
body.dark-mode .init-loading {
  background: rgba(18, 18, 26, 0.8);
}

/* 各种标签 / 徽章 */
body.dark-mode .badge {
  background: var(--bg-soft);
  color: var(--text-soft);
}
body.dark-mode .badge-primary {
  background: var(--primary);
  color: #fff;
}

/* 滚动条 */
body.dark-mode ::-webkit-scrollbar-track {
  background: var(--bg);
}
body.dark-mode ::-webkit-scrollbar-thumb {
  background: var(--border);
}

/* 我的页面头部 */
body.dark-mode .my-profile-avatar {
  box-shadow: 0 0 0 3px var(--border), 0 4px 16px rgba(0,0,0,0.3);
}
body.dark-mode .my-profile-name {
  color: var(--text);
}
body.dark-mode .my-profile-tag {
  color: var(--text-soft);
}

/* 频道列表 */
body.dark-mode .channel-item {
  background: var(--card);
  border-color: var(--border);
}
body.dark-mode .channel-item .channel-name {
  color: var(--text);
}
body.dark-mode .channel-item .channel-meta {
  color: var(--text-soft);
}

/* 评论区 */
body.dark-mode .comment-item {
  border-bottom-color: var(--border-soft);
}
body.dark-mode .comment-item .comment-text {
  color: var(--text);
}
body.dark-mode .comment-item .comment-time {
  color: var(--muted);
}

/* 搜索框 */
body.dark-mode .search-bar {
  background: var(--bg-soft);
  border-color: var(--border);
}
body.dark-mode .search-bar input {
  background: transparent;
  color: var(--text);
}
body.dark-mode .search-bar input::placeholder {
  color: var(--muted);
}

/* 详情页 */
body.dark-mode .detail-header {
  border-bottom-color: var(--border-soft);
}
body.dark-mode .detail-content {
  color: var(--text);
}
body.dark-mode .detail-meta {
  color: var(--text-soft);
}

/* 分类标签页 */
body.dark-mode .category-tabs {
  background: var(--bg-soft);
}
body.dark-mode .category-tab {
  color: var(--text-soft);
}
body.dark-mode .category-tab.active {
  color: var(--text);
  border-bottom-color: var(--primary);
}

/* 模态框内表单 */
body.dark-mode .avatar-grid-item {
  background: var(--bg-soft);
  border-color: var(--border);
}
body.dark-mode .avatar-grid-item:hover {
  border-color: var(--primary-light);
}
body.dark-mode .avatar-grid-item.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

/* 账号切换 */
body.dark-mode .account-switch-item {
  background: var(--card);
  border-color: var(--border);
}
body.dark-mode .account-switch-item:hover {
  border-color: var(--primary-light);
}

/* 通知列表 */
body.dark-mode .notification-item {
  background: var(--card);
  border-bottom-color: var(--border-soft);
}
body.dark-mode .notification-item .notification-title {
  color: var(--text);
}
body.dark-mode .notification-item .notification-time {
  color: var(--muted);
}

/* 全局主题切换浮动按钮已移除 — 主题切换统一由「我的」页面三点菜单管理 */

/* ============================================================
   站内聊天（联系后台管理员）
   ============================================================ */

/* —— 用户端聊天弹窗 —— */
.chat-modal-box {
  max-width: 480px;
  min-height: 0;
  height: 86vh;
  max-height: 720px;
  margin: 1rem auto;
  padding: 0 !important;
  overflow: hidden;
  border-radius: var(--radius) !important;
  border-left: none;
  border-right: none;
  display: flex;
  flex-direction: column;
}
.chat-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
  background: var(--card);
}
.chat-modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.chat-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s;
}
.chat-modal-close:hover { background: var(--border-soft); }
.chat-modal-close svg { width: 18px; height: 18px; }

/* —— 消息区（用户端与管理端共用） —— */
.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-soft);
}
.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 82%;
}
.chat-msg-user { align-self: flex-end; align-items: flex-end; }
.chat-msg-admin { align-self: flex-start; align-items: flex-start; }
.chat-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.55;
  word-break: break-word;
  white-space: pre-wrap;
}
.chat-msg-user .chat-bubble {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg-admin .chat-bubble {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border-soft);
  border-bottom-left-radius: 4px;
}
.chat-msg-time {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

/* —— 输入区（用户端与管理端共用） —— */
.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border-soft);
  flex-shrink: 0;
  background: var(--card);
  align-items: flex-end;
}
.chat-input {
  flex: 1;
  resize: none;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 9px 14px;
  font-size: 14px;
  line-height: 1.4;
  max-height: 96px;
  min-height: 38px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  font-family: inherit;
}
.chat-input:focus { border-color: var(--primary); }
.chat-send-btn {
  flex-shrink: 0;
  border: none;
  background: var(--primary);
  color: #fff;
  border-radius: 18px;
  padding: 9px 18px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.15s;
}
.chat-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* —— 管理端：会话列表 + 聊天窗口 —— */
.chat-admin-wrap {
  display: flex;
  gap: 12px;
  height: 64vh;
  min-height: 400px;
  margin-top: 14px;
}
.chat-conv-list {
  flex: 0 0 262px;
  overflow-y: auto;
  background: var(--card-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chat-conv-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.chat-conv-item:hover { background: var(--hover-bg); }
.chat-conv-item.active { background: var(--primary-bg); }
.chat-conv-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}
.chat-conv-info { flex: 1; min-width: 0; }
.chat-conv-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-conv-pos {
  font-size: 10px;
  color: var(--primary);
  border: 1px solid var(--primary-light);
  background: var(--primary-bg);
  border-radius: 6px;
  padding: 0 4px;
  white-space: nowrap;
}
.chat-conv-last {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.chat-conv-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.chat-conv-unread {
  background: var(--bad);
  color: #fff;
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
  font-size: 11px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.chat-conv-time { font-size: 10px; color: var(--muted); }
.chat-conv-box {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-soft);
}
.chat-conv-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--card);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}
.chat-conv-back {
  display: none;
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--text-soft);
  cursor: pointer;
  padding: 0 4px;
}

/* —— 窄屏：会话列表与聊天窗口上下排列 —— */
@media (max-width: 760px) {
  .chat-admin-wrap { flex-direction: column; height: auto; }
  .chat-conv-list { flex: none; width: 100%; max-height: 40vh; }
  .chat-conv-box { min-height: 55vh; }
  .chat-conv-back { display: inline-flex; }
}

/* ============================================================
   分享面板（复制链接 / 社交平台 / 二维码）
   ============================================================ */
.share-modal-mask {
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.share-panel-box {
  width: 100%;
  max-width: 420px;
  min-height: 0;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-soft);
}
.share-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.share-panel-title {
  margin: 0;
  padding: 0;
  border: none;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.share-panel-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--text-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.share-panel-close:hover { background: var(--border); color: var(--text); }
.share-panel-close svg { width: 16px; height: 16px; }
.share-platforms {
  display: flex;
  justify-content: space-around;
  gap: 8px;
  margin-bottom: 16px;
}
.share-platform {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 6px 4px;
  flex: 1;
}
.share-platform-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}
.share-platform:hover .share-platform-icon { transform: scale(1.08); }
.share-platform-icon svg { width: 26px; height: 26px; }
.share-icon-wechat { background: #07C160; color: #fff; }
.share-icon-qq { background: #12B7F5; color: #fff; }
.share-icon-weibo { background: #E6162D; color: #fff; }
.share-platform-name { font-size: 12px; color: var(--text-soft); }
.share-qr-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.share-qr-box {
  width: 168px;
  height: 168px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.share-qr-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.share-qr-placeholder { font-size: 12px; color: var(--muted); text-align: center; padding: 0 8px; }
.share-qr-tip { font-size: 12px; color: var(--muted); }
.share-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.share-link-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
  padding: 0 12px;
  outline: none;
  box-sizing: border-box;
}
.share-copy-btn {
  flex-shrink: 0;
  height: 40px;
  padding: 0 18px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.share-copy-btn:hover { opacity: 0.9; }

/* 顶部链接复制行（在社交图标上方） */
.share-link-top {
  margin-bottom: 4px;
}
.share-link-top .share-link-input {
  height: 44px;
  font-size: 13px;
  background: var(--bg-soft);
}
.share-link-top .share-copy-btn {
  height: 44px;
  font-size: 14px;
  padding: 0 20px;
}

@media (max-width: 420px) {
  .share-qr-box { width: 148px; height: 148px; }
}

/* ============================================================
   个人主页（my.html）响应式自适应：桌面 / 平板 / 移动端
   ============================================================ */
/* 平板（768-1199px）：增加左右留白，保持舒适阅读 */
@media (min-width: 768px) and (max-width: 1199px) {
  body.my-page .my-section-header { padding-left: 28px; padding-right: 28px; }
}
/* 桌面（≥1200px）：内容限宽 1200px 并居中，卡片/统计栏适度收窄 */
@media (min-width: 1200px) {
  body.my-page .container { max-width: 1200px; margin: 0 auto; }
  body.my-page .my-profile-hero { padding: 140px 24px 28px; }
  body.my-page .my-profile-avatar { width: 140px; height: 140px; font-size: 56px; }
  body.my-page .my-stats-bar { max-width: 640px; margin: 0 auto 20px; }
  body.my-page .my-section-header { max-width: 640px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
  body.my-page .card { max-width: 640px; margin-left: auto; margin-right: auto; }
}
/* 移动端（≤767px）：顶部区域留出顶部栏与操作按钮空间 */
@media (max-width: 767px) {
  body.my-page .my-profile-hero { padding-top: 150px; }
}

/* ============================================================
   顶部导航栏：移动端显示优化
   ============================================================ */
@media (max-width: 480px) {
  .top-bar { padding: 0 12px; }
  .top-bar-avatar { width: 40px; height: 40px; font-size: 16px; }
  .top-bar-search { margin: 0 10px 0 8px; }
  .top-bar-search input { height: 38px; font-size: 13px; }
}

/* ============================================================
   续火花（Spark Renewal）— 火花动画组件 / 分享面板双选项卡 / 火花页
   ============================================================ */

/* ---------- 火花图标（通用组件） ---------- */
.spark-wrap {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.spark-wrap .spark-svg { display: block; }
/* 颜色分级：0=未点亮(灰) 1=橙 2=蓝 3=绿 4=洋红 */
.spark-svg.spark-tier-0 { --spark: #B9B9C9; --spark-glow: #D8D8E4; }
.spark-svg.spark-tier-1 { --spark: #FF8C00; --spark-glow: #FFBE5C; }
.spark-svg.spark-tier-2 { --spark: #2F80F5; --spark-glow: #7CB3FF; }
.spark-svg.spark-tier-3 { --spark: #22C55E; --spark-glow: #7BE0A0; }
.spark-svg.spark-tier-4 { --spark: #E13FD5; --spark-glow: #F18BE8; }

.spark-svg .spark-core {
  fill: var(--spark);
  filter: drop-shadow(0 0 4px var(--spark-glow));
}
.spark-svg .spark-ring {
  fill: none;
  stroke: var(--spark);
  stroke-opacity: 0.35;
  stroke-width: 1.8;
}
.spark-svg .spark-rays {
  transform-origin: 24px 24px;
  animation: spark-spin 14s linear infinite;
}
.spark-svg .spark-rays line {
  stroke: var(--spark);
  stroke-width: 2;
  stroke-linecap: round;
  animation: spark-flicker 1.6s ease-in-out infinite;
}
.spark-svg .spark-rays line:nth-child(odd) { animation-delay: 0.8s; }
.spark-svg.spark-pulse { animation: spark-pulse 2.4s ease-in-out infinite; }

.spark-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: var(--spark);
  box-shadow: 0 0 6px var(--spark-glow);
  opacity: 0;
  animation: spark-orbit 2.4s ease-in-out infinite;
  pointer-events: none;
}
.spark-dot.d2 { animation-delay: 0.8s; }
.spark-dot.d3 { animation-delay: 1.6s; }

@keyframes spark-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes spark-flicker {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}
@keyframes spark-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.08); opacity: 0.92; }
}
@keyframes spark-orbit {
  0%   { transform: rotate(0deg) translateX(var(--dot-dist, 14px)); opacity: 0; }
  12%  { opacity: 0.95; }
  50%  { transform: rotate(180deg) translateX(var(--dot-dist, 14px)); opacity: 0.95; }
  62%  { opacity: 0; }
  100% { transform: rotate(360deg) translateX(var(--dot-dist, 14px)); opacity: 0; }
}

/* 未点亮：静止灰色，不播放动画 */
.spark-svg.spark-tier-0 .spark-rays { animation: none; }
.spark-svg.spark-tier-0 .spark-rays line { animation: none; opacity: 0.5; }
.spark-wrap.spark-unlit .spark-dot,
.spark-svg.spark-tier-0 ~ .spark-dot { display: none; }

/* 尊重系统"减少动态效果"偏好：关闭全部火花动画 */
@media (prefers-reduced-motion: reduce) {
  .spark-svg .spark-rays,
  .spark-svg .spark-rays line,
  .spark-svg.spark-pulse,
  .spark-dot {
    animation: none !important;
  }
  .spark-dot { display: none; }
}

/* ---------- 分享面板：双选项卡（直接链接 / 互相关注者） ---------- */
.share-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-soft);
  border-radius: 12px;
  margin-bottom: 16px;
}
.share-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--text-soft);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.share-tab svg { width: 16px; height: 16px; }
.share-tab.active {
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}
.share-tab-pane { display: none; }
.share-tab-pane.active { display: block; }

.share-mutual-tip {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  line-height: 1.5;
}
.share-mutual-tip b { color: var(--text-soft); font-weight: 600; }
.share-mutual-list { max-height: 252px; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.share-mutual-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 8px;
  border: none;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}
.share-mutual-item:hover { background: var(--bg-soft); }
.share-mutual-item:active { background: var(--active-bg); }
.share-mutual-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 17px;
}
.share-mutual-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.share-mutual-info { flex: 1; min-width: 0; }
.share-mutual-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.share-mutual-status {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.share-mutual-send {
  flex-shrink: 0;
  height: 30px;
  padding: 0 14px;
  border: none;
  border-radius: 15px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.share-mutual-send:hover { opacity: 0.9; }
.share-mutual-send:disabled { opacity: 0.55; cursor: default; }
.share-mutual-empty {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 24px 12px;
  line-height: 1.7;
}
.share-panel-go-spark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-soft);
  font-size: 12px;
  color: var(--primary);
  cursor: pointer;
}
.share-panel-go-spark svg { width: 15px; height: 15px; }
.share-sent-feedback {
  font-size: 12px;
  line-height: 1.6;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--primary-bg);
  color: var(--primary-dark);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.share-sent-feedback .spark-wrap { flex-shrink: 0; }

/* ---------- Spark Renewal 页面 ---------- */
body.spark-page .container { max-width: 640px; margin: 0 auto; padding-bottom: 40px; }
.spark-page-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 14px;
  box-sizing: border-box;
  background: linear-gradient(180deg, rgba(10, 12, 28, 0.75), rgba(10, 12, 28, 0));
  pointer-events: none;
}
.spark-page-left-spacer {
  width: 160px;
  flex-shrink: 0;
}
.spark-page-right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  pointer-events: auto;
}
.spark-page-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}
.spark-page-back {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
}
.spark-page-back svg { width: 20px; height: 20px; }

/* 顶部图标按钮（换背景/装扮/商城/帮助） */
.spark-page-icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background .2s;
  flex-shrink: 0;
}
.spark-page-icon-btn:hover { background: rgba(255, 255, 255, 0.25); }
.spark-page-icon-btn:active { background: rgba(255, 255, 255, 0.28); }
.spark-page-icon-btn svg { width: 19px; height: 19px; }
.spark-page-icon-btn.spark-page-help svg { width: 20px; height: 20px; }

/* 火花页整体星空氛围 */
.spark-hero {
  position: relative;
  background:
    radial-gradient(ellipse 320px 260px at 50% 36%, rgba(90, 60, 220, 0.35), transparent 65%),
    radial-gradient(ellipse 220px 180px at 30% 22%, rgba(59, 130, 246, 0.22), transparent 60%),
    linear-gradient(160deg, #0B0D23 0%, #151A3D 55%, #1B1440 100%);
  color: #EAF0FF;
  padding: 96px 20px 28px;
  text-align: center;
  overflow: hidden;
}
/* 自定义火花背景 */
.spark-hero-custom-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,12,28,0.45) 0%, rgba(10,12,28,0.65) 100%);
  z-index: 0;
  pointer-events: none;
}
.spark-hero-custom-bg > * { position: relative; z-index: 1; }
/* 火花名字按钮 */
.hero-spark-name-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 16px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  background: rgba(255,255,255,0.08);
  color: rgba(234,240,255,0.9);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.hero-spark-name-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.4);
}
.hero-spark-name-btn .hero-spark-name-placeholder {
  color: rgba(234,240,255,0.45);
  font-weight: 400;
}
.spark-hero .spark-wrap { position: relative; z-index: 1; }
.spark-hero-main {
  font-size: 34px;
  font-weight: 800;
  margin-top: 18px;
  background: linear-gradient(90deg, #FFD9A0, #FF8C00 40%, #FFE9C8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 10px rgba(255, 140, 0, 0.35));
}
.spark-hero-count {
  font-size: 13px;
  color: rgba(234, 240, 255, 0.75);
  margin-top: 6px;
  letter-spacing: 0.5px;
}
.spark-hero-points {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 600;
}
.spark-hero-points b { color: #FFD97A; }

.spark-rules {
  margin: 14px 14px 0;
  padding: 13px 16px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  font-size: 12.5px;
  color: var(--text-soft);
  line-height: 1.85;
  box-shadow: var(--shadow);
}
.spark-rules b { color: var(--text); }
.spark-rule-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.spark-rule-title svg { width: 15px; height: 15px; color: var(--primary); }

/* 等级图例 */
.spark-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 14px 0;
}
.spark-legend-item {
  flex: 1;
  min-width: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-soft);
  color: var(--text-soft);
}
.spark-legend-dot { width: 9px; height: 9px; border-radius: 50%; }

/* 互关列表 */
.spark-list-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 16px 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.spark-list-title .spark-count-badge {
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.spark-partner-list { padding: 0 14px; display: flex; flex-direction: column; gap: 10px; }

.spark-partner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
  overflow: hidden;
}
/* 左侧连接线：我 ——— 对方（火花在线上脉动） */
.spark-partner::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--line-color, #3B82F6), transparent);
  opacity: 0.8;
}
.spark-partner::after {
  content: '';
  position: absolute;
  left: 12%;
  top: -1px;
  width: 8px;
  height: 5px;
  border-radius: 50%;
  background: var(--line-color, #3B82F6);
  box-shadow: 0 0 8px var(--line-color, #3B82F6);
  animation: spark-line-travel 3.2s linear infinite;
}
@keyframes spark-line-travel {
  0%   { left: 10%; opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { left: 88%; opacity: 0; }
}
.spark-partner-avatar {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 22px;
  overflow: visible;
}
.spark-partner-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
/* 火花颜色光圈 + 呼吸 */
.spark-partner .ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2.5px solid var(--ring-color, rgba(59, 130, 246, 0.4));
  animation: spark-ring-breathe 2.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes spark-ring-breathe {
  0%, 100% { transform: scale(0.98); opacity: 0.55; }
  50%      { transform: scale(1.06); opacity: 1; }
}
/* 头像右上角火花小标 */
.spark-partner-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  font-size: 15px;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35));
}
.spark-partner-body { flex: 1; min-width: 0; }
.spark-partner-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.spark-partner-name .pos-tag { font-size: 10px; transform: scale(0.92); }
.spark-partner-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
}
.spark-partner-tier {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  margin-top: 6px;
}
.spark-status-words {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}
.spark-partner-action {
  flex-shrink: 0;
  height: 32px;
  padding: 0 14px;
  border: none;
  border-radius: 16px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.spark-partner-action:hover { opacity: 0.9; }
.spark-partner-action:disabled { opacity: 0.55; cursor: default; }

.spark-empty {
  margin: 16px 14px;
  padding: 34px 20px;
  border-radius: 16px;
  background: var(--card);
  border: 1px dashed var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
}
.spark-empty b { color: var(--text); }

/* 合作者无头绪时的提示气泡 */
.spark-loading { text-align: center; padding: 60px 0; color: var(--muted); font-size: 13px; }

@media (max-width: 420px) {
  .spark-partner { padding: 12px; gap: 10px; }
  .spark-partner-avatar { width: 48px; height: 48px; font-size: 20px; }
}



/* ============================================================
   2026-08-29 UI/功能修复综合补丁
   1. 电脑版用户头像框位置修正
   2. 我的 / 设置 / 火花 页面不显示顶部栏 + 对应操作按钮位置调整
   3. 续火花功能移到底部导航栏（island-nav 宽度适配 / 角标气泡）
   4. 火花信息弹窗样式
   5. 页面返回按钮位置统一与容器适配
   6. 火花视觉效果加强（颜色渐变 + 火焰光晕 + 星点围绕）
   ============================================================ */

/* ---------- 1. 电脑版用户头像框位置修正 ---------- */
/* 桌面版：.my-profile-avatar 放大到 140px，同时 .my-avatar-frame-wrap 必须同样放大，
   并将头像框 overlay 的缩放比例改为 140/200 = 0.7，保证框与头像同心对齐，无偏移 */
@media (min-width: 1200px) {
  body.my-page .my-avatar-frame-wrap {
    width: 140px;
    height: 140px;
  }
  body.my-page .my-avatar-frame-wrap.has-frame .avatar-frame-overlay {
    transform: translate(-50%, -50%) scale(0.7) !important;
  }
}
/* desktop-mode 模式下（用户手动切换的电脑版视图）同步 */
@media (min-width: 768px) {
  body.desktop-mode.my-page .my-profile-hero { padding-top: 130px; }
}
/* 所有屏幕尺寸：my-avatar-frame-wrap 居中到父容器（my-profile-hero 的 flex 列） */
.my-avatar-frame-wrap {
  align-self: center;
  margin: 0 auto;
}
/* 极端小屏（≤360px）整体缩放，避免头像框溢出 */
@media (max-width: 360px) {
  body.my-page .my-profile-avatar { width: 104px; height: 104px; font-size: 40px; }
  body.my-page .my-avatar-frame-wrap { width: 104px; height: 104px; }
  body.my-page .my-avatar-frame-wrap.has-frame .avatar-frame-overlay {
    transform: translate(-50%, -50%) scale(0.52) !important;
  }
}

/* ---------- 2. 我的 / 设置 / 火花 页不显示顶部栏后的布局补偿 ---------- */
/* 我的页面：去掉 has-top-bar 后的 padding 校正 */
body.my-page .container {
  padding-top: 0 !important; /* 用 my-profile-hero 自身的 padding 撑顶部横幅 + 返回按钮空间 */
}
body.my-page .my-profile-hero {
  /* 无顶部栏时，上方仅留返回按钮 / 标题 / 菜单的占位（约 72px） */
  padding-top: 96px !important;
}
/* 返回 / 更多按钮 top 值：统一从 calc(60px+12px) 改为 12px，且避开刘海 */
.my-close-btn,
.my-more-btn {
  top: calc(12px + env(safe-area-inset-top, 0px)) !important;
}
/* spark 页面：顶部条不再显示，移除原 has-top-bar 的 padding-top 补偿 */
body.spark-page {
  min-height: 100vh;
}
body.spark-page .container {
  padding-top: 0 !important;
}
/* spark-page 顶部栏位置 */
.spark-page-top {
  top: 0 !important;
  padding-top: calc(10px + env(safe-area-inset-top, 0px)) !important;
  height: calc(56px + env(safe-area-inset-top, 0px)) !important;
  box-sizing: content-box !important;
}
/* 精简版顶部栏（无标题无按钮，仅渐变） */
.spark-page-top-slim {
  height: calc(40px + env(safe-area-inset-top, 0px)) !important;
  padding-top: 0 !important;
}
/* spark-hero 背景从最顶部开始，内容避开顶部栏 */
.spark-hero {
  padding-top: calc(80px + env(safe-area-inset-top, 0px)) !important;
}

/* ---------- 3. 底部导航 island-nav 宽度 / 续火花项 / 角标 ---------- */
/* 当导航项从 4 个变 5 / 6 个时：允许自动撑开（原 left:16px, 加水平方向居中限制） */
.island-nav {
  max-width: calc(100vw - 32px);
  /* 超窄屏（<360px）允许横向滚动，不挤压 */
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
/* 隐藏横向滚动条 */
.island-nav::-webkit-scrollbar { display: none; }
/* 续火花按钮激活态：使用渐变色 */
.island-item[data-key="spark"].active {
  color: #FF8C00;
}
.island-item[data-key="spark"].active svg {
  filter: drop-shadow(0 0 4px #FFBE5C);
}
/* 续火花按钮右上角活跃数角标（与铃铛角标风格一致） */
.island-item {
  position: relative;
}
.island-spark-badge {
  position: absolute;
  top: 2px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #FF8C00;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(255, 140, 0, 0.4);
  pointer-events: none;
  z-index: 3;
}

/* ---------- 4. 火花信息弹窗（点击用户头像查看） ---------- */
.spark-info-mask {
  background: rgba(10, 14, 40, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 65534;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}
.spark-info-box {
  position: relative;
  width: 100%;
  max-width: 360px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f8ff 100%);
  border: 1px solid rgba(59, 130, 246, 0.12);
  box-shadow: 0 24px 64px rgba(10, 14, 40, 0.25), 0 0 0 1px rgba(255,255,255,0.6) inset;
  padding: 28px 22px 22px;
  box-sizing: border-box;
  text-align: center;
  animation: sparkInfoIn .22s ease both;
}
@keyframes sparkInfoIn {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.spark-info-loading .spark-info-hero,
.spark-info-loading .spark-info-tier-chip,
.spark-info-loading .spark-info-stats {
  visibility: hidden;
}
.spark-info-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(17, 24, 39, 0.06);
  border-radius: 50%;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .18s;
}
.spark-info-close:hover { background: rgba(17, 24, 39, 0.12); color: #111827; transform: rotate(90deg); }
.spark-info-close svg { width: 18px; height: 18px; }
.spark-info-avatar {
  width: 72px;
  height: 72px;
  margin: 0 auto 10px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 28px;
  border: 3px solid #fff;
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.25);
  background: #3B82F6;
}
.spark-info-avatar img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.spark-info-avatar span {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.spark-info-name {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 14px;
}
.spark-info-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0 10px;
  margin-bottom: 10px;
}
/* 火花中心外围柔光（颜色由 tier 决定） */
.spark-info-hero::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -62%);
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--spark-color, #FF8C00) 40%, transparent) 0%, transparent 62%);
  filter: blur(6px);
  pointer-events: none;
  z-index: 0;
}
.spark-info-hero > .spark-wrap {
  position: relative;
  z-index: 1;
}
.spark-info-points {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  z-index: 1;
}
.spark-info-points b {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--spark-color, #FF8C00);
  letter-spacing: 0.5px;
  text-shadow: 0 2px 8px color-mix(in srgb, var(--spark-color, #FF8C00) 35%, transparent);
}
.spark-info-points span {
  font-size: 12px;
  color: #6b7280;
  letter-spacing: 1px;
}
.spark-info-tier-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 8px;
}
.spark-info-status {
  font-size: 13px;
  color: #374151;
  margin-bottom: 14px;
}
.spark-info-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 6px 0 14px;
}
.spark-info-stats > div {
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.08);
  border-radius: 14px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.spark-info-stats span {
  font-size: 17px;
  font-weight: 800;
  color: #111827;
}
.spark-info-stats label {
  font-size: 11px;
  color: #6b7280;
}
.spark-info-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px dashed rgba(17, 24, 39, 0.1);
}
.spark-info-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #4b5563;
}
.spark-info-legend-item i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.9) inset;
}
/* 深色模式适配 */
body.dark-mode .spark-info-box {
  background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
  border-color: rgba(255, 255, 255, 0.08);
}
body.dark-mode .spark-info-close {
  background: rgba(255, 255, 255, 0.08);
  color: #d1d5db;
}
body.dark-mode .spark-info-close:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
body.dark-mode .spark-info-name { color: #fff; }
body.dark-mode .spark-info-status { color: #cbd5e1; }
body.dark-mode .spark-info-stats > div {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}
body.dark-mode .spark-info-stats span { color: #fff; }
body.dark-mode .spark-info-stats label { color: #9ca3af; }
body.dark-mode .spark-info-legend { border-color: rgba(255, 255, 255, 0.1); }
body.dark-mode .spark-info-legend-item { color: #cbd5e1; }

/* ---------- 5. 页面返回按钮统一 ---------- */
/* 所有 x-back-btn / spark-page-back / my-close-btn：统一符合手势 + 点击双返回机制 */
.modal-back-btn,
.ap-back-btn,
.spark-page-back,
.channel-detail-back,
.my-close-btn,
.dest-back-btn {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
/* 返回按钮左滑（屏幕左侧 20px）手势提示区 —— 在 spark 页与 my 页加视觉辅助线（可选） */
@media (max-width: 768px) {
  body.spark-page::before,
  body.my-page::before {
    content: '';
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, transparent, rgba(59,130,246,.25), transparent);
    pointer-events: none;
    z-index: 400;
  }
}

/* ---------- 6. 火花视觉效果加强（颜色渐变 / 火焰 / 星点围绕） ---------- */
/* 基础色阶加入 color-mix 柔光（兼容不支持的浏览器会降级） */
.spark-svg.spark-tier-0 { --spark: #B9B9C9; --spark-glow: #D8D8E4; --spark-hi: #E9E9F2; }
.spark-svg.spark-tier-1 {
  --spark: #FF8C00;
  --spark-glow: #FFBE5C;
  --spark-hi: #FFE4B3;
  --spark-grad-a: #FFD37A;
  --spark-grad-b: #FF8C00;
  --spark-grad-c: #FF5722;
}
.spark-svg.spark-tier-2 {
  --spark: #2F80F5;
  --spark-glow: #7CB3FF;
  --spark-hi: #C2DCFF;
  --spark-grad-a: #A6D1FF;
  --spark-grad-b: #2F80F5;
  --spark-grad-c: #1E3AFF;
}
.spark-svg.spark-tier-3 {
  --spark: #22C55E;
  --spark-glow: #7BE0A0;
  --spark-hi: #C5F3D2;
  --spark-grad-a: #88F0AE;
  --spark-grad-b: #22C55E;
  --spark-grad-c: #10903A;
}
.spark-svg.spark-tier-4 {
  --spark: #E13FD5;
  --spark-glow: #F18BE8;
  --spark-hi: #FCC5F5;
  --spark-grad-a: #FF9CE6;
  --spark-grad-b: #E13FD5;
  --spark-grad-c: #9F1AA2;
}

/* 火焰核心渐变（多 stop 径向渐变，外层柔、内层亮） */
.spark-svg .spark-core {
  fill: var(--spark);
  filter:
    drop-shadow(0 0 3px var(--spark-glow))
    drop-shadow(0 0 8px color-mix(in srgb, var(--spark-glow) 50%, transparent));
}
/* 外层光晕：SVG 根元素用 mask 叠加柔光环 */
.spark-svg {
  position: relative;
}
.spark-svg .spark-ring {
  fill: none;
  stroke: url(#sparkRingGrad);
  stroke: var(--spark);
  stroke-opacity: 0.55;
  stroke-width: 1.5;
}
/* 火花中心呼吸：tier-0 不呼吸 */
.spark-svg.spark-pulse {
  animation: spark-pulse-strong 2.2s ease-in-out infinite;
  transform-origin: center;
}
@keyframes spark-pulse-strong {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 2px var(--spark-glow)); }
  50%      { transform: scale(1.1);  filter: drop-shadow(0 0 10px var(--spark-glow)); }
}
/* 火焰图标特殊形状（原 circle core + rays → 叠加火焰火苗形状层，通过伪元素只对 spark-wrap 生效） */
.spark-wrap::before {
  content: '';
  position: absolute;
  inset: 12%;
  border-radius: 50% 50% 50% 0 / 60% 60% 40% 40%;
  background:
    radial-gradient(circle at 50% 68%, var(--spark-hi, #fff) 0%, var(--spark-grad-a, transparent) 28%, transparent 55%),
    radial-gradient(circle at 50% 40%, var(--spark-grad-b, transparent) 20%, transparent 60%),
    conic-gradient(from 200deg at 50% 55%, var(--spark-grad-c, transparent), var(--spark-grad-b, transparent), var(--spark-grad-a, transparent), var(--spark-grad-c, transparent));
  mix-blend-mode: screen;
  opacity: 0.78;
  filter: blur(0.4px);
  pointer-events: none;
  z-index: 0;
  transform: rotate(-2deg);
}
/* tier-0 去除火焰形状覆盖层（保持灰色圆点） */
.spark-wrap.spark-unlit::before,
.spark-wrap:has(.spark-tier-0)::before {
  display: none !important;
  opacity: 0 !important;
}
/* 火花轨道围绕星点增加 2 颗补足层次感 */
.spark-wrap .spark-dot.d4 { animation-delay: 0.4s; --dot-dist-mul: 1.35; }
.spark-wrap .spark-dot.d5 { animation-delay: 1.2s; --dot-dist-mul: 0.7;  }

/* 火花 Hero 区加强视觉（spark 页面中央大火花 + 信息弹窗中央大火花） */
.spark-hero .spark-wrap {
  margin: 8px auto 6px;
  filter: drop-shadow(0 8px 24px color-mix(in srgb, var(--spark) 35%, transparent));
}
/* 好友列表头像角标火花尺寸固定化 */
.spark-partner-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

/* ---------- 全局：hash 切换模块时的动画（返回按钮点击后有平滑切换反馈） ---------- */
/* 注意：不能用 .module.hidden + .module 相邻兄弟选择器 —— 激活模块的前一个兄弟
   若带 .hidden，会使激活模块被一并置为 opacity:0，导致打卡/频道页"看不见" */
.module {
  transition: opacity .2s ease;
}

/* ---------- 兼容：旧版浏览器不支持 color-mix 时走纯色兜底（上面已加 fallback） ---------- */

/* ============================================================
   2026-08-29 续火花页面重构（Douyin 风格卡通火焰 + 头像滑动选择条）
   + 火花点亮规则独立页 spark-rules.html
   ============================================================ */

/* ---------- 1. 顶部标题 + 右侧按钮组 ---------- */
.spark-page-top {
  justify-content: space-between;
}
.spark-page-top .spark-page-title {
  font-size: 16px;
}
/* 移动端按钮稍小一点 */
.spark-page-icon-btn {
  width: 34px;
  height: 34px;
}
.spark-page-icon-btn svg { width: 18px; height: 18px; }
.spark-page-right-actions {
  gap: 6px;
}

/* ---------- 2. 卡通火焰（带面部） ---------- */
.spark-hero-face {
  position: relative;
  width: min(46vw, 186px);
  margin: 4px auto 2px;
  z-index: 1;
}
.flame-wrap {
  position: relative;
  display: block;
  width: 100%;
  height: 0;
  padding-bottom: 100%;
}
.flame-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* 呼吸抖动 */
.flame-live {
  animation: flame-breathe 3.2s ease-in-out infinite;
  transform-origin: 50% 74%;
}
.flame-costume {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  z-index: 2;
  pointer-events: none;
  animation: flame-breathe 3.2s ease-in-out infinite;
  transform-origin: 50% 74%;
}
@keyframes flame-breathe {
  0%, 100% { transform: translateY(0) rotate(-2deg) scale(1); }
  50%      { transform: translateY(-3px) rotate(2deg) scale(1.045); }
}
/* 眨眼 */
.flame-eye {
  transform-box: fill-box;
  transform-origin: center;
  animation: flame-blink 4.8s ease-in-out infinite;
}
.flame-glint {
  transform-box: fill-box;
  transform-origin: center;
  animation: flame-blink 4.8s ease-in-out infinite;
}
@keyframes flame-blink {
  0%, 78%, 100% { transform: scaleY(1); }
  82%           { transform: scaleY(0.12); }
  86%           { transform: scaleY(1); }
}
/* 腮红逗号抖动 */
.flame-blush { animation: flame-blush 3.2s ease-in-out infinite; }
.flame-blush.bl2 { animation-delay: 1.6s; }
@keyframes flame-blush {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 0.75; }
}
/* 火焰外圈星点 */
.flame-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFF7DE, #FFD97A 60%, transparent 90%);
  box-shadow: 0 0 8px rgba(255, 217, 122, 0.8);
  opacity: 0;
  animation: flame-dot-orbit 3.4s ease-in-out infinite;
  pointer-events: none;
}
.flame-dot.fd2 { animation-delay: 1.7s; }
@keyframes flame-dot-orbit {
  0%   { transform: rotate(0deg) translateX(calc(50% + 8px)); opacity: 0; }
  12%  { opacity: 0.9; }
  50%  { transform: rotate(180deg) translateX(calc(50% + 8px)); opacity: 0.9; }
  62%  { opacity: 0; }
  100% { transform: rotate(360deg) translateX(calc(50% + 8px)); opacity: 0; }
}

/* ---------- 3. Hero：光晕 / 品牌 / 名称 / 数值 / 续火按钮 ---------- */
.spark-hero-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -58%);
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(174, 182, 196, 0.5) 0%, rgba(10, 12, 28, 0) 68%);
  filter: blur(6px);
  pointer-events: none;
  z-index: 0;
  transition: background 0.6s ease;
}
.spark-hero-brand {
  margin-top: 8px;
  text-align: center;
}
.spark-hero-sub {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: rgba(234, 240, 255, 0.85);
}
.spark-hero-sub .hero-with { color: rgba(234, 240, 255, 0.6); }
.spark-hero-sub .hero-name {
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  max-width: 42vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hero-badge {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  color: #fff;
  letter-spacing: 0.3px;
}
.hero-badge.live { background: linear-gradient(90deg, var(--hbc, #FF8C00), color-mix(in srgb, var(--hbc, #FF8C00) 70%, #fff 25%)); }
.hero-badge.soon { background: rgba(255, 255, 255, 0.14); border: 1px solid var(--hbc, #FF8C00); color: var(--hbc, #FF8C00); }
.hero-badge.dead { background: rgba(255, 255, 255, 0.1); color: rgba(234, 240, 255, 0.6); }
.hero-badge.none { background: rgba(255, 255, 255, 0.1); color: rgba(234, 240, 255, 0.6); }

.spark-hero-stats { margin-top: 14px; position: relative; z-index: 1; }
.spark-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.st {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 9px 4px 8px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.13);
}
.st-v { font-size: 19px; font-weight: 800; color: #fff; line-height: 1.1; }
.st-v.yes { color: #4ADE80; }
.st-l { font-size: 10.5px; color: rgba(234, 240, 255, 0.72); }
.spark-tier-chip {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--chip, #AEB6C4);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--chip, #AEB6C4) 45%, transparent);
}
.spark-stats-empty {
  font-size: 13px;
  color: rgba(234, 240, 255, 0.72);
  line-height: 1.9;
  padding: 6px 0 2px;
}
.spark-hero-action {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  border: none;
  border-radius: 999px;
  height: 44px;
  padding: 0 34px;
  background: linear-gradient(135deg, #FFB45E, #FF8C00 55%, #FF5722);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(255, 122, 0, 0.35);
  transition: transform .15s, opacity .2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.spark-hero-action:active { transform: scale(0.96); opacity: 0.92; }

/* ---------- 4. 底部横向头像选择条 ---------- */
.spark-partners-panel {
  margin: 20px 14px 0;
}
.spark-partners-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 10px;
  font-size: 12px;
  color: var(--muted);
}
.spark-partners-count {
  font-weight: 700;
  color: var(--text-soft);
}
.spark-partners-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 6px 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.spark-partners-track::-webkit-scrollbar { display: none; }

/* ---------- 5. 快捷操作按钮（互相关注下方） ---------- */
.spark-quick-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  padding: 0 6px;
}
.spark-quick-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: all .2s ease;
}
.spark-quick-btn svg {
  width: 22px;
  height: 22px;
  color: #FF8C00;
}
.spark-quick-btn:active {
  transform: scale(0.96);
  background: var(--bg-hover);
}

.spark-pill {
  position: relative;
  flex: 0 0 auto;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 76px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.spark-pill-avatar {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  padding: 3px;
  box-sizing: border-box;
  background: var(--ring, #3B82F6);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s, box-shadow .2s, filter .4s ease, -webkit-filter .4s ease;
}
.spark-pill-avatar > * {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 23px;
  overflow: hidden;
}
.spark-pill-avatar img { object-fit: cover; display: block; }
.spark-pill-name {
  max-width: 76px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spark-pill.active .spark-pill-avatar {
  transform: scale(1.12);
  box-shadow: 0 0 0 3px #fff, 0 6px 16px color-mix(in srgb, var(--ring, #3B82F6) 55%, transparent);
}
.spark-pill.active .spark-pill-name {
  color: var(--text);
  font-weight: 700;
}
.spark-pill.active .spark-pill-avatar > * {
  box-shadow: none;
}
.spark-pill-live {
  position: absolute;
  top: 1px;
  right: 6px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--live-c, #FF8C00);
  border: 2px solid #fff;
  box-shadow: 0 0 8px var(--live-c, #FF8C00);
  pointer-events: none;
}

/* ---------- 未续火花：灰色滤镜 ---------- */
.spark-pill-dim {
  opacity: 0.72;
}
.spark-avatar-greyed {
  filter: grayscale(1) brightness(0.55);
  -webkit-filter: grayscale(1) brightness(0.55);
}
.spark-avatar-greyed img {
  filter: grayscale(1) brightness(0.55);
  -webkit-filter: grayscale(1) brightness(0.55);
}

/* 无互关好友时底部留白，避免遮导航 */
body.spark-page .container { padding-bottom: 110px; }

/* ---------- 5. 火花点亮规则页 spark-rules.html ---------- */
.rules-top {
  pointer-events: none;
}
.rules-hero {
  position: relative;
  background:
    radial-gradient(ellipse 320px 260px at 50% 36%, rgba(120, 80, 200, 0.35), transparent 65%),
    radial-gradient(ellipse 220px 180px at 30% 22%, rgba(59, 130, 246, 0.22), transparent 60%),
    linear-gradient(160deg, #0B0D23 0%, #151A3D 55%, #1B1440 100%);
  color: #EAF0FF;
  padding: 84px 20px 32px;
  text-align: center;
  overflow: hidden;
}
.rules-hero-flame {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}
.rules-flame-svg {
  width: 128px;
  height: 128px;
  filter: drop-shadow(0 12px 34px rgba(255, 140, 0, 0.4));
}
.rules-hero-title {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(90deg, #FFD9A0, #FF8C00 45%, #FFE9C8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 10px rgba(255, 140, 0, 0.35));
}
.rules-hero-sub {
  margin-top: 6px;
  font-size: 13px;
  color: rgba(234, 240, 255, 0.72);
  letter-spacing: 0.5px;
}
.rules-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 6px 0 48px;
}
.rules-container .spark-rules { margin: 14px 14px 0; }
.rules-ol {
  margin: 8px 0 2px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rules-ol li::marker { color: var(--primary); font-weight: 700; }
.rules-tier-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.rules-tier {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-soft);
}
.rules-tier i {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}
.rules-tier b {
  width: 84px;
  font-size: 13px;
  color: var(--text);
}
.rules-tier span {
  font-size: 12px;
  color: var(--muted);
}
.rules-faq { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.rules-q { font-weight: 700; color: var(--text); }
.rules-a { color: var(--text-soft); }
.rules-foot {
  margin-top: 24px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}
/* 尊重减少动态效果偏好 */
@media (prefers-reduced-motion: reduce) {
  .flame-live,
  .flame-eye,
  .flame-glint,
  .flame-blush,
  .flame-dot {
    animation: none !important;
  }
  .flame-dot { display: none; }
}

/* ============================================================
   2026-08-29 v327 更新样式
   - 分享帖子面板全屏自适应
   - 续火花页面：2列统计网格 + 火花名字 + 顶部自适应
   - 火花规则页顶部自适应
   - 联系管理员聊天弹窗自适应（输入框置底）
   - 我的页面：隐藏底部导航栏 + 顶部按钮置顶
   ============================================================ */

/* ---------- 分享帖子面板：全屏自适应（复制链接常驻底部，手机端可见） ---------- */
.share-modal-mask.fullscreen-share {
  padding: 0;
  align-items: stretch;
}
.share-modal-mask.fullscreen-share .share-panel-box {
  width: 100%;
  max-width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  border-radius: 0;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px calc(env(safe-area-inset-bottom, 0px) + 14px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;            /* 容器自身不滚动，由内部 pane 滚动，避免复制链接被挤到视口外 */
}
.share-modal-mask.fullscreen-share .share-panel-header {
  flex-shrink: 0;
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 5;
  padding-bottom: 10px;
}
.share-modal-mask.fullscreen-share .share-tabs {
  flex-shrink: 0;
}
/* 当前选项卡作为滚动主体（flex 列布局，便于把操作条推到底部） */
.share-modal-mask.fullscreen-share .share-tab-pane.active {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
/* 复制链接条常驻底部：滚动时始终可见 */
.share-modal-mask.fullscreen-share .share-link-row {
  position: sticky;
  bottom: 0;
  flex-shrink: 0;
  background: var(--card);
  padding: 12px 0 2px;
  margin-top: auto;
  z-index: 4;
  border-top: 1px solid var(--border-soft);
}
/* 互相关注者面板：去续火花入口常驻底部 */
.share-modal-mask.fullscreen-share .share-mutual-list {
  max-height: none;
}
.share-modal-mask.fullscreen-share .share-panel-go-spark {
  position: sticky;
  bottom: 0;
  flex-shrink: 0;
  margin-top: auto;
  background: var(--card);
  z-index: 4;
}
/* 小屏：二维码缩小，减少滚动 */
@media (max-width: 380px) {
  .share-modal-mask.fullscreen-share .share-qr-box { width: 140px; height: 140px; }
  .share-modal-mask.fullscreen-share .share-platform-icon { width: 44px; height: 44px; }
  .share-modal-mask.fullscreen-share .share-platform-icon svg { width: 23px; height: 23px; }
}

/* ---------- 续火花：2列统计网格（去掉累计点数和最长连击后） ---------- */
.spark-stat-grid-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 260px;
  margin: 0 auto;
}

/* ---------- 续火花：火花名字显示 ---------- */
.hero-spark-name {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(234, 240, 255, 0.85);
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: background 0.2s, transform 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.hero-spark-name:active {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(0.96);
}
.hero-spark-name-placeholder {
  font-weight: 400;
  font-size: 12px;
  color: rgba(234, 240, 255, 0.55);
}

/* ---------- 火花规则页顶部：自适应置顶 ---------- */
.spark-page-top.rules-top {
  top: calc(10px + env(safe-area-inset-top, 0px)) !important;
  background: linear-gradient(180deg, rgba(10, 12, 28, 0.75), rgba(10, 12, 28, 0)) !important;
}
.rules-hero {
  padding-top: calc(env(safe-area-inset-top, 0px) + 84px) !important;
}

/* ---------- 联系管理员聊天弹窗：自适应 + 输入框置底 ---------- */
.modal-mask:has(#chat-modal) .chat-modal-box,
#chat-modal .chat-modal-box {
  width: 100%;
  max-width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  margin: 0;
  border-radius: 0 !important;
}
#chat-modal {
  padding: 0 !important;
  align-items: stretch !important;
}
#chat-modal .chat-modal-header {
  padding-top: calc(env(safe-area-inset-top, 0px) + 14px);
  flex-shrink: 0;
}
#chat-modal .chat-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#chat-modal .chat-input-row {
  flex-shrink: 0;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
}

/* ---------- 我的页面：隐藏底部导航栏 + 顶部按钮置顶自适应 ---------- */
body.my-page #island-nav {
  display: none !important;
}
body.my-page .container {
  padding-bottom: 24px;
}

/* ---------- 我的页面：移除顶部标题文字后，返回和三点按钮置顶 ---------- */
body.my-page .my-close-btn,
body.my-page .my-more-btn {
  top: calc(env(safe-area-inset-top, 0px) + 12px) !important;
  z-index: 200;
}

/* ============================================================
   火花投掷动画 + 触碰表情效果
   ============================================================ */

/* 飞行火花弹 */
.spark-throw-projectile {
  position: fixed;
  width: 36px;
  height: 48px;
  z-index: 9999;
  pointer-events: none;
  filter: drop-shadow(0 2px 8px rgba(255, 140, 0, 0.5));
}

/* 点燃动画 — 大火焰克隆体 */
.spark-ignite-flame {
  position: fixed;
  width: 72px;
  height: 80px;
  z-index: 9999;
  pointer-events: none;
  filter: drop-shadow(0 4px 16px rgba(255, 140, 0, 0.6));
}

/* 爆裂粒子 */
.spark-burst-particle {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, #FFD37A 0%, #FF8C00 60%, #FF5722 100%);
  z-index: 9999;
  pointer-events: none;
  box-shadow: 0 0 6px rgba(255, 140, 0, 0.6);
}

/* 爱心粒子 */
.spark-heart-particle {
  position: fixed;
  width: 20px;
  height: 20px;
  z-index: 9999;
  pointer-events: none;
  filter: drop-shadow(0 1px 4px rgba(255, 59, 110, 0.5));
}

/* 火焰表情区域交互提示 */
#spark-hero-face {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: transform 0.2s ease;
}
#spark-hero-face:active {
  transform: scale(0.95);
}

/* ============================================================
   一级/二级用户首页：黑色炫彩主题
   ============================================================ */

body.theme-black-glow {
  background: #0a0a0f !important;
  color: #e8e8f0;
}
body.theme-black-glow #app-view {
  position: relative;
}
body.theme-black-glow #app-view::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 10%, rgba(236, 72, 153, 0.10) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(59, 130, 246, 0.10) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  animation: glowShift 8s ease-in-out infinite alternate;
}
body.theme-black-glow #module-home .card,
body.theme-black-glow #module-home .card-flat {
  background: rgba(18, 18, 28, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(99, 102, 241, 0.05);
  backdrop-filter: blur(12px);
}
body.theme-black-glow #module-home .card h2,
body.theme-black-glow #module-home .qq-section-title {
  color: #c8c8e8;
}
body.theme-black-glow #module-home .hint,
body.theme-black-glow #module-home .muted {
  color: #6a6a8a;
}
body.theme-black-glow #island-nav {
  background: rgba(10, 10, 15, 0.92) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
}
body.theme-black-glow #island-nav .island-nav-item.active {
  color: #818cf8;
}
body.theme-black-glow .brand-header {
  background: transparent;
}

@keyframes glowShift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(2%, -1%) scale(1.05); }
  100% { transform: translate(-2%, 1%) scale(1); }
}

/* 黑色炫彩主题下提交卡片炫光边框 */
body.theme-black-glow .home-sub-card {
  position: relative;
  overflow: hidden;
}
body.theme-black-glow .home-sub-card::after {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(236, 72, 153, 0.2), rgba(59, 130, 246, 0.3));
  border-radius: inherit;
  z-index: -1;
  opacity: 0.5;
  animation: borderGlow 3s ease-in-out infinite alternate;
}
@keyframes borderGlow {
  0%   { opacity: 0.3; }
  100% { opacity: 0.6; }
}

/* ============================================================
   商城：头像框预览中间显示用户头像
   ============================================================ */
.shop-card-frame-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  overflow: hidden;
}
.shop-card-frame-preview .shop-frame-img {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 2;
  pointer-events: none;
}
.shop-card-frame-preview .shop-frame-avatar {
  position: relative;
  width: 62%;
  height: 62%;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.shop-card-frame-preview .shop-frame-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shop-card-frame-preview .shop-frame-avatar-text {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}

/* 商城：火花装扮预览 */
.shop-card-spark-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  overflow: hidden;
}
.shop-card-spark-preview svg {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 8px rgba(255,140,0,0.25));
}
.shop-card-spark-preview .shop-spark-costume-img {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* ===================== 推流 & 机器人账号管理样式 ===================== */
.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--bg-alt, #f5f5f5);
  border: 1px solid var(--border-soft, #e0e0e0);
}
.stat-card .stat-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--text, #333);
  margin-bottom: 2px;
}
.stat-card .stat-label {
  font-size: 12px;
  color: var(--muted, #999);
}
.push-duration-option:hover {
  border-color: var(--accent, #3B82F6) !important;
}
body.dark-mode .stat-card {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
}
body.dark-mode .stat-card .stat-num {
  color: #fff;
}
