/* ==================== CSS变量 ==================== */
:root {
  --primary-blue: #1677ff;
  --primary-blue-light: #4096ff;
  --primary-blue-dark: #0e5dcf;
  --accent-orange: #f5a623;
  --accent-orange-light: #ffc55c;
  --accent-green: #10b981;
  --accent-gold: #d4af37;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --bg-card: #ffffff;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-light: #999999;
  --border-light: #e8e8e8;
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 20px rgba(22, 119, 255, 0.3);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* 暗色模式变量 */
.theme-dark {
  --bg-light: #0f172a;
  --bg-white: #1e293b;
  --bg-card: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-light: #64748b;
  --border-light: #475569;
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ==================== 网格背景装饰 ==================== */
.grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(22, 119, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 119, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ==================== 基础样式 ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

/* ==================== 顶部导航 ==================== */
.top-nav {
  background: var(--bg-white);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  height: 60px;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  color: var(--text-primary);
  transition: var(--transition-fast);
}

.nav-brand a:hover {
  transform: translateY(-1px);
}

.brand-icon {
  font-size: 26px;
  animation: float 3s ease-in-out infinite;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* 主题切换按钮 */
.theme-toggle {
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(22, 119, 255, 0.1);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: var(--transition-normal);
}

.theme-toggle:hover {
  background: rgba(22, 119, 255, 0.2);
  transform: scale(1.05);
}

.theme-icon {
  transition: var(--transition-normal);
}

/* 用户下拉菜单 */
.user-dropdown {
  position: relative;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.user-btn:hover {
  background: rgba(22, 119, 255, 0.1);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(22, 119, 255, 0.3);
}

.user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  display: none;
}

@media (min-width: 600px) {
  .user-name {
    display: block;
  }
}

.dropdown-arrow {
  transition: var(--transition-fast);
  color: var(--text-light);
}

.user-btn:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-medium);
  min-width: 180px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition-fast);
  border: 1px solid var(--border-light);
}

.user-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  transition: var(--transition-fast);
}

.menu-item:hover {
  background: rgba(22, 119, 255, 0.1);
}

.menu-item.logout {
  color: #e74c3c;
}

.menu-item.logout:hover {
  background: rgba(231, 76, 60, 0.1);
}

/* 认证按钮 */
.auth-actions {
  display: flex;
  gap: 12px;
}

.btn-text {
  padding: 8px 16px;
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.btn-text:hover {
  color: var(--primary-blue);
}

.btn-primary {
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
  color: white;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(22, 119, 255, 0.25);
  transition: var(--transition-normal);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(22, 119, 255, 0.4);
}

/* ==================== 应用容器 ==================== */
.app-container {
  display: flex;
  min-height: calc(100vh - 60px);
  position: relative;
  z-index: 1;
}

/* ==================== 侧边栏 ==================== */
.sidebar {
  width: 240px;
  background: var(--bg-white);
  border-right: 1px solid var(--border-light);
  padding: 24px 0;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding-left: 24px;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 14px;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: linear-gradient(135deg, var(--primary-blue), var(--accent-green));
  border-radius: 0 3px 3px 0;
  transition: var(--transition-normal);
}

.nav-item:hover {
  background: rgba(22, 119, 255, 0.08);
  color: var(--primary-blue);
}

.nav-item:hover::before {
  height: 24px;
}

.nav-item.active {
  background: rgba(22, 119, 255, 0.1);
  color: var(--primary-blue);
  font-weight: 500;
}

.nav-item.active::before {
  height: 24px;
}

.nav-item.pinned {
  background: rgba(245, 166, 35, 0.08);
}

.nav-item.pinned:hover {
  background: rgba(245, 166, 35, 0.15);
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
  transform: scale(1.1);
}

.nav-text {
  flex: 1;
}

/* 热度条 - 独立的纤细进度条 */
.hotness-track {
  height: 6px;
  width: 60px;
  background: #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  margin-left: auto;
  flex-shrink: 0;
}

.theme-dark .hotness-track {
  background: #475569;
}

.hotness-fill {
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, #fbbf24, #f97316);
  transition: width 0.3s ease;
}

/* 热度条 */
.hot-bar {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, rgba(22, 119, 255, 0.8), rgba(22, 119, 255, 0.2));
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  opacity: 0;
  transition: var(--transition-fast);
}

.nav-item:hover .hot-bar,
.nav-item.active .hot-bar {
  opacity: 1;
}

/* 固定标记 */
.pin-badge {
  font-size: 14px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ==================== 主内容区 ==================== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 60px);
}

.content-wrapper {
  flex: 1;
  /* 使用 clamp() 函数实现自适应宽度：最小600px，最大900px，首选90%视窗宽度 */
  max-width: clamp(600px, 90vw, 900px);
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px;
  animation: fadeIn 0.5s ease;
}

/* 全宽布局覆盖 - 适用于万象空间、刷题等页面 */
.full-width-content .content-wrapper {
  max-width: 100%;
  padding: 0;
}

.full-width-page {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
}

/* 响应式卡片网格 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

@media (max-width: 480px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 320px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

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

/* ==================== 页脚 ==================== */
.site-footer {
  border-top: 1px solid var(--border-light);
  padding: 24px;
  background: var(--bg-white);
}

.footer-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  color: var(--text-light);
  font-size: 13px;
}

.footer-content p {
  margin: 4px 0;
}

.footer-content a {
  color: var(--primary-blue);
}

.footer-content a:hover {
  text-decoration: underline;
}

/* ==================== 卡片组件 ==================== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-light);
  margin-bottom: 24px;
  transition: var(--transition-normal);
  animation: slideUp 0.5s ease backwards;
}

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

.card:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}

.card-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ==================== 按钮组件 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: var(--transition-normal);
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 15px;
}

.btn-gradient {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
  color: white;
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.3);
}

.btn-gradient:hover {
  box-shadow: 0 6px 20px rgba(22, 119, 255, 0.4);
}

.btn-orange {
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-light));
  color: white;
  box-shadow: 0 4px 12px rgba(245, 166, 35, 0.3);
}

.btn-orange:hover {
  box-shadow: 0 6px 20px rgba(245, 166, 35, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--primary-blue);
  border: 1px solid var(--primary-blue);
}

.btn-ghost:hover {
  background: rgba(22, 119, 255, 0.1);
}

/* ==================== 排版 ==================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

h1 { font-size: 28px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
h4 { font-size: 18px; }

.text-muted {
  color: var(--text-secondary);
}

.text-small {
  font-size: 13px;
}

/* ==================== 网格布局 ==================== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

/* ==================== 技能标签 ==================== */
.skill-tag {
  display: inline-block;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(22, 119, 255, 0.1), rgba(22, 119, 255, 0.05));
  color: var(--primary-blue);
  font-size: 13px;
  font-weight: 500;
  border-radius: 20px;
  margin: 4px;
  transition: var(--transition-fast);
}

.skill-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.15);
}

.skill-tag.orange {
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.15), rgba(245, 166, 35, 0.08));
  color: #d48806;
}

.skill-tag.green {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.08));
  color: #389e0d;
}

.skill-tag.purple {
  background: linear-gradient(135deg, rgba(114, 46, 209, 0.15), rgba(114, 46, 209, 0.08));
  color: #722ed1;
}

/* ==================== 项目卡片 ==================== */
.project-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-light);
  transition: var(--transition-normal);
  cursor: pointer;
  perspective: 1000px;
}

.project-card:hover {
  transform: translateY(-4px) rotateX(2deg);
  box-shadow: var(--shadow-medium);
  border-color: var(--primary-blue);
}

.project-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.3);
  transition: var(--transition-normal);
}

.project-card:hover .project-icon {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(22, 119, 255, 0.4);
}

.project-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.project-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tag {
  font-size: 12px;
  padding: 4px 10px;
  background: rgba(22, 119, 255, 0.08);
  border-radius: 12px;
  color: var(--primary-blue);
}

/* ==================== 快捷入口卡片 ==================== */
.quick-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-light);
  transition: var(--transition-normal);
  cursor: pointer;
}

.quick-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-medium);
}

.quick-card-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--primary-blue), var(--accent-green));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 16px;
  box-shadow: 0 6px 20px rgba(22, 119, 255, 0.3);
  transition: var(--transition-normal);
}

.quick-card:hover .quick-card-icon {
  transform: scale(1.15);
  box-shadow: 0 8px 24px rgba(22, 119, 255, 0.4);
}

.quick-card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.quick-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ==================== 个人简介区域 ==================== */
.hero-section {
  text-align: center;
  padding: 40px 0;
  margin-bottom: 32px;
}

.hero-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin-bottom: 20px;
  border: 4px solid var(--bg-white);
  box-shadow: var(--shadow-medium);
}

.hero-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--primary-blue), var(--accent-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ==================== Toast提示组件 ==================== */
.toast-container {
  position: fixed;
  bottom: 120px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  opacity: 0;
  transform: translateX(100%);
  transition: var(--transition-normal);
  min-width: 200px;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-info {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
  color: white;
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.4);
}

.toast-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.toast-error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.toast-warning {
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-light));
  color: white;
  box-shadow: 0 4px 12px rgba(245, 166, 35, 0.4);
}

/* ==================== 移动端底部导航 ==================== */
.mobile-bottom-nav {
  display: none;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 968px) {
  .sidebar {
    display: none;
  }
  
  .content-wrapper {
    padding: 20px 16px;
  }
  
  .card {
    padding: 20px;
    border-radius: var(--radius-md);
  }
  
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  /* 移动端底部导航 */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-light);
    padding: 8px 16px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 999;
    justify-content: space-around;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
  }
  
  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    color: var(--text-secondary);
    font-size: 11px;
    transition: var(--transition-fast);
    border-radius: var(--radius-md);
    min-width: 60px;
  }
  
  .mobile-nav-item .icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
  }
  
  .mobile-nav-item .icon-wrap.primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    box-shadow: 0 4px 12px rgba(22, 119, 255, 0.4);
  }
  
  .mobile-nav-item .icon {
    font-size: 22px;
  }
  
  .mobile-nav-item .icon-wrap.primary .icon {
    color: white;
  }
  
  .mobile-nav-item.active {
    color: var(--primary-blue);
  }
  
  .mobile-nav-item.active .icon-wrap {
    background: rgba(22, 119, 255, 0.15);
    transform: scale(1.1);
  }
  
  .mobile-nav-item.tap-active {
    transform: scale(0.95);
    opacity: 0.7;
  }
  
  .main-content {
    padding-bottom: 80px;
  }
  
  .site-footer {
    padding-bottom: calc(24px + 60px);
  }
  
  .toast-container {
    bottom: 100px;
    left: 16px;
    right: 16px;
  }
  
  .toast {
    min-width: auto;
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .nav-container {
    padding: 0 16px;
  }
  
  .brand-text {
    display: none;
  }
  
  .user-name {
    display: none;
  }
  
  .hero-title {
    font-size: 24px;
  }
  
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  h3 { font-size: 18px; }
  
  .quick-card-icon {
    width: 56px;
    height: 56px;
    font-size: 28px;
  }
}

/* ==================== 滚动条样式 ==================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* 暗色模式滚动条 */
.theme-dark ::-webkit-scrollbar-track {
  background: #1e293b;
}

.theme-dark ::-webkit-scrollbar-thumb {
  background: #475569;
}

.theme-dark ::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* ==================== 表单样式 ==================== */
.form-container {
  max-width: 400px;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--border-light);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group input {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 1rem;
  background: var(--bg-light);
  color: var(--text-primary);
  transition: var(--transition-fast);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==================== 按钮悬浮光效 ==================== */
.btn-glow {
  position: relative;
}

.btn-glow::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(22, 119, 255, 0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-glow:hover::after {
  opacity: 1;
}

/* ==================== 暗色模式背景渐变 ==================== */
.theme-dark .grid-bg {
  background-image: 
    linear-gradient(rgba(96, 165, 250, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.05) 1px, transparent 1px);
}

/* ========== 内容区域宽度优化 ========== */
.main-content .content-wrapper {
  /* 移除固定 clamp 宽度的限制 */
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 16px !important; /* 设置左右安全边距 */
  box-sizing: border-box;
}

/* ========== 移动端字体 & 基础排版 ========== */
@media (max-width: 600px) {
  body { font-size: 16px; /* 防止 iOS 缩放 */ }
  h1 { font-size: 24px; margin-bottom: 16px; }
  h2 { font-size: 20px; margin-bottom: 12px; }
  h3 { font-size: 18px; margin-bottom: 8px; }

  /* 调整顶部导航高度 */
  .top-nav { height: 52px; }
  .nav-container { padding: 0 12px; }

  /* 调整底部导航高度 */
  .mobile-bottom-nav { height: 64px; padding: 6px 12px; }
  .mobile-bottom-nav .icon-wrap { width: 32px; height: 32px; }
  .mobile-nav-item { font-size: 10px; gap: 2px; }
}

/* ========== 卡片组件在移动端的优化 ========== */
.card {
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06); /* 视觉更轻盈 */
}