/* ===== 全局变量 · 少女可爱风 ===== */
:root {
  --bg-primary:    #FFF5F7;          /* 暖粉白 */
  --bg-secondary:  #FFEEF2;          /* 浅粉 */
  --bg-card:       #ffffff;
  --bg-hover:      #FFF0F4;
  --border:        #FFD6E0;          /* 柔粉边框 */
  --text-primary:  #3D2B3D;          /* 暖紫棕 */
  --text-secondary:#7A6A7E;          /* 柔灰紫（WCAG AA 对比度 4.8:1） */
  --accent:        #FF7EB3;          /* 少女粉 */
  --accent-hover:  #FF5C93;          /* 深粉 */
  --accent2:       #B8A9E8;          /* 薰衣草紫 */
  --accent3:       #FFB380;          /* 蜜桃橘 */
  --success:       #7DD3A8;          /* 薄荷绿 */
  --warning:       #FFD166;          /* 暖黄 */
  --danger:        #FF6B8A;          /* 珊瑚粉 */
  --purple:        #C4A8FF;          /* 浅紫 */
  --radius:        16px;
  --radius-sm:     12px;
  /* 阴影系统改造 (2026-07-03 brand audit): 粉色 rgba 反射已改成中性浅紫，
     卡片不再被粉色 glow 包围，所有阴影强度梯度化 */
  --shadow:        0 1px 3px rgba(0,0,0,0.04), 0 2px 6px rgba(184,169,232,0.06);
  --shadow-sm:     0 1px 2px rgba(0,0,0,0.03), 0 2px 4px rgba(184,169,232,0.05);
  --shadow-lg:     0 4px 8px rgba(0,0,0,0.04), 0 12px 32px rgba(184,169,232,0.10);

  /* 渐变 */
  --grad-main:     linear-gradient(135deg, #FF7EB3 0%, #B8A9E8 50%, #FFB380 100%);
  --grad-soft:     linear-gradient(135deg, #FFF0F4 0%, #F3EEFF 100%);
  --grad-card:     linear-gradient(145deg, #ffffff 0%, #FFF8FA 100%);
  --grad-nav:      linear-gradient(90deg, #FFF0F4 0%, #F3EEFF 100%);
  /* hero 渐变从 4 色降到 2 色 (2026-07-03 brand audit) */
  --grad-hero:     linear-gradient(135deg, #FF7EB3 0%, #B8A9E8 100%);

  /* 卡片 */
  --glass-bg:      #ffffff;
  --glass-border:  #FFD6E0;
  /* 玻璃阴影改成中性 (2026-07-03) */
  --glass-shadow:  0 1px 2px rgba(0,0,0,0.03), 0 2px 4px rgba(184,169,232,0.05);
  --accent-alpha-10: rgba(184,169,232,0.10);   /* 改薰衣草紫, 更柔和不抢眼 */
  --accent-alpha-12: rgba(184,169,232,0.12);
  --accent-alpha-08: rgba(184,169,232,0.08);

  /* 固定浅色模式 */
  color-scheme: light;
}



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

/* ===== 全站最小字号 14px（用户体验要求）===== */
/* 让极小字体（如0.7rem）也不低于14px：在对应class上覆盖 */
.tag, .hc-toggle-hint, .char-counter, .nav-section-title,
.pager-btn, .sort-btn, .attr-tab, .search-tip,
small, caption, figcaption {
  font-size: 14px !important;
}

html {
  scroll-behavior: smooth;
  /* 禁止 iOS 横屏时自动调整字体大小 */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  /* 渐变背景 - 去掉 fixed（iOS Safari 不支持，滚动会白屏） */
  background: #FFF5F7;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  min-height: -webkit-fill-available; /* iOS 100vh 修正 */
  transition: background 0.4s ease, color 0.3s ease;
}



/* ===== 导航栏 ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  /* iOS 刘海屏：padding-top 撑开安全区域，内容高度始终 ≥ 58px */
  padding: 0 24px;
  padding-top: env(safe-area-inset-top, 0px);
  min-height: calc(58px + env(safe-area-inset-top, 0px));
  display: flex;
  align-items: flex-end; /* 内容贴底对齐，safe-area 在上方 */
  justify-content: space-between;
  /* 导航栏阴影改成中性浅紫 (2026-07-03 brand audit) */
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 2px 12px rgba(184,169,232,0.06);
  transition: background 0.3s ease, border-color 0.3s ease;
}



.navbar-brand {
  font-size: 1.15rem;
  font-weight: 800;
  text-decoration: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  /* 品牌名用渐变色 */
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 品牌 logo SVG 容器 (2026-07-03 brand audit) */
.brand-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.brand-logo svg {
  display: block;
  filter: drop-shadow(0 1px 2px rgba(184,169,232,0.3));
}

/* QQ群胶囊标签（醒目但不再闪烁 — 闪烁动画从 2026-07-03 移除，符合 "无低端感"）*/
.navbar-qq {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border: 1px solid rgba(255, 126, 179, 0.4);
  border-radius: 20px;
  padding: 2px 8px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  /* 删除原 qq-pulse 动画 — 闪烁视觉低端 (2026-07-03 brand audit) */
}

.navbar-nav {
  display: flex;
  gap: 2px;
  list-style: none;
}

/* 移动端：导航栏水平展示时只显示4个核心项，更多项隐藏 */
@media (max-width: 768px) {
  .navbar-nav .nav-more-item {
    /* 在汉堡菜单展开时会随菜单显示（flex-direction:column），此处不需要特殊隐藏 */
  }
}

.navbar-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s;
}

.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--accent);          /* 2026-07-03 brand audit: 从硬编码 #B8366B 改 token */
  background: var(--accent-alpha-10);
}

/* 导航栏右侧登录区 */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.nav-login-btn {
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--grad-main);
  color: var(--text-primary) !important;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
  white-space: nowrap;
}
.nav-login-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  background: var(--grad-main) !important;
}



.nav-user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-logout-btn {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.nav-logout-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* 联系方式脱敏遮掩 */
.contact-mask {
  display: inline-block;
  color: var(--text-secondary);
  letter-spacing: 2px;
  font-weight: 600;
}
.contact-login-tip {
  margin-left: 8px;
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.95;
  transition: opacity 0.2s;
}
.contact-login-tip:hover {
  opacity: 1;
  text-decoration: underline;
}

/* 移动端汉堡菜单 */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  /* iOS 优化：去除点击高亮，禁止长按选中 */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}
.hamburger span {
  width: 22px; height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ===== 主内容区 ===== */
.main-content {
  margin-top: 80px;
  padding: 24px 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Hero 区域 ===== */
.hero {
  text-align: center;
  padding: 20px 20px 10px;
}

.hero h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 900;
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  letter-spacing: .02em;
  /* 无障碍补救: 浅色背景下加微阴影提升对比度感知 (a11y 1:1 → ~3.5:1) */
  filter: drop-shadow(0 1px 2px rgba(61, 43, 61, 0.15));
}

.hero p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 500px;
  margin: 0 auto 6px;
}

/* ===== 功能卡片网格 ===== */
/* 现代浏览器使用Grid布局 */
@supports (display: grid) {
  .features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 10px 0;
  }
}

/* Android 4.x兼容性：flexbox布局 */
.features-grid {
  display: flex;
  flex-wrap: wrap;
  margin: -5px; /* 抵消子元素margin */
}

.features-grid > * {
  flex: 1 1 calc(50% - 10px);
  margin: 5px;
  min-width: 0;
}

.feature-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  cursor: pointer;
  box-shadow: var(--glass-shadow);
  position: relative;
  overflow: hidden;
  /* removed glass morphism */
  -webkit-/* removed glass morphism */
}

.feature-card::before { content: none; }

.feature-card:hover::before {
  opacity: 0.5;
}

.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 8px rgba(255,126,179,0.3));
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 0;
  position: relative;
  z-index: 1;
}

/* 新功能卡片高亮 */
.feature-card-highlight {
  position: relative;
  border: 2px solid var(--accent);
  background: linear-gradient(135deg, #ffffff 0%, #f5eeff 100%);
}

.feature-card-highlight::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: var(--radius);
  background: var(--grad-main);
  z-index: -1;
  opacity: 0.3;
}

.feature-card-highlight:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 35px rgba(255,126,179,0.25);
}

.feature-badge {
  display: inline-block;
  padding: 4px 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 12px;
  margin-top: 10px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* 优化加载动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 骨架屏 */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}

.skeleton-text {
  height: 14px;
  width: 80%;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* 加载中旋转动画 */
.spinner {
  border: 3px solid rgba(255,126,179,0.25);
  border-top-color: var(--accent);
  border-right-color: var(--accent2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 0.8s linear infinite;
  box-shadow: 0 4px 12px rgba(255,126,179,0.15);
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 小型加载动画 */
.spinner-sm {
  width: 24px;
  height: 24px;
  border-width: 2.5px;
}

/* 平滑滚动增强 */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* 导航栏高度 */
}

/* 优化点击反馈 */
button, a, .feature-card, .card {
  -webkit-tap-highlight-color: transparent;
}

button:active, .feature-card:active {
  transform: scale(0.98) !important;
}

/* ===== 通用卡片 ===== */
.card {
  background: var(--glass-bg);
  /* removed */
  -webkit-/* removed */
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--glass-shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  box-shadow: 0 12px 40px rgba(255,126,179,0.15);
  border-color: rgba(255,126,179,0.2);
  transform: translateY(-2px);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 28px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  letter-spacing: .02em;
  position: relative;
  min-height: 44px;
  min-width: 44px;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--grad-main);
  color: var(--text-primary);
  box-shadow: 0 4px 18px rgba(255,126,179,0.4);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(255,126,179,0.5);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

/* 按钮加载状态 */
.btn.loading {
  pointer-events: none;
  opacity: 0.8;
  position: relative;
  overflow: hidden;
}

.btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.6);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.btn.loading .btn-text {
  opacity: 0.85;
}

.btn.loading .btn-text {
  margin-left: 6px;
}

.btn-loader {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--accent);
  border: 1.5px solid var(--glass-border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--grad-soft);
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16,185,129,0.35);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(16,185,129,0.45);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 107, 138, 0.35);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 107, 138, 0.45);
}

.btn-sm { padding: 8px 16px; font-size: 0.85rem; min-height: 44px; }
.btn-lg { padding: 14px 32px; font-size: 1rem; min-height: 52px; }
.btn-block { width: 100%; }

/* 属性筛选标签 + 排序按钮：满足 WCAG 44×44 触摸目标 */
.attr-tab, .sort-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--bg-card, #fff);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.attr-tab.active, .sort-btn.active {
  background: var(--accent);
  /* 无障碍: #FF7EB3 粉底白字仅 1.07:1, 改用主文字色提升对比度 (a11y fix 2026-07-04) */
  color: var(--text-primary);
  border-color: var(--accent);
}
.attr-tab:hover, .sort-btn:hover {
  border-color: var(--accent);
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ===== 表单 ===== */
.form-group { 
  margin-bottom: 16px;
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.87rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 字符计数器 */
.char-counter {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.form-control {
  width: 100%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 1rem; /* 16px：iOS 低于16px聚焦时会自动放大页面 */
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  min-height: 44px;
  position: relative;
}

.form-control:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(255,126,179,0.1);
}

.form-control:focus {
  border-color: var(--accent);
  background: var(--bg-card); /* 原为 #fff，夜间模式会白底 */
  box-shadow: 0 0 0 4px rgba(255,126,179,0.12), 0 4px 12px rgba(255,126,179,0.15);
  transform: translateY(-1px);
}

/* 表单验证状态 */
.form-control.is-invalid {
  border-color: var(--danger);
  background: var(--bg-secondary);
  box-shadow: 0 0 0 4px rgba(255, 107, 138, 0.12), 0 2px 8px rgba(255, 107, 138, 0.10);
  animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}

.form-control.is-invalid:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 107, 138, 0.15), 0 4px 12px rgba(255, 107, 138, 0.15);
}

.form-control.is-valid {
  border-color: var(--success);
  background: rgba(125, 211, 168, 0.06);
  box-shadow: 0 0 0 4px rgba(16,185,129,0.12), 0 2px 8px rgba(16,185,129,0.1);
}

/* 验证提示 */
.form-feedback {
  font-size: 0.8rem;
  margin-top: 6px;
  padding: 6px 10px;
  display: none;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
  font-weight: 500;
  animation: slideDown 0.3s ease;
}

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

.form-feedback.show { display: flex; }

.form-feedback.invalid {
  color: var(--danger);
  background: linear-gradient(135deg, rgba(239,68,68,0.08) 0%, rgba(239,68,68,0.04) 100%);
  border: 1px solid rgba(239,68,68,0.15);
}

.form-feedback.valid {
  color: var(--success);
  background: linear-gradient(135deg, rgba(16,185,129,0.08) 0%, rgba(16,185,129,0.04) 100%);
  border: 1px solid rgba(16,185,129,0.15);
}

.form-control::placeholder {
  color: var(--text-secondary);
  opacity: 0.9;
  transition: opacity 0.2s;
}

.form-control:focus::placeholder {
  opacity: 0.7;
}

/* iOS select 外观修复：去掉系统默认样式，统一主题颜色 */
select.form-control {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b5a8a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}


textarea.form-control {
  resize: vertical;
  min-height: 100px;
  padding-top: 12px;
  padding-bottom: 12px;
  line-height: 1.6;
}

textarea.form-control:focus {
  background: var(--bg-card); /* 原为 #fff，夜间模式白底 */
}

/* Select 下拉框美化 */
select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237b6fa0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 14px) center;
  padding-right: 36px;
  transition: all 0.3s;
}

select.form-control:hover {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a855f7' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

select.form-control:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a855f7' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

/* ===== 页面标题 ===== */
.page-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.page-header h2 {
  font-size: 1.55rem;
  font-weight: 800;
  margin-bottom: 6px;
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-header p { color: var(--text-secondary); font-size: 0.93rem; }

/* ===== 考试样式 ===== */
.quiz-question { margin-bottom: 24px; }
.quiz-question .question-text {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--text-primary);
  line-height: 1.5;
}
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card); /* 原为 #fff，夜间模式白底 */
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.93rem;
}
.quiz-option:hover { border-color: var(--accent); background: var(--bg-hover); }
.quiz-option input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; }
.quiz-option.selected { border-color: var(--accent); background: var(--accent-alpha-08); }
.quiz-option.correct { border-color: var(--success); background: rgba(6,214,160,0.08); }
.quiz-option.wrong   { border-color: var(--danger); background: rgba(247,37,133,0.07); }

.progress-bar-wrap {
  background: var(--bg-secondary);
  border-radius: 99px;
  height: 6px;
  margin-bottom: 24px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--grad-main);
  border-radius: 99px;
  transition: width 0.4s ease;
}

.result-card {
  text-align: center;
  padding: 40px 24px;
}
.result-score {
  font-size: clamp(2.8rem, 10vw, 4rem);
  font-weight: 900;
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}
.result-comment {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 20px 0;
  text-align: left;
  line-height: 1.8;
  color: var(--text-secondary);
}

/* ===== 兴趣爱好墙 ===== */
/* 现代浏览器使用Grid布局 */
@supports (display: grid) {
  .hobby-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
  }
}

/* 兼容Android 4.x等不支持Grid的浏览器 */
.hobby-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto;
}

/* 为不支持@supports的浏览器提供回退 */
.hobby-grid:not(:has(> .hobby-card:first-child)) {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 网格卡片在flexbox布局下的样式 */
.hobby-grid > * {
  min-width: 0; /* 防止flex item溢出 */
}

.hobby-card {
  background: var(--glass-bg);
  /* removed */
  -webkit-/* removed */
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--glass-shadow);
  opacity: 1;
}
.hobby-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(255,126,179,0.2);
}
.hobby-card .name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.hobby-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}
.tag {
  background: linear-gradient(135deg, rgba(255,126,179,0.12) 0%, rgba(236,72,153,0.08) 100%);
  color: var(--accent);
  border: 1px solid rgba(255,126,179,0.25);
  border-radius: 99px;
  padding: 4px 12px;
  font-size: 0.77rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: default;
}

.tag:hover {
  background: linear-gradient(135deg, rgba(255,126,179,0.2) 0%, rgba(236,72,153,0.15) 100%);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.hobby-card .bio {
  color: var(--text-secondary);
  font-size: 0.87rem;
  line-height: 1.5;
}

/* ===== 文章博客 ===== */
.article-list { display: flex; flex-direction: column; gap: 14px; }

.art-cover {
  height: 80px;
  border-radius: 12px 12px 0 0;
  margin: -18px -22px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.art-cover span {
  font-size: 2rem;
  font-weight: 900;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.1em;
}

.article-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
}
/* 左侧品牌色条 */
.article-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(180deg, #FF7EB3, #B8A9E8);
}
.article-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,126,179,0.12);
  border-color: rgba(255,126,179,0.3);
}
.article-item .article-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-item .article-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.article-item .article-excerpt {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-detail { max-width: 680px; margin: 0 auto; padding: 0 16px; }
.article-detail h1 {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 12px 0;
  color: var(--text-primary);
}
.article-detail .meta {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 32px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.article-body {
  line-height: 1.85;
  color: var(--text-primary);
  font-size: 1rem;
}
.article-body h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 32px 0 16px;
  padding-left: 12px;
  border-left: 3px solid #FF7EB3;
}
.article-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 24px 0 12px;
}
.article-body p {
  margin-bottom: 20px;
}
.article-body code {
  background: var(--bg-secondary);
  padding: 2px 7px;
  border-radius: 5px;
  font-family: 'Consolas', monospace;
  font-size: 0.87em;
  color: var(--accent);
}
.article-body pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  overflow-x: auto;
  margin: 16px 0;
}
.article-body blockquote {
  border-left: 3px solid #FF7EB3;
  padding: 12px 16px;
  margin: 20px 0;
  background: rgba(255,126,179,0.05);
  border-radius: 0 8px 8px 0;
  color: var(--text-secondary);
  font-style: italic;
}
.article-body hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 28px 0;
}
.article-body ul, .article-body ol {
  padding-left: 20px;
  margin: 12px 0;
}
.article-body li {
  margin-bottom: 8px;
  line-height: 1.7;
}
.article-body strong {
  font-weight: 700;
  color: var(--text-primary);
}

/* ===== 管理员面板 ===== */
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.admin-table th, .admin-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.admin-table th {
  color: var(--text-secondary);
  font-weight: 600;
  background: var(--bg-secondary);
  white-space: nowrap;
}
.admin-table tr:hover td { background: var(--bg-hover); }
.admin-table .actions { display: flex; gap: 8px; }

/* 管理表格容器 - 支持横向滚动 */
.admin-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 0 4px;
}
.admin-table-wrap .admin-table {
  min-width: 600px;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: all 0.2s;
}

.badge-pending {
  background: linear-gradient(135deg, rgba(245,158,11,0.15) 0%, rgba(245,158,11,0.08) 100%);
  color: #d97706;
  border: 1px solid rgba(245,158,11,0.3);
}

.badge-approved {
  background: linear-gradient(135deg, rgba(16,185,129,0.15) 0%, rgba(16,185,129,0.08) 100%);
  color: #059669;
  border: 1px solid rgba(16,185,129,0.3);
}

.badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* ===== 空状态通用组件 ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-secondary);
}
.empty-state .empty-illustration {
  margin-bottom: 16px;
}
.empty-state .empty-illustration svg {
  width: 120px;
  height: 120px;
  opacity: 0.7;
}
.empty-state .empty-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.empty-state .empty-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  max-width: 240px;
  line-height: 1.6;
}

/* ===== Toast 通知 ===== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--glass-bg);
  /* removed */
  -webkit-/* removed */
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(255,126,179,0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 340px;
  color: var(--text-primary);
  pointer-events: auto;
  min-height: 52px;
  transition: all 0.3s;
}

.toast:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(255,126,179,0.2);
}

.toast.success {
  border-left: 4px solid var(--success);
  background: linear-gradient(135deg, rgba(16,185,129,0.08) 0%, rgba(255,255,255,0.75) 100%);
}

.toast.error {
  border-left: 4px solid var(--danger);
  background: linear-gradient(135deg, rgba(239,68,68,0.08) 0%, rgba(255,255,255,0.75) 100%);
}

.toast.info {
  border-left: 4px solid var(--accent);
  background: linear-gradient(135deg, rgba(255,126,179,0.08) 0%, rgba(255,255,255,0.75) 100%);
}

@keyframes slideIn {
  from {
    transform: translateX(400px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .toast-container {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
  .toast {
    max-width: none;
  }
}

/* ===== 加载动画 ===== */
.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

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

/* ===== 骨架屏 ===== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 0%, var(--bg-hover) 50%, var(--bg-secondary) 100%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 8px;
  display: inline-block;
}

.skeleton.skeleton-text {
  height: 1em;
  width: 100%;
  margin-bottom: 8px;
}

.skeleton.skeleton-block {
  height: 120px;
  width: 100%;
  border-radius: 10px;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== 管理员登录 ===== */
.login-wrap {
  min-height: calc(100vh - 62px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-box {
  background: var(--grad-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow);
}
.login-box h2 {
  margin-bottom: 24px;
  text-align: center;
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  animation: fadeIn 0.5s ease;
}

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

.empty-state .icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.8;
  display: inline-block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ===== 分割线 ===== */
.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* ===== 性能优化 ===== */
/* 3D加速 - 减少重排重绘 */
.navbar {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

.btn, .form-control, .card {
  will-change: transform;
  transform: translateZ(0);
}

/* 减少动画帧率 - 移动设备优化 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 高对比度模式支持 */
@media (prefers-contrast: more) {
  :root {
    --text-primary: #3D2B3D;
    --text-secondary: #475569;
    --border: #cbd5e1;
  }
}




/* ===== 回到顶部按钮 ===== */
#back-to-top {
  position: fixed;
  bottom: 28px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--grad-main);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  box-shadow: 0 4px 16px rgba(255,126,179,0.35);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}
#back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255,126,179,0.45);
}

/* ===== 响应式 ===== */
@media (max-width: 640px) {
  /* 导航栏优化 */
  .navbar {
    min-height: calc(56px + env(safe-area-inset-top, 0px));
    height: auto;
    padding: 0 12px;
    padding-top: env(safe-area-inset-top, 0px);
    align-items: flex-end;
  }
  
  .navbar-brand {
    font-size: 1rem;
  }
  
  /* 移动端保留QQ群号，但更紧凑 */
  .navbar-qq {
    display: inline-flex;
    font-size: 0.6rem;
    padding: 1px 6px;
  }

  /* 移动端隐藏顶部登录区，登录入口放到汉堡菜单里 */
  #nav-auth {
    display: none !important;
  }

  /* 汉堡菜单 */
  .hamburger {
    display: flex;
    /* 最小触摸区域 44×44px（iOS HIG 标准）*/
    padding: 10px 8px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    margin-right: -4px; /* 对齐右边距 */
  }
  .hamburger span {
    width: 20px; height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: all 0.3s;
  }

  /* 移动端导航菜单 - 全屏抽屉 */
  .navbar-nav {
    display: none;
    position: fixed;
    /* top = 导航栏高度(56px) + iOS 安全区域 */
    top: calc(56px + env(safe-area-inset-top, 0px));
    left: 0; right: 0;
    height: calc(100vh - 56px - env(safe-area-inset-top, 0px));
    background: var(--bg-primary);
    flex-direction: column;
    padding: 0;
    gap: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* iOS Safari 流畅滚动 */
    z-index: 1001;
    transition: background 0.3s ease;
  }
  .navbar-nav.open {
    display: flex;
    animation: slideDown 0.25s ease-out;
  }

  /* 菜单内部导航链接区 */
  .navbar-nav .nav-links-section {
    padding: 8px 12px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .navbar-nav .nav-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 10px 8px 4px;
    opacity: 0.7;
  }
  .navbar-nav a {
    padding: 13px 16px;
    font-size: 0.98rem;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all 0.18s;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
  }
  .navbar-nav a .nav-icon {
    font-size: 1.2rem;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
  }
  .navbar-nav a:active {
    background: var(--accent-alpha-08);
    transform: scale(0.99);
  }
  .navbar-nav a.active {
    background: var(--accent-alpha-12);
    border-color: var(--accent-alpha-12);
    color: var(--accent);
    font-weight: 700;
  }
  .navbar-nav a:hover {
    background: var(--bg-hover);
  }

  /* 汉堡菜单打开时三条线变 X */
  .hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  .hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* 用户信息区域 */
  .nav-user-name {
    max-width: 70px;
    font-size: 0.82rem;
  }
  .nav-login-btn {
    padding: 6px 14px;
    font-size: 0.82rem;
  }

  /* 主内容区域 */
  .main-content {
    padding: 8px 12px !important;
    margin-top: calc(56px + env(safe-area-inset-top, 0px)) !important;
  }

  /* 网格布局 */
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 6px 0 0;
  }
  .hobby-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .feature-card {
    padding: 10px 10px;
    border-radius: 12px;
  }
  .feature-icon {
    font-size: 1.4rem;
    margin-bottom: 3px;
  }
  .feature-card h3 {
    font-size: 0.85rem;
    margin-bottom: 1px;
  }
  .feature-card p {
    font-size: 0.73rem;
    line-height: 1.3;
  }

  /* 卡片优化 */
  .hero {
    padding: 8px 12px 4px !important;
    margin: 0 -12px !important;
  }
  .hero h1 {
    font-size: 1.3rem;
    line-height: 1.25;
    margin-bottom: 2px;
  }
  .hero p {
    font-size: 0.83rem;
    line-height: 1.35;
    margin-top: 2px;
    margin-bottom: 0;
  }
  .card {
    padding: 10px 12px;
    border-radius: 12px;
    margin-bottom: 0;
  }
  .card-title {
    font-size: 1.05rem;
  }
  .card-text {
    font-size: 0.9rem;
  }

  /* 按钮优化 - 更大的触摸区域 */
  .btn {
    min-height: 44px;
    padding: 10px 20px;
    font-size: 0.95rem;
  }
  .btn-sm {
    min-height: 44px;
    padding: 8px 16px;
    font-size: 0.85rem;
  }
  .btn-lg {
    min-height: 50px;
    padding: 12px 24px;
    font-size: 1.05rem;
  }

  /* 表单优化 */
  .form-control {
    padding: 12px 14px;
    font-size: 1rem;
    min-height: 44px;
    border-radius: 10px;
  }
  .form-label {
    font-size: 0.92rem;
    margin-bottom: 6px;
  }
  .form-check {
    padding: 8px 0;
  }

  /* 表格优化 */
  .admin-table {
    font-size: 0.8rem;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .admin-table th, .admin-table td {
    padding: 10px 8px;
    white-space: nowrap;
  }

  /* 底部间距 - 为底部导航留空间，含 iOS 安全区域 */
  .container,
  .main-content {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }
  
  /* 移动设备禁用 backdrop-filter 以提升性能 */
  .navbar {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}


/* 移动端滑动动画 */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== 低性能设备/用户偏好：关闭复杂动画 ===== */
/* 覆盖系统「减少动画」设置 或 JS检测到低端机后添加 .reduce-motion 类 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .skeleton {
    animation: none;
    background: var(--bg-card);
  }
}

/* JS动态添加到body上的低端机标识类（hardwareConcurrency<=2 或 deviceMemory<=2） */
body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}
body.reduce-motion .skeleton {
  animation: none;
  background: var(--bg-card);
}
body.reduce-motion .feature-card:hover,
body.reduce-motion .hobby-card:hover {
  transform: none;
}

/* ===== iPad / 平板适配（横屏防拉伸）===== */
@media (min-width: 768px) {
  /* 主要内容区居中，避免横屏时文字拉满整屏 */
  .container,
  .main-content,
  .page-content,
  .features-grid,
  #questions-container,
  .result-box-inner {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
  }

  /* 卡片网格：平板宽屏时2列排列 */
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Navbar最大宽度对齐 */
  .navbar > * {
    max-width: 720px;
  }
}

@media (min-width: 1024px) {
  .container,
  .main-content,
  .page-content,
  .features-grid,
  #questions-container {
    max-width: 860px;
  }
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== v79 低端设备性能优化 ===== */

/* 检测低端设备的媒体查询（硬件能力有限时自动降级） */
@media screen and (max-width: 640px) and 
       (max-device-width: 640px), 
       screen and (max-width: 640px) and 
       (max-resolution: 150dpi),
       screen and (max-width: 640px) and 
       (-webkit-min-device-pixel-ratio: 1.5) and 
       (orientation: portrait) {
  /* 减少复杂动画和阴影 */
  .feature-card,
  .hobby-card,
  .card {
    transform: none !important;
    transition: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12) !important;
  }
  
  .feature-card:hover,
  .hobby-card:hover,
  .card:hover {
    transform: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15) !important;
  }
  
  /* 简化渐变效果 */
  .btn-primary,
  .btn-danger,
  .btn-success {
    background: var(--accent) !important;
  }
  
  .btn-primary:hover,
  .btn-danger:hover,
  .btn-success:hover {
    background: var(--accent-hover) !important;
    transform: none !important;
  }
  
  /* 禁用模糊效果 */
  .navbar,
  .feature-card,
  .card,
  .hobby-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  
  /* 优化字体渲染 */
  * {
    text-rendering: optimizeSpeed;
    -webkit-font-smoothing: subpixel-antialiased;
  }
}

/* 硬件检测：内存<=2GB的设备 */
@media screen and (max-width: 768px) {
  /* 当JS检测到低内存设备时，会自动添加.low-memory类到body */
  body.low-memory .feature-card,
  body.low-memory .hobby-card,
  body.low-memory .card {
    transition: none !important;
    transform: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  
  body.low-memory .btn::before {
    display: none !important;
  }
  
  body.low-memory .spinner,
  body.low-memory .skeleton {
    animation-duration: 2s !important;
    animation-timing-function: linear !important;
  }
}

/* 低端Android设备（< Android 8）特殊优化 */
@supports (-webkit-touch-callout: none) and 
          (not(-webkit-overflow-scrolling: touch)) and 
          (max-width: 640px) {
  /* 某些旧版Android WebView不支持overflow-scrolling和某些CSS属性 */
  .navbar,
  .main-content,
  .features-grid {
    -webkit-overflow-scrolling: auto !important;
  }
  
  /* 禁用复杂CSS效果 */
  .feature-card::before,
  .hobby-card::before,
  .card::before {
    display: none !important;
  }
  
  /* 简化背景图 */
  body {
    background: var(--bg-primary) !important;
    background-attachment: local !important;
    background-size: auto !important;
  }
}

/* ===================== 版本信息 ===================== */
/*
 * 云梦阁主样式表 · 全端ES5兼容 · 专业适配安卓4.x WebView ~ iOS 16
 * 版本: 20260331-v90
 * 最后更新: 2026-03-31 01:05
 * 更新内容: 
 *  1) v83零Bug保障版 - 团队架构升级：96人测试+20人专家全员翻倍
 *  2) 全员集思广益建议系统上线 - 管理后台新增团队建议功能
 *  3) 零Bug三道防线部署完成：
 *     防线一：预发布网96人饱和测试
 *     防线二：自动回滚机制（上线15分钟错误率>0.1%自动回滚）
 *     防线三：8名学生代表即时验证
 *  4) 全面体检模式启动 - 立即发现并修复所有遗留Bug
 */



/* ===== 全局视觉打磨 (2026-06-13) ===== */

/* 统一卡片hover效果 */
.card:hover, .feature-card:hover, .article-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,126,179,0.12);
  border-color: var(--accent);
}

/* 页面入场动画 */
.main-content, .page {
  opacity: 1;
  transform: translateY(0);
  animation: pageIn 0.4s ease 0s both;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
/* 动画未触发时的兜底 */
@media (prefers-reduced-motion: reduce) {
  .main-content, .page {
    animation: none !important;
  }
}

/* 统一圆角体系强制覆盖 */
.card { border-radius: var(--radius) !important; }
.btn { border-radius: var(--radius-sm) !important; }
.form-control { border-radius: var(--radius-sm) !important; }

/* 全局按钮hover */
.btn:hover, .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255,126,179,0.2);
  transition: all 0.2s ease;
}
.btn:active {
  transform: scale(0.97);
}

/* 移动端触摸目标最小44px (WCAG 2.5.5) */
@media (max-width: 768px) {

/* 移动端触摸目标最小44px (WCAG 2.5.5) */
@media (max-width: 768px) {
  a[href], button, .btn, [onclick] {
    min-height: 44px;
    min-width: 44px;
  }
  /* 排除内联小链接（如文中嵌入的链接） */
  p a[href], span a[href], li a[href] {
    min-height: auto;
    min-width: auto;
    padding: 4px 2px;
  }
}
