/* ============================================
   UI 高级现代化设计 - 线条简约 + 高斯模糊
   2026年现代高级主题
   ============================================ */

/* ===== 全局应用背景 ===== */
body {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

/* ===== 顶栏增强 - 高级毛玻璃 + 强化层次感 ===== */
.topbar {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(203, 213, 225, 0.6) !important;
  box-shadow: 
    0 8px 20px rgba(15, 23, 42, 0.08),
    0 2px 4px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
  padding: 14px 16px !important;
  z-index: 20 !important;
}

.topbar-actions {
  gap: 6px !important;
}

/* ===== 品牌区域优化 ===== */
.brand-name {
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
}

.brand-sub {
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0.2px !important;
}

/* ===== 按钮优化 - 极简线条 ===== */
.icon-btn {
  border: 1px solid rgba(209, 213, 219, 0.6) !important;
  background: rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  transition: all 0.25s ease !important;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.7) !important;
  border-color: rgba(209, 213, 219, 0.8) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

.icon-btn:active {
  transform: scale(0.96) !important;
}

/* ===== 次级导航 ===== */
/* ===== 次级导航栏增强 ===== */
.subnav {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(203, 213, 225, 0.8) !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08) !important;
  margin: 8px 0 !important;
}

.sub-item {
  border-bottom: 2px solid transparent !important;
  color: rgba(71, 85, 105, 0.75) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  padding: 8px 4px !important;
  letter-spacing: 0.3px !important;
  position: relative !important;
  cursor: pointer !important;
}

.sub-item:hover {
  color: #0f172a !important;
  transform: translateY(-2px) !important;
}

.sub-item.active {
  border-bottom-color: #3b82f6 !important;
  color: #0f172a !important;
  font-weight: 700 !important;
}

/* ===== 次级导航主题色 ===== */
#page-home .sub-item.active {
  border-bottom-color: #0284c7 !important;
}

#page-archive .sub-item.active {
  border-bottom-color: #db2777 !important;
}

#page-chat .sub-item.active {
  border-bottom-color: #ea580c !important;
}

#page-account .sub-item.active {
  border-bottom-color: #16a34a !important;
}

/* ===== 禁用次级导航背景框 ===== */
.sub-item::before {
  display: none !important;
  opacity: 0 !important;
}

.sub-item.active::before {
  display: none !important;
  opacity: 0 !important;
}

/* ============================================
   主导航栏颜色主题
   ============================================ */

/* ===== 首页 - 天蓝 ===== */
.nav-item[data-page="home"] {
  color: #0284c7 !important;
}

.nav-item[data-page="home"].active {
  color: #0284c7 !important;
}

.nav-item[data-page="home"].active::after {
  background: #0284c7 !important;
}

/* ===== 档案 - 粉色 ===== */
.nav-item[data-page="archive"] {
  color: #db2777 !important;
}

.nav-item[data-page="archive"].active {
  color: #db2777 !important;
}

.nav-item[data-page="archive"].active::after {
  background: #db2777 !important;
}

/* ===== 对话 - 橙色 ===== */
.nav-item[data-page="chat"] {
  color: #ea580c !important;
}

.nav-item[data-page="chat"].active {
  color: #ea580c !important;
}

.nav-item[data-page="chat"].active::after {
  background: #ea580c !important;
}

/* ===== 账户 - 绿色 ===== */
.nav-item[data-page="account"] {
  color: #16a34a !important;
}

.nav-item[data-page="account"].active {
  color: #16a34a !important;
}

.nav-item[data-page="account"].active::after {
  background: #16a34a !important;
}

/* ===== 卡片优化 - 高级毛玻璃 + 浮起效果 ===== */
.card, .tpl-card {
  background: rgba(255, 255, 255, 0.70) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(15, 23, 42, 0.04) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.card:hover, .tpl-card:hover {
  background: rgba(255, 255, 255, 0.85) !important;
  border-color: rgba(203, 213, 225, 0.8) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 8px 20px rgba(15, 23, 42, 0.08) !important;
  transform: translateY(-2px) !important;
}

/* ===== 主按钮优化 ===== */
.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
  font-weight: 600 !important;
  transition: all 0.25s ease !important;
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4) !important;
  transform: translateY(-1px) !important;
}

/* ===== 页面主题色应用 ===== */
#page-home .btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3) !important;
}

#page-home .btn-primary:hover {
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4) !important;
}

#page-archive .btn-primary {
  background: linear-gradient(135deg, #db2777 0%, #be185d 100%) !important;
  box-shadow: 0 4px 12px rgba(219, 39, 119, 0.3) !important;
}

#page-archive .btn-primary:hover {
  box-shadow: 0 6px 20px rgba(219, 39, 119, 0.4) !important;
}

#page-chat .btn-primary {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%) !important;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3) !important;
}

#page-chat .btn-primary:hover {
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.4) !important;
}

#page-account .btn-primary {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3) !important;
}

#page-account .btn-primary:hover {
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.4) !important;
}

/* ===== 次按钮优化 ===== */
.btn-secondary {
  background: rgba(255, 255, 255, 0.70) !important;
  border: 1px solid rgba(209, 213, 219, 0.6) !important;
  color: #0f172a !important;
  font-weight: 500 !important;
  transition: all 0.25s ease !important;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.85) !important;
  border-color: rgba(209, 213, 219, 0.8) !important;
}

/* ===== 输入框优化 - 层次感 ===== */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  background: rgba(255, 255, 255, 0.70) !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), 0 2px 8px rgba(15, 23, 42, 0.06) !important;
  outline: none !important;
}

/* ===== 模态框优化 - 强化层次 ===== */
.modal-backdrop {
  background: rgba(15, 23, 42, 0.50) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

.modal-content {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18), 0 10px 20px rgba(0, 0, 0, 0.08) !important;
}

.modal-header {
  border-bottom: 1px solid rgba(229, 231, 235, 0.4) !important;
}

/* ===== 标签栏优化 - 层次感 ===== */
.tabbar {
  background: rgba(255, 255, 255, 0.90) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-top: 1px solid rgba(203, 213, 225, 0.6) !important;
  box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.06), 0 -1px 3px rgba(0, 0, 0, 0.08) !important;
  z-index: 19 !important;
}

.tab-item {
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
}

.tab-item.active {
  color: #3b82f6 !important;
}

/* ===== 气泡/通知优化 ===== */
.toast {
  background: rgba(15, 23, 42, 0.90) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
  color: #ffffff !important;
}

/* ===== 下拉菜单优化 ===== */
.dropdown-menu {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(229, 231, 235, 0.6) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
}

.dropdown-item {
  color: #0f172a !important;
  font-size: 13px !important;
  transition: all 0.15s ease !important;
}

.dropdown-item:hover {
  background: rgba(59, 130, 246, 0.08) !important;
  color: #3b82f6 !important;
}

/* ===== 主题菜单增强 ===== */
.theme-menu {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(229, 231, 235, 0.6) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10) !important;
}

.theme-menu-header {
  border-bottom: 1px solid rgba(229, 231, 235, 0.4) !important;
}

.theme-menu-item {
  transition: all 0.2s ease !important;
}

.theme-menu-item:hover {
  background: rgba(59, 130, 246, 0.05) !important;
}

.theme-menu-item.active {
  background: rgba(59, 130, 246, 0.10) !important;
  border: none !important;
}

/* ===== 加载界面优化 ===== */
.loading-card {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(229, 231, 235, 0.6) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.10) !important;
  border-radius: 16px !important;
}

/* ===== 应用容器 - 层次背景 ===== */
.app {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 50%, #eef2f5 100%) !important;
  min-height: 100vh !important;
}

/* ===== 主内容区增强 ===== */
#appRoot {
  position: relative;
  z-index: 1;
}

.main {
  margin-top: 8px !important;
}

.main > * {
  margin-bottom: 12px !important;
}

/* ===== 链接优化 ===== */
a {
  color: #3b82f6 !important;
  text-decoration: none !important;
  transition: color 0.2s ease !important;
}

a:hover {
  color: #2563eb !important;
}

/* ===== 表格优化 ===== */
table {
  border-collapse: collapse !important;
}

th {
  background: rgba(255, 255, 255, 0.5) !important;
  border-bottom: 1px solid rgba(229, 231, 235, 0.6) !important;
  font-weight: 600 !important;
}

td {
  border-bottom: 1px solid rgba(229, 231, 235, 0.4) !important;
}

/* ===== 生成焦点外观 ===== */
:focus-visible {
  outline: 2px solid #3b82f6 !important;
  outline-offset: 2px !important;
}

/* ===== 页面主题焦点颜色 ===== */
#page-home :focus-visible {
  outline-color: #0284c7 !important;
}

#page-archive :focus-visible {
  outline-color: #db2777 !important;
}

#page-chat :focus-visible {
  outline-color: #ea580c !important;
}

#page-account :focus-visible {
  outline-color: #16a34a !important;
}

/* ===== 滚动条优化 ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

/* ============================================
   登录/注册界面 - 现代玻璃态设计
   ============================================ */

/* ===== 认证界面容器 ===== */
.auth-gate {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 16px !important;
}

.auth-gate.hidden {
  display: none !important;
}

/* ===== 认证背景层 ===== */
.auth-gate__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.4) 0%, rgba(59, 130, 246, 0.1) 50%, rgba(124, 58, 237, 0.15) 100%);
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  z-index: -1;
}

/* ===== 认证屏幕 ===== */
.auth-screen {
  position: relative !important;
  z-index: 1 !important;
  width: 100% !important;
  max-width: 420px !important;
  display: none !important;
  animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.auth-gate[data-mode="login"] [data-auth-screen="login"],
.auth-gate[data-mode="register"] [data-auth-screen="register"] {
  display: flex !important;
  justify-content: center !important;
}

/* ===== 认证卡片 ===== */
.auth-card {
  width: 100% !important;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(203, 213, 225, 0.6) !important;
  border-radius: 24px !important;
  padding: 40px 32px !important;
  box-shadow: 
    0 20px 40px rgba(15, 23, 42, 0.12),
    0 8px 16px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ===== 品牌行 ===== */
.auth-brand-row {
  display: flex !important;
  gap: 16px !important;
  align-items: flex-start !important;
  margin-bottom: 28px !important;
}

/* ===== 认证Logo ===== */
.auth-logo {
  width: 56px !important;
  height: 56px !important;
  min-width: 56px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #3b82f6 0%, #7c3aed 100%) !important;
  box-shadow: 
    0 8px 16px rgba(59, 130, 246, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset !important;
  flex-shrink: 0 !important;
}

.auth-logo svg {
  width: 100% !important;
  height: 100% !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1)) !important;
}

/* ===== 认证标题组 ===== */
.auth-headings {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  justify-content: center !important;
}

.auth-headings .auth-title {
  font-size: 24px !important;
  font-weight: 700 !important;
  color: rgba(15, 23, 42, 0.95) !important;
  letter-spacing: 0.3px !important;
}

.auth-headings .auth-subtitle {
  font-size: 13px !important;
  color: rgba(71, 85, 105, 0.7) !important;
  font-weight: 500 !important;
  letter-spacing: 0.2px !important;
}

/* ===== 输入字段 ===== */
.auth-field {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  margin-bottom: 16px !important;
}

.auth-field label {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: rgba(51, 65, 85, 0.8) !important;
  letter-spacing: 0.3px !important;
  text-transform: uppercase !important;
}

.auth-field input {
  padding: 12px 16px !important;
  border: 1.5px solid rgba(203, 213, 225, 0.6) !important;
  background: rgba(255, 255, 255, 0.7) !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: rgba(15, 23, 42, 0.95) !important;
  outline: none !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

.auth-field input::placeholder {
  color: rgba(71, 85, 105, 0.5) !important;
  font-weight: 500 !important;
}

.auth-field input:focus {
  border-color: rgba(59, 130, 246, 0.8) !important;
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 
    0 0 0 3px rgba(59, 130, 246, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

/* ===== 密码/验证码行 ===== */
.auth-password-row,
.auth-code-row {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
}

.auth-password-row input,
.auth-code-row input {
  flex: 1 !important;
}

/* ===== 密码显示/验证码按钮 ===== */
.auth-toggle,
.auth-code-btn {
  padding: 10px 14px !important;
  background: rgba(226, 232, 240, 0.6) !important;
  border: 1px solid rgba(203, 213, 225, 0.6) !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: rgba(51, 65, 85, 0.8) !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  white-space: nowrap !important;
}

.auth-toggle:hover,
.auth-code-btn:hover {
  background: rgba(203, 213, 225, 0.8) !important;
  border-color: rgba(148, 163, 184, 0.8) !important;
  color: rgba(15, 23, 42, 0.95) !important;
}

.auth-toggle:active,
.auth-code-btn:active {
  transform: scale(0.98) !important;
}

/* ===== 提交按钮 ===== */
.auth-submit {
  width: 100% !important;
  padding: 14px 20px !important;
  margin-top: 8px !important;
  background: linear-gradient(135deg, #3b82f6 0%, #7c3aed 100%) !important;
  border: none !important;
  border-radius: 12px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: white !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 
    0 8px 16px rgba(59, 130, 246, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.06) !important;
  letter-spacing: 0.2px !important;
}

.auth-submit:hover {
  transform: translateY(-2px) !important;
  box-shadow: 
    0 12px 24px rgba(59, 130, 246, 0.4),
    0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

.auth-submit:active {
  transform: translateY(0) !important;
  box-shadow: 
    0 4px 8px rgba(59, 130, 246, 0.2),
    0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

/* ===== 认证状态 ===== */
.auth-status {
  padding: 10px 14px !important;
  margin-top: 10px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-align: center !important;
  display: none !important;
}

.auth-status:not(.hidden) {
  display: block !important;
}

.auth-status.error {
  background: rgba(239, 68, 68, 0.1) !important;
  color: rgba(220, 38, 38, 0.95) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

.auth-status.success {
  background: rgba(34, 197, 94, 0.1) !important;
  color: rgba(22, 163, 74, 0.95) !important;
  border: 1px solid rgba(34, 197, 94, 0.3) !important;
}

.auth-status.warning {
  background: rgba(251, 146, 60, 0.1) !important;
  color: rgba(194, 97, 25, 0.95) !important;
  border: 1px solid rgba(251, 146, 60, 0.3) !important;
}

/* ===== 链接按钮 ===== */
.auth-link {
  display: block !important;
  width: 100% !important;
  padding: 10px !important;
  margin-top: 16px !important;
  background: none !important;
  border: none !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: rgba(59, 130, 246, 0.9) !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  text-decoration: none !important;
  letter-spacing: 0.2px !important;
}

.auth-link:hover {
  color: rgba(59, 130, 246, 1) !important;
  text-decoration: underline !important;
}

.auth-link--dev {
  color: rgba(156, 163, 175, 0.8) !important;
  font-size: 12px !important;
  opacity: 0.7;
}

.auth-link--dev:hover {
  color: rgba(107, 114, 128, 1) !important;
  opacity: 1;
  text-decoration: underline !important;
}

/* ===== 响应式设计 ===== */
@media (max-width: 480px) {
  .auth-card {
    padding: 32px 20px !important;
    border-radius: 20px !important;
  }

  .auth-brand-row {
    margin-bottom: 24px !important;
  }

  .auth-logo {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    font-size: 24px !important;
  }

  .auth-headings .auth-title {
    font-size: 20px !important;
  }

  .auth-field input {
    padding: 12px 14px !important;
    font-size: 16px !important;
  }

  .auth-submit {
    padding: 12px 16px !important;
  }
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* ===== 平滑过渡 ===== */
* {
  transition-duration: 0.25s !important;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
}

button, [role="button"], input, select, textarea, a {
  transition-duration: 0.2s !important;
}

/* ===== 页面容器与层次感增强 ===== */
.page {
  animation: fadeInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== 顶栏、次栏、内容的渐进式层次 ===== */
.topbar { z-index: 20; }
.subnav { z-index: 19; }
.tabbar { z-index: 19; }
#appRoot { z-index: 1; }

/* ===== 内容卡片分隔空间 ===== */
.card + .card {
  margin-top: 12px !important;
}

/* ===== 分组内容间隔 ===== */
.page > div {
  margin-bottom: 16px !important;
}

.page > div:last-child {
  margin-bottom: 0 !important;
}

/* ============================================
   Apple Dock 风格导航栏 - 极简设计
   ============================================ */

/* ===== 导航栏容器 - Apple Dock极简风格 ===== */
.tabbar {
  position: fixed !important;
  bottom: 16px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: auto !important;
  max-width: auto !important;
  padding: 12px 16px !important;
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: none !important;
  border-radius: 20px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: flex-end !important;
  gap: 8px !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15) !important;
  z-index: 50 !important;
}

/* ===== 导航项 - Dock项目 ===== */
.nav-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  padding: 8px 12px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 10px !important;
  color: rgba(107, 114, 128, 0.7) !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.25s ease !important;
  position: relative !important;
  transform: scale(1) !important;
}

/* ===== 导航项悬浮 - Dock放大效果 ===== */
.nav-item:hover {
  transform: scale(1.1) translateY(-6px) !important;
}

/* ===== 导航项悬浮按下效果 ===== */
.nav-item:active {
  transform: scale(1.05) translateY(-3px) !important;
}

/* ===== 导航项激活 - 简约下划线 ===== */
.nav-item.active {
  color: rgba(15, 23, 42, 0.95) !important;
  background: transparent !important;
}

/* ===== 禁用旧样式的背景框 ===== */
.nav-item.active::before {
  display: none !important;
  opacity: 0 !important;
}

.nav-item.active::after {
  content: '' !important;
  position: absolute !important;
  bottom: -8px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 4px !important;
  height: 2px !important;
  background: rgba(15, 23, 42, 0.3) !important;
  border-radius: 1px !important;
  box-shadow: none !important;
}

/* ===== 导航图标 ===== */
.nav-icon {
  width: 24px !important;
  height: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  transition: all 0.25s ease !important;
}

.nav-icon svg {
  width: 20px !important;
  height: 20px !important;
  stroke: currentColor !important;
  fill: none !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

/* ===== 导航标签 ===== */
.nav-label {
  font-size: 9px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
}

/* ===== 响应式调整 - 小屏幕 ===== */
@media (max-width: 480px) {
  .tabbar {
    max-width: auto !important;
    padding: 10px 14px !important;
    bottom: 12px !important;
    gap: 6px !important;
  }

  .nav-item {
    padding: 6px 10px !important;
    gap: 3px !important;
    font-size: 9px !important;
  }

  .nav-icon {
    width: 22px !important;
    height: 22px !important;
  }

  .nav-icon svg {
    width: 18px !important;
    height: 18px !important;
  }

  .nav-item.active::after {
    width: 3px !important;
    height: 2px !important;
  }
}

/* ===== 响应式调整 - 超小屏幕 ===== */
@media (max-width: 360px) {
  .tabbar {
    max-width: auto !important;
    padding: 10px 12px !important;
    bottom: 10px !important;
    gap: 4px !important;
  }

  .nav-label {
    display: none !important;
  }

  .nav-item {
    padding: 8px !important;
    gap: 0 !important;
  }

  .nav-icon {
    width: 20px !important;
    height: 20px !important;
  }

  .nav-icon svg {
    width: 16px !important;
    height: 16px !important;
  }

  .nav-item.active::after {
    bottom: -6px !important;
    width: 3px !important;
    height: 2px !important;
  }
}

/* ===== 主内容底部上边距 - 为Dock留空间 ===== */
body:not(.auth-locked) .main {
  padding-bottom: 96px !important;
}

@media (max-width: 480px) {
  body:not(.auth-locked) .main {
    padding-bottom: 88px !important;
  }
}

@media (max-width: 360px) {
  body:not(.auth-locked) .main {
    padding-bottom: 84px !important;
  }
}
