/* ==========================================================================
   题库大厅专用样式 - 背景分层优化
   
   修复说明：
   1. 为dashboard.html添加了.dashboard-page和.dashboard-main-content类
   2. 移除了.dashboard-main-content的背景，避免与.dashboard-sheet重复
   3. 统一使用.dashboard-sheet作为唯一的背景容器
   4. 确保其他页面(.main-content)不受影响
   
   背景层次结构（从后到前）：
   - #wallpaper-background (z-index: -1) 壁纸背景
   - .dashboard-sheet (z-index: 2) 统一白色容器背景
   ========================================================================== */

/* 题库大厅页面特定样式 - 移除main-content背景，避免分层 */
.dashboard-page .main-content,
.dashboard-page .dashboard-main-content {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding: 40px 0;
  margin: 0;
}

/* 题库大厅统一背景容器 - 合并所有背景层到这一层 */
.dashboard-sheet {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  padding: 16px 20px;
  /* 添加backdrop-filter以与壁纸更好融合 */
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
}

/* 题库大厅返回按钮区域左对齐容器 */
.dashboard-sheet .back-bar {
  display: flex;
  justify-content: flex-start;
  width: 100%;
}

.dashboard-sheet .back-bar .nav-link {
  align-self: flex-start;
  margin-left: 0;
  /* 继承下方的现代卡片样式 */
}
/* ==========================================================================
   CAAC地面站题库系统 - 主样式文件
   ========================================================================== */

/* CSS变量定义 */
:root {
  /* 主色调 */
  --primary-color: #1a73e8;
  --primary-dark: #1557b0;
  --primary-light: #4285f4;
  
  /* 辅助色 */
  --secondary-color: #34a853;
  /* 语义色扩展，供各页面统一使用 */
  --success-color: #34a853;
  --success-dark: #2d8a47;
  --success-light: #e8f5e9;
  --accent-color: #fbbc04;
  --danger-color: #ea4335;
  --danger-dark: #c82333;
  --danger-light: #fdecea;
  --warning-color: #ff9800;
  --warning-dark: #e68900;
  --info-color: #2196f3;
  --info-dark: #1976d2;
  
  /* 文字颜色 */
  --text-primary: #202124;
  --text-secondary: #5f6368;
  --text-light: #80868b;
  --text-white: #ffffff;
  
  /* 动态字体颜色（用于壁纸适配） */
  --primary-text-color: #202124;
  --secondary-text-color: #5f6368;
  --link-color: #1a73e8;
  --text-overlay-bg: rgba(255, 255, 255, 0.85);
  
  /* 背景色 */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-dark: #202124;
  --bg-overlay: rgba(0, 0, 0, 0.5);
  
  /* 边框色 */
  --border-color: #dadce0;
  --border-light: #e8eaed;
  --border-focus: #1a73e8;
  
  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  
  /* 圆角 */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  /* 过渡 */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* 字体 */
  --font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
  --font-mono: 'Consolas', 'Monaco', monospace;
}

/* 基础重置 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  line-height: 1.6;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  min-height: 100vh;
}

/* 通用样式 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  color: inherit;
}

.btn-primary {
  background-color: var(--primary-color) !important;
  color: var(--text-white) !important;
}

.btn-primary:hover {
  background-color: var(--primary-dark) !important;
}

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

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--text-white);
}

.btn-success {
  background-color: var(--secondary-color) !important;
  color: var(--text-white) !important;
}

.btn-danger {
  background-color: var(--danger-color);
  color: var(--text-white);
}

.btn-secondary {
  background-color: #6c757d !important;
  color: var(--text-white) !important;
  border: 1px solid #6c757d !important;
}

.btn-secondary:hover {
  background-color: #5a6268 !important;
  border-color: #545b62 !important;
}

.btn-warning {
  background-color: var(--warning-color) !important;
  color: var(--text-white) !important;
}

.btn-info {
  background-color: var(--info-color) !important;
  color: var(--text-white) !important;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 返回按钮样式 */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 20px;
  min-height: 36px;
  line-height: 1;
  vertical-align: middle;
}

.btn-back:hover {
  background-color: #5a6268;
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-back i {
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

/* 返回按钮外层对齐容器（用户端） */
.back-bar {
  display: flex;
  align-items: center;
  min-height: 40px;
  margin: 0 0 12px;
}

/* 仅题库大厅使用：使返回区域整体内容居中 */
.back-bar.back-bar-center { justify-content: center; }

/* 题库大厅搜索条居中 */
.banks-section .search-bar { justify-content: center; }

/* 题库大厅搜索框和按钮样式 */
.search-wrapper {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  max-width: 500px;
  margin: 0 auto;
  transition: all var(--transition-fast);
}

.search-wrapper:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.search-wrapper input {
  flex: 1;
  border: none;
  padding: 12px 16px;
  outline: none;
  font-size: 14px;
  min-width: 0; /* 确保flex项目可以收缩 */
}

.search-wrapper input:focus {
  box-shadow: none;
}

.search-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background-color var(--transition-fast);
}

.search-btn:hover {
  background: var(--primary-dark);
}

.search-btn i {
  padding: 0;
  color: white;
}

/* 清空搜索按钮样式 */
.clear-search-btn {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text-light);
  transition: color var(--transition-fast);
  display: none;
}

.clear-search-btn:hover {
  color: var(--danger-color);
}

.clear-search-btn i {
  font-size: 14px;
}

/* 搜索下拉列表样式 */
.search-wrapper {
  position: relative;
}

.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: 1000;
  max-height: 400px;
  overflow-y: auto;
  margin-top: -1px; /* 与搜索框边框对齐 */
}

/* 自定义滚动条样式 */
.search-dropdown::-webkit-scrollbar {
  width: 6px;
}

.search-dropdown::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.search-dropdown::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.search-dropdown::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.dropdown-content {
  padding: 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: all var(--transition-fast);
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background-color: var(--bg-secondary);
  transform: translateX(2px);
}

.dropdown-item:active {
  background-color: var(--primary-color);
  color: white;
}

.dropdown-item .item-number {
  background: var(--primary-color);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  margin-right: 12px;
  flex-shrink: 0;
}

.dropdown-item .item-info {
  flex: 1;
  min-width: 0;
}

.dropdown-item .item-title {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-item .item-bank {
  font-size: 12px;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
}

/* 搜索结果样式 */
.search-section {
  border-bottom: 1px solid #f0f0f0;
  padding: 8px 0;
}

.search-section:last-child {
  border-bottom: none;
}

.section-title {
  font-size: 12px;
  color: #666;
  padding: 4px 16px;
  font-weight: 600;
  background: #f8f9fa;
  margin-bottom: 4px;
}

.no-results, .search-error {
  padding: 20px;
  text-align: center;
  color: #666;
}

.no-results-icon, .error-icon {
  font-size: 24px;
  color: #ccc;
  margin-bottom: 8px;
}

.no-results-title, .error-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.no-results-suggestion, .error-message {
  font-size: 12px;
  color: #999;
}

.retry-btn {
  margin-top: 8px;
  padding: 6px 12px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.2s;
}

.retry-btn:hover {
  background: #0056b3;
}

.history-item {
  display: inline-block;
  padding: 2px 6px;
  margin: 2px;
  background: #f0f0f0;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  color: #666;
  transition: all 0.2s;
}

.history-item:hover {
  background: #e0e0e0;
  color: #333;
}

#searchStatus {
  color: #007bff;
  font-size: 12px;
}

#searchHistory {
  font-size: 11px;
  color: #666;
}
  text-overflow: ellipsis;
}

.dropdown-item .item-difficulty {
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
}

.dropdown-item .item-difficulty.beginner {
  background: #e8f5e9;
  color: #2e7d32;
}

.dropdown-item .item-difficulty.intermediate {
  background: #fff3e0;
  color: #f57c00;
}

.dropdown-item .item-difficulty.advanced {
  background: #ffebee;
  color: #c62828;
}

/* 星级按钮样式 */
.difficulty-navigation {
  background: transparent; /* 清除白框 */
  border: none;            /* 清除边框 */
  border-radius: 12px;
  padding: 8px 0; /* 缩小内边距，弱化块感 */
  margin-bottom: 12px;
}

.difficulty-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.difficulty-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: none;            /* 清除白框边线 */
  border-radius: 10px;
  background: transparent; /* 去除白底 */
  color: #666;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  user-select: none;
  pointer-events: auto !important;
  position: relative;
  z-index: 10;
}

.difficulty-tab:hover {
  background: transparent; /* 悬停也不出现白底 */
  border-color: transparent;
  color: #007bff;
  transform: translateY(-1px);
  box-shadow: none;        /* 清除阴影白框感 */
}

.difficulty-tab.active {
  background: linear-gradient(180deg, #2b7cff, #1a6fff);
  border-color: #1a6fff;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(0,123,255,0.3);
}

.difficulty-tab:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.difficulty-stars {
  display: flex;
  gap: 1px;
}

.difficulty-stars i {
  font-size: 10px;
  color: inherit;
}

.difficulty-tab.active .difficulty-stars i {
  color: #ffffff;
}

/* 确保按钮可点击 */
.difficulty-tab {
  pointer-events: auto !important;
  position: relative;
  z-index: 10;
}

/* 防止其他元素遮挡 */
.difficulty-navigation {
  position: relative;
  z-index: 5;
}

/* （恢复）移除返回条背景容器样式 */

/* 通用：毛玻璃居中容器 */
.center-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.glass-centered {
  background-color: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 10px 14px;
}

.back-bar .btn-back {
  margin-bottom: 0;
}

/* 返回首页按钮 - 现代卡片样式 */
.back-bar .nav-link {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  min-height: auto;
  padding: 12px 20px;
  
  /* 现代卡片外观 */
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-left: 4px solid var(--primary-color);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  
  /* 文字样式 - 使用最深黑色确保可见 */
  color: #000000 !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  text-decoration: none !important;
  line-height: 1.5;
  opacity: 1 !important;
  
  /* 平滑过渡动画 */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* 防止选中 */
  user-select: none;
  -webkit-user-select: none;
}

/* 悬停效果 */
.back-bar .nav-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  border-left-color: var(--primary-dark);
  background: #f0f0f0 !important;
  color: #000000 !important;
  opacity: 1 !important;
}

/* 点击效果 */
.back-bar .nav-link:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* 图标样式 */
.back-bar .nav-link i {
  font-size: 16px;
  color: var(--primary-color) !important;
  transition: transform 0.3s ease;
}

.back-bar .nav-link:hover i {
  transform: translateX(-3px);
  color: var(--primary-dark) !important;
}

/* 响应式设计 - 平板 */
@media (max-width: 1024px) {
  .back-bar .nav-link {
    padding: 10px 18px;
    font-size: 14px !important;
    color: #000000 !important;
    font-weight: 600 !important;
  }
  
  .back-bar .nav-link i {
    font-size: 15px;
  }
}

/* 响应式设计 - 手机 */
@media (max-width: 768px) {
  .back-bar .nav-link {
    padding: 10px 16px;
    font-size: 13px !important;
    gap: 8px;
    border-left-width: 3px;
    color: #000000 !important;
    font-weight: 600 !important;
  }
  
  .back-bar .nav-link i {
    font-size: 14px;
  }
}

/* 响应式设计 - 小屏手机 */
@media (max-width: 480px) {
  .back-bar .nav-link {
    padding: 8px 14px;
    font-size: 12px !important;
    border-radius: 10px;
    color: #000000 !important;
    font-weight: 600 !important;
  }
  
  .back-bar .nav-link i {
    font-size: 13px;
  }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  .back-bar .nav-link {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0 !important;
  }
  
  .back-bar .nav-link:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.15);
    color: #ffffff !important;
  }
  
  .back-bar .nav-link i {
    color: var(--primary-light) !important;
  }
}

/* 仅用于题库大厅：让"白框"居中，按钮保持居左 */
/* （恢复）移除题库大厅返回区域白框居中样式 */

/* 额外的强制样式 - 确保返回按钮文字颜色在所有情况下都清晰可见 */
.dashboard-sheet .back-bar .nav-link,
.back-bar a.nav-link,
div.back-bar > a.nav-link {
  color: #000000 !important;
  font-weight: 600 !important;
  opacity: 1 !important;
  -webkit-text-fill-color: #000000 !important;
  text-shadow: none !important;
}

.dashboard-sheet .back-bar .nav-link:hover,
.back-bar a.nav-link:hover,
div.back-bar > a.nav-link:hover {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}

.btn-back.small {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-back.large {
  padding: 12px 24px;
  font-size: 16px;
}

/* 表单样式 */
.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group label {
  font-weight: 500;
  color: var(--text-primary);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper i {
  position: absolute;
  left: 12px;
  color: var(--text-light);
  z-index: 1;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  transition: var(--transition-fast);
}

.input-wrapper input {
  padding-left: 40px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px;
  z-index: 10;
  transition: var(--transition-fast);
}

.toggle-password:hover {
  color: var(--primary-color);
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.checkbox input[type="checkbox"] {
  width: auto;
}

.error-message {
  color: var(--danger-color);
  font-size: 12px;
  margin-top: 4px;
}

/* 头部样式 */
.site-header {
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  max-width: 1200px;
  margin: 0 auto;
  gap: 20px;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
}

.logo i {
  font-size: 24px;
  color: var(--primary-color);
}

/* Logo图片样式 - 优化版本 */
.logo-image {
  width: 42px;
  height: 42px;
  object-fit: contain;
  background: none;
  border: none;
  border-radius: 4px;
  box-shadow: none;
  outline: none;
  transition: all 0.3s ease;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.1));
}

.logo-image:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 10px rgba(26, 115, 232, 0.2));
}

/* 沉浸式Logo容器增强 */
.logo a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
  padding: 8px 0;
  transition: all 0.3s ease;
}

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

.logo a:hover .logo-image {
  animation: logoGlow 1.5s ease-in-out;
}

.logo a:hover .logo-image-eagle {
  animation: eagleGlow 1.8s ease-in-out;
}

/* Logo发光动画效果 */
@keyframes logoGlow {
  0% { filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1)); }
  50% { filter: drop-shadow(0 4px 20px rgba(26, 115, 232, 0.4)); }
  100% { filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1)); }
}

/* 鹰头Logo沉浸式样式 - 无边框版本 */
.logo-image-eagle {
  width: 45px;
  height: 45px;
  object-fit: contain;
  background: none !important;
  border: none !important;
  border-radius: 0;
  box-shadow: none !important;
  outline: none !important;
  transition: all 0.3s ease;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.15));
  transform: translateZ(0);
  will-change: transform, filter;
}

.logo-image-eagle:hover {
  transform: scale(1.08) rotateY(5deg);
  filter: drop-shadow(0 5px 15px rgba(26, 115, 232, 0.25)) 
          drop-shadow(0 0 20px rgba(59, 130, 246, 0.15));
  animation: eagleGlow 1.8s ease-in-out;
}

/* 鹰头Logo发光效果 */
@keyframes eagleGlow {
  0% { 
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.15)); 
    transform: scale(1) rotateY(0deg);
  }
  30% { 
    filter: drop-shadow(0 5px 15px rgba(26, 115, 232, 0.25)) 
            drop-shadow(0 0 20px rgba(59, 130, 246, 0.2));
    transform: scale(1.08) rotateY(5deg);
  }
  60% { 
    filter: drop-shadow(0 6px 18px rgba(26, 115, 232, 0.3)) 
            drop-shadow(0 0 25px rgba(59, 130, 246, 0.25));
    transform: scale(1.1) rotateY(-3deg);
  }
  100% { 
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.15)); 
    transform: scale(1) rotateY(0deg);
  }
}

/* 确保logo在移动端正常显示 */
@media (max-width: 768px) {
  .logo-image {
    width: 36px;
    height: 36px;
  }
  
  .logo-image-eagle {
    width: 38px;
    height: 38px;
  }
  
  .logo a {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .logo-image {
    width: 32px;
    height: 32px;
  }
  
  .logo-image-eagle {
    width: 34px;
    height: 34px;
  }
  
  .logo a {
    font-size: 15px;
    gap: 10px;
  }
}

/* 移除重复的logo样式，统一使用上面的样式定义 */

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 32px;
}

/* 顶部主导航按钮容器（为 header 中的 .main-nav 提供可见按钮样式） */
.site-header .main-nav ul {
  display: flex;
  list-style: none;
  gap: 16px;
  margin: 0;
  padding: 0;
}

.site-header .main-nav li {
  margin: 0;
  padding: 0;
}

.site-header .main-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--text-secondary);
  border: 1px solid var(--border-color) !important; /* 提高优先级，避免被覆盖 */
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  background-color: transparent;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: visible;
}

.site-header .main-nav .nav-link:hover {
  color: var(--primary-color);
  border-color: var(--primary-color) !important;
  background-color: rgba(26, 115, 232, 0.05);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(26, 115, 232, 0.1);
}

.site-header .main-nav .nav-link.active {
  color: var(--primary-color);
  border-color: var(--primary-color) !important;
  background-color: rgba(26, 115, 232, 0.1);
}

.site-header .main-nav .nav-link i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  color: inherit;
}

.site-header .main-nav .nav-link span {
  color: inherit;
  font-weight: inherit;
}

/* 通用导航链接样式 - 避免与管理端侧边栏冲突 */
.general-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  text-decoration: none;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  background-color: transparent;
  font-weight: 500;
}

.general-nav .nav-link:hover,
.general-nav .nav-link.active {
  color: var(--primary-color);
  border-color: var(--primary-color);
  background-color: rgba(26, 115, 232, 0.05);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: flex-end;
  min-width: 0;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
  flex-wrap: nowrap;
}

.user-dropdown {
  position: relative;
}

.user-info-display {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  white-space: nowrap;
  min-width: 0;
  flex-shrink: 0;
}

.user-info-display span {
  font-weight: 500;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  z-index: 1000;
  padding: 8px 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition-fast);
}

.dropdown-item:hover {
  background-color: var(--bg-secondary);
}

.dropdown-divider {
  height: 1px;
  background-color: var(--border-light);
  margin: 8px 0;
}

.btn-admin {
  background-color: var(--warning-color);
  color: var(--text-white);
}

.auth-buttons {
  display: flex;
  gap: 12px;
}

/* 管理员入口 */
.admin-access {
  margin-left: 15px;
  display: flex;
  align-items: center;
}

.btn-admin {
  background-color: var(--accent-color);
  color: var(--text-primary);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: var(--transition-fast);
  border: 1px solid var(--accent-color);
}

.btn-admin:hover {
  background-color: #f57c00;
  border-color: #f57c00;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}



/* 退出登录区域 */
.logout-section {
  display: flex;
  align-items: center;
}

.btn-logout {
  background-color: var(--danger-color);
  color: var(--text-white);
  border: 1px solid var(--danger-color);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-logout:hover {
  background-color: #d32f2f;
  border-color: #d32f2f;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* 认证按钮 */
.auth-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .user-menu {
    gap: 8px;
  }
  
  .user-info {
    gap: 8px;
  }
  
  .btn-logout {
    padding: 5px 10px;
    font-size: 11px;
  }
  
  .user-info-display {
    padding: 5px 8px;
  }
  
  .user-info-display span {
    display: none;
  }
  
  .btn-logout span {
    display: none;
  }
}

/* 主内容区域 */
.main-content {
  flex: 1;
  padding: 40px 0;
}

/* 首页样式 */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--text-white);
  text-align: center;
  padding: 100px 0;
  margin-bottom: 60px;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 20px;
  margin-bottom: 40px;
  opacity: 0.9;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-buttons .btn {
  padding: 16px 32px;
  font-size: 16px;
}

.features-section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  font-size: 36px;
  margin-bottom: 60px;
  color: var(--text-primary);
  background: transparent;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
}

.feature-card {
  text-align: center;
  padding: 40px 20px;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  font-size: 32px;
}

.feature-card h3 {
  font-size: 24px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 登录注册页面 */
.auth-body {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.auth-container {
  width: 100%;
  max-width: 400px;
}

.auth-card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 40px;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.auth-header .logo i {
  font-size: 32px;
  color: var(--primary-color);
}

.auth-header h1 {
  font-size: 20px;
  color: var(--primary-color);
  margin: 0;
}

.auth-header h2 {
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.auth-header p {
  color: var(--text-secondary);
}

.auth-form {
  margin-bottom: 24px;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px 0;
}

.auth-footer {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

.auth-footer p {
  color: var(--text-secondary);
  margin: 8px 0;
}

.auth-footer a {
  color: var(--primary-color);
  text-decoration: none;
}

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

/* 题库页面 */
.page-header {
  text-align: left;
  margin-bottom: 30px;
  padding: 30px 0;
}

/* 仅个人中心页面：标题区域居中 */
.account-page .page-header {
  text-align: center;
}

.page-title {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: var(--text-primary);
  font-weight: 700;
}

.page-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.search-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  gap: 20px;
  flex-wrap: wrap;
}



.filter-buttons {
  display: flex;
  gap: 8px;
}

.filter-buttons .btn.active {
  background-color: var(--primary-color);
  color: var(--text-white);
  border-color: var(--primary-color);
}

.stats-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
  max-width: 100%;
  overflow: hidden;
}

.stat-card {
  background: var(--bg-primary);
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  overflow: hidden;
  transition: var(--transition-normal);
}

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

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--text-white);
  flex-shrink: 0;
}

.stat-card:nth-child(1) .stat-icon {
  background: var(--primary-color);
}

.stat-card:nth-child(2) .stat-icon {
  background: var(--secondary-color);
}

.stat-card:nth-child(3) .stat-icon {
  background: var(--warning-color);
}

.stat-card:nth-child(4) .stat-icon {
  background: var(--info-color);
}

.stat-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.stat-info h3 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-info p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.banks-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(200px, 1fr)); /* 5列布局，最小宽度200px */
  gap: 14px; /* 保持紧凑间距 */
  max-height: calc(2 * 400px + 14px); /* 适应6:5比例的更高缩略图，增加约三分之一高度 */
  overflow-y: auto; /* 超出内容可滚动 */
}

/* 响应式布局 - 确保在不同屏幕尺寸下的适配 */
@media (max-width: 1400px) {
  .banks-grid {
    grid-template-columns: repeat(4, minmax(180px, 1fr)); /* 中等屏幕4列 */
    max-height: calc(3 * 380px + 32px); /* 调整为3行，适应6:5比例 */
  }
  
  .bank-thumb {
    aspect-ratio: 6/5; /* 使用6:5更高比例 */
    min-height: 150px;
    max-height: 260px;
  }
}

@media (max-width: 1100px) {
  .banks-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr)); /* 小屏幕3列 */
    max-height: calc(4 * 360px + 48px); /* 调整为4行，适应6:5比例 */
  }
  
  .bank-thumb {
    aspect-ratio: 6/5; /* 使用6:5比例 */
    min-height: 140px;
    max-height: 240px;
  }
}

@media (max-width: 800px) {
  .banks-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr)); /* 很小屏幕2列 */
    max-height: calc(6 * 340px + 80px); /* 调整为6行，适应6:5比例 */
    gap: 12px;
  }
  
  .bank-thumb {
    aspect-ratio: 6/5; /* 使用6:5比例 */
    min-height: 130px;
    max-height: 220px;
  }
}

@media (max-width: 500px) {
  .banks-grid {
    grid-template-columns: 1fr; /* 手机屏幕单列 */
    max-height: none; /* 移除高度限制 */
    gap: 10px;
  }
  
  .bank-thumb {
    aspect-ratio: 6/5; /* 手机端也使用6:5比例 */
    min-height: 150px;
    max-height: 240px;
  }
}

/* 优化滚动条样式 */
.banks-grid::-webkit-scrollbar {
  width: 6px;
}

.banks-grid::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.banks-grid::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.banks-grid::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.bank-card {
  background: #ffffff; /* 纯白色背景 */
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* 轻微阴影，避免灰色边框 */
  border: 1px solid #ffffff; /* 白色边框确保一体化 */
  overflow: hidden;
  transition: var(--transition-normal);
  cursor: default;
  display: flex;
  flex-direction: column;
}

/* 自适应缩略图样式 - 更高比例确保几何图形最全面显示 */
.bank-thumb {
  width: 100%;
  aspect-ratio: 6/5; /* 更高的比例，增加三分之一垂直空间 */
  background: #ffffff url('assets/images/white-placeholder.jpg') center/contain no-repeat;
  border-radius: 8px 8px 0 0;
  position: relative;
  min-height: 180px; /* 大幅增加最小高度 */
  max-height: 300px; /* 大幅增加最大高度 */
  overflow: hidden;
  flex-shrink: 0; /* 防止被压缩 */
}

.bank-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: contain; /* 使用contain确保几何图形完整显示，不被裁切 */
  object-position: center;
  transition: transform 0.3s ease;
}

.bank-card:hover .bank-thumbnail {
  transform: scale(1.05);
}

/* 缩略图加载状态和错误处理 */
.bank-thumb.loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite;
}

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

.bank-thumb.error {
  background: #ffffff url('assets/images/white-placeholder.jpg') center/contain no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  font-size: 14px;
}

.bank-thumb.error::after {
  content: '📷 图片加载失败';
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  color: #6c757d;
}

/* 确保内容区域能够适应缩略图的变化 */
.bank-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff; /* 确保内容区域也是白色 */
}

.bank-card:hover {
  /* 移除悬停效果，只有按钮可以点击 */
}

/* 题库卡片内容样式 */
.bank-content {
  padding: 16px; /* 减小内边距以适应更小的卡片 */
}

.bank-question-count {
  color: var(--text-light);
  font-size: 13px;
  margin-bottom: 20px;
}

/* 移除问号图标样式 */

/* 移除大板块的hover效果，只保留按钮的点击功能 */

.bank-header {
  padding: 18px; /* 减小头部内边距 */
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--text-white);
}

.bank-title {
  font-size: 18px; /* 稍微减小标题字体 */
  font-weight: 600;
  margin-bottom: 6px; /* 减小底部边距 */
  line-height: 1.3; /* 改善行高 */
}

.bank-description {
  opacity: 0.9;
  font-size: 14px;
}

.bank-meta {
  display: flex;
  gap: 12px; /* 减小间距 */
  padding: 12px 18px; /* 减小内边距 */
  background: var(--bg-secondary);
  font-size: 11px; /* 稍微减小字体 */
  color: var(--text-secondary);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bank-actions {
  padding: 16px 18px; /* 减小内边距 */
  display: flex;
  gap: 10px; /* 减小按钮间距 */
}

.loading-spinner {
  text-align: center;
  padding: 60px;
  color: var(--text-light);
}

.loading-spinner i {
  font-size: 32px;
  margin-bottom: 16px;
  display: block;
}

.no-results {
  text-align: center;
  padding: 60px;
  color: var(--text-light);
}

.no-results i {
  font-size: 48px;
  margin-bottom: 20px;
  display: block;
}

/* 底部样式 */
.site-footer {
  background-color: var(--bg-dark);
  color: var(--text-white);
  margin-top: 60px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3,
.footer-section h4 {
  margin-bottom: 16px;
  color: var(--text-white);
}

.footer-section p,
.footer-section li {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-section a:hover {
  color: var(--text-white);
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.social-link:hover {
  background: var(--primary-color);
  color: var(--text-white);
}

.contact-info p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8) !important;
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-white) !important;
  text-decoration: none;
}

/* 模态框 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-overlay);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
  margin: 0;
  color: var(--text-primary);
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-light);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition-fast);
}

.close-btn:hover {
  background: var(--bg-secondary);
}

.modal-body {
  padding: 24px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  html {
    font-size: 13px;
  }
  
  .header-container {
    flex-direction: column;
    gap: 16px;
  }
  
  .main-nav ul {
    gap: 16px;
  }
  
  /* 修复用户信息和退出登录按钮重叠问题 */
  .user-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    width: 100%;
  }
  
  .user-info {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    width: 100%;
  }
  
  .user-dropdown {
    width: 100%;
  }
  
  .user-btn {
    width: 100%;
    justify-content: space-between;
    padding: 12px 16px;
  }
  
  .logout-button-container {
    margin-left: 0;
    width: 100%;
    order: 3; /* 确保退出按钮在最下方 */
  }
  
  .btn-logout {
    width: 100%;
    justify-content: center;
    font-size: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-top: 12px; /* 增加与上方元素的间距 */
    box-shadow: var(--shadow-sm); /* 添加轻微阴影 */
  }
  
  .admin-access {
    margin-left: 0;
    width: 100%;
    order: 2; /* 管理员入口在中间 */
    display: flex;
    justify-content: center;
  }
  
  .btn-admin {
    width: 100%;
    justify-content: center;
    font-size: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    max-width: 200px;
  }
  
  /* 确保下拉菜单在移动端正确显示 */
  .dropdown-menu {
    position: static;
    margin-top: 8px;
    box-shadow: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
  }
  
  .hero-title {
    font-size: 36px;
  }
  
  .hero-subtitle {
    font-size: 18px;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .search-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-wrapper {
    max-width: none;
  }
  
  .stats-overview {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .banks-grid {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  
  .auth-card {
    padding: 24px;
  }
  
  .stats-overview {
    grid-template-columns: 1fr;
  }
  
  .stat-card {
    flex-direction: column;
    text-align: center;
  }
  
  /* 进一步优化小屏幕的用户菜单布局 */
  .user-menu {
    gap: 12px;
  }
  
  .user-info {
    gap: 12px;
  }
  
  .user-btn {
    padding: 10px 14px;
    font-size: 14px;
  }
  
  .btn-logout,
  .btn-admin {
    padding: 10px 14px;
    font-size: 14px;
    margin-top: 8px;
    box-shadow: var(--shadow-sm);
  }
}

/* ==========================================================================
   个人中心页面样式
   ========================================================================== */

/* 个人中心布局 */
.account-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  margin-top: 32px;
  align-items: stretch; /* 让左右两栏等高 */
}

.account-sidebar {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  height: 100%; /* 占满栅格行高度，与右侧内容等高 */
}

.user-card {
  text-align: center;
  margin-bottom: 32px;
  padding: 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.user-avatar {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
  width: 100%;
}

.user-avatar img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
  display: block;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.avatar-upload-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: var(--transition-fast);
}

.avatar-upload-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

.user-info {
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.user-info-item {
  margin: 5px 0;
  width: 100%;
}

.user-info h3 {
  margin: 0 0 8px 0;
  color: var(--text-primary);
  font-size: 1.2rem;
}

.user-info p {
  margin: 0 0 12px 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.user-level {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary-color);
  color: white;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 500;
}

.user-level.admin {
  background: var(--accent-color);
  color: var(--text-primary);
}

/* 侧边栏导航 */
.account-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 个人中心左侧按钮：复用顶部按钮的视觉规范（纯样式，不改功能） */
.account-nav .nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  background-color: transparent;
  cursor: pointer;
  width: 100%;
  justify-content: flex-start;
}

.account-nav .nav-item:hover,
.account-nav .nav-item.active {
  color: var(--primary-color);
  border-color: var(--primary-color);
  background-color: rgba(26, 115, 232, 0.05);
}

.account-nav .nav-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  color: inherit;
}

/* 通用导航项样式 - 避免与管理端侧边栏冲突 */
.general-nav .nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  cursor: pointer;
}

.general-nav .nav-item:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.general-nav .nav-item.active {
  background: var(--primary-color);
  color: white;
}

.general-nav .nav-item i {
  width: 20px;
  text-align: center;
}

/* 主内容区域 */
.account-content {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.content-section {
  display: none;
  padding: 32px;
}

.content-section.active {
  display: block;
}

.section-header {
  margin-bottom: 32px;
  text-align: center;
}

.section-header h2 {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* 模块卡片样式 */
.module-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 24px;
  transition: var(--transition-fast);
}

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

.module-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.module-header i {
  font-size: 1.5rem;
}

.module-header h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
}

.module-content {
  padding: 24px;
}

/* 表单样式 */
.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 500;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea {
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-start;
  margin-top: 24px;
}

/* 头像设置样式 */
.avatar-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.current-avatar {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.current-avatar img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
  margin-bottom: 16px;
  display: block;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.avatar-upload {
  text-align: center;
}

/* 隐藏文件选择框中的文字 */
.avatar-upload input[type="file"] {
  display: none;
}

.avatar-upload input[type="file"]::-webkit-file-upload-button {
  display: none;
}

.avatar-upload input[type="file"]::file-selector-button {
  display: none;
}

.upload-tips {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.avatar-preview {
  margin-top: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.avatar-preview img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
  display: block;
}

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

/* 安全设置样式 */
.security-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.security-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.security-info h3 {
  margin: 0 0 8px 0;
  color: var(--text-primary);
}

.security-info p {
  margin: 0;
  color: var(--text-secondary);
}

.password-form {
  margin-top: 24px;
  padding: 24px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.password-form h3 {
  margin: 0 0 20px 0;
  color: var(--text-primary);
}

/* 学习统计样式 */
.stats-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-secondary);
  padding: 24px;
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px solid var(--border-light);
}

.stat-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.5rem;
}

.stat-info h3 {
  margin: 0 0 8px 0;
  font-size: 2rem;
  color: var(--primary-color);
}

.stat-info p {
  margin: 0;
  color: var(--text-secondary);
}

/* 学习进度图表样式 */
.progress-chart {
  margin-top: 30px;
  padding: 20px;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.progress-chart h4 {
  margin: 0 0 20px 0;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
}

.progress-container {
  display: flex;
  gap: 8px;
  align-items: end;
  height: 120px;
  padding: 20px 0;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
}

.progress-container.empty {
  justify-content: center;
  align-items: center;
  height: 80px;
  color: var(--text-light);
  font-style: italic;
}

.progress-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 40px;
  flex-shrink: 0;
}

.progress-date {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  white-space: nowrap;
}

.progress-bars {
  display: flex;
  gap: 2px;
  align-items: end;
  height: 100px;
}

.progress-bar {
  width: 16px;
  background: var(--primary-color);
  border-radius: 2px 2px 0 0;
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
  min-height: 4px;
  transition: all 0.3s ease;
}

.progress-bar.time {
  background: var(--primary-color);
}

.progress-bar.questions {
  background: var(--secondary-color);
}

.progress-bar:hover {
  transform: scaleY(1.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.progress-value {
  position: absolute;
  top: -20px;
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.progress-bar:hover .progress-value {
  opacity: 1;
}

.progress-legend {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 2px;
}

.legend-color.time {
  background: var(--primary-color);
}

.legend-color.questions {
  background: var(--secondary-color);
}

/* 响应式图表优化 */
@media (max-width: 768px) {
  .progress-container {
    height: 100px;
    gap: 6px;
  }
  
  .progress-day {
    min-width: 35px;
  }
  
  .progress-bar {
    width: 14px;
  }
  
  .progress-date {
    font-size: 11px;
  }
  
  .progress-legend {
    gap: 20px;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .progress-container {
    height: 80px;
    gap: 4px;
  }
  
  .progress-day {
    min-width: 30px;
  }
  
  .progress-bar {
    width: 12px;
  }
  
  .progress-date {
    font-size: 10px;
  }
  
  .progress-legend {
    gap: 15px;
  }
  
  .legend-item {
    font-size: 12px;
  }
}

/* 数据管理样式 */
.data-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.data-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.data-info h3 {
  margin: 0 0 8px 0;
  color: var(--text-primary);
}

.data-info p {
  margin: 0;
  color: var(--text-secondary);
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .account-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .avatar-section {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .stats-overview {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .account-sidebar {
    padding: 20px;
  }
  
  .content-section {
    padding: 24px;
  }
  
  .stats-overview {
    grid-template-columns: 1fr;
  }
  
  .security-item,
  .data-item {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .user-avatar img {
    width: 60px;
    height: 60px;
  }
  
  .current-avatar img {
    width: 80px;
    height: 80px;
  }
  
  .avatar-preview img {
    width: 80px;
    height: 80px;
  }
}

/* 工具类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.p-0 { padding: 0; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

/* ==========================================================================
   设置页面样式
   ========================================================================== */

.settings-container {
  padding: 20px 0;
}

.settings-header {
  text-align: center;
  margin-bottom: 40px;
}

.settings-header h1 {
  font-size: 2.5rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.settings-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.settings-section {
  margin-bottom: 40px;
}

.settings-section h2 {
  font-size: 1.8rem;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.module-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: 24px;
}

.module-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.module-header i {
  font-size: 1.5rem;
}

.module-header h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
}

.module-content {
  padding: 24px;
}



.radio-option {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 12px;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.radio-option:hover {
  background-color: var(--bg-secondary);
}

.radio-option input[type="radio"] {
  display: none;
}

.radio-custom {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  position: relative;
  transition: var(--transition-fast);
}

.radio-option input[type="radio"]:checked + .radio-custom {
  border-color: var(--primary-color);
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background-color: var(--primary-color);
  border-radius: 50%;
}

.font-color-options {
  margin-bottom: 24px;
}

.color-picker-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 16px 0;
}

.color-option {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.color-option label {
  font-weight: 500;
  color: var(--text-primary);
}

.color-option input[type="color"] {
  width: 100%;
  height: 40px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
}

/* ==========================================================================
   用户管理页面样式
   ========================================================================== */

.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 250px;
  background: var(--bg-dark);
  color: white;
  padding: 20px 0;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.admin-main {
  flex: 1;
  margin-left: 250px;
  padding: 20px;
  background: var(--bg-secondary);
}

.admin-header {
  background: var(--bg-primary);
  padding: 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-title {
  font-size: 1.8rem;
  color: var(--text-primary);
  margin: 0;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}

.admin-username {
  font-weight: 500;
  color: var(--text-primary);
}

.admin-logout {
  background: var(--danger-color);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.admin-logout:hover {
  background: #d32f2f;
}

.user-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-primary);
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.action-toolbar {
  background: var(--bg-primary);
  padding: 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.toolbar-left {
  display: flex;
  gap: 16px;
  align-items: center;
}

.toolbar-right {
  display: flex;
  gap: 12px;
}

.search-filter {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
}

.search-box input {
  padding: 10px 16px 10px 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  width: 250px;
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

.filter-select {
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: white;
  min-width: 120px;
}

.users-table {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-header {
  background: var(--bg-secondary);
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.table-title {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text-primary);
}

.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-primary);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 500;
  color: var(--text-primary);
}

.user-email {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-badge.active {
  background: #e8f5e8;
  color: var(--secondary-color);
}

.status-badge.inactive {
  background: #ffeaea;
  color: var(--danger-color);
}

.role-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.role-badge.admin {
  background: #e3f2fd;
  color: var(--primary-color);
}

.role-badge.user {
  background: #f3e5f5;
  color: #9c27b0;
}

.action-buttons {
  display: flex;
  gap: 8px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.pagination {
  background: var(--bg-primary);
  padding: 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.pagination-info {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.page-numbers {
  display: flex;
  gap: 8px;
}

.page-numbers .btn {
  padding: 8px 12px;
  min-width: 40px;
}

.pagination-nav {
  display: flex;
  gap: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .admin-sidebar {
    width: 100%;
    position: relative;
    height: auto;
  }
  
  .admin-main {
    margin-left: 0;
  }
  
  .action-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .toolbar-left, .toolbar-right {
    justify-content: center;
  }
  
  .search-filter {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-box input {
    width: 100%;
  }
  
  .users-table {
    font-size: 0.9rem;
  }
  
  th, td {
    padding: 12px 16px;
  }
  
  .action-buttons {
    flex-direction: column;
    gap: 4px;
  }
}

/* ==========================================================================
   文字增强样式 - 壁纸适配
   ========================================================================== */

/* 文字阴影效果 */
.text-enhanced {
  transition: text-shadow var(--transition-normal);
}

/* 标题文字增强 */
h1.text-enhanced,
h2.text-enhanced,
h3.text-enhanced {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 正文文字增强 */
p.text-enhanced,
span.text-enhanced,
div.text-enhanced {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 深色背景下的文字增强 */
body.dark-theme h1.text-enhanced,
body.dark-theme h2.text-enhanced,
body.dark-theme h3.text-enhanced {
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.3);
}

body.dark-theme p.text-enhanced,
body.dark-theme span.text-enhanced,
body.dark-theme div.text-enhanced {
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.2);
}

/* 文字背景遮罩 */
.text-overlay {
  background: var(--text-overlay-bg);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* 链接文字增强 */
a.text-enhanced {
  text-decoration: none;
  position: relative;
}

a.text-enhanced::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width var(--transition-normal);
}

a.text-enhanced:hover::after {
  width: 100%;
}

/* 响应式文字增强 */
@media (max-width: 768px) {
  .text-enhanced {
    text-shadow: none !important;
  }
  
  .text-overlay {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* ==========================================================================
   移动端用户菜单优化
   ========================================================================== */

/* 确保在所有移动端尺寸下用户菜单都有良好的布局 */
@media (max-width: 1024px) {
  .header-container {
    flex-direction: column;
    gap: 16px;
  }
  
  .main-nav ul {
    gap: 16px;
  }
  
  .user-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    width: 100%;
  }
  .user-info {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    width: 100%;
  }
  
  .user-dropdown {
    width: 100%;
  }
  
  .user-btn {
    width: 100%;
    justify-content: space-between;
    padding: 12px 16px;
  }
  
  .logout-button-container {
    margin-left: 0;
    width: 100%;
    order: 3;
  }
  
  .btn-logout {
    width: 100%;
    justify-content: center;
    font-size: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-top: 12px;
    box-shadow: var(--shadow-sm);
  }
  
  .admin-access {
    margin-left: 0;
    width: 100%;
    order: 2;
    display: flex;
    justify-content: center;
  }
  
  .btn-admin {
    width: 100%;
    justify-content: center;
    font-size: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    max-width: 200px;
  }
  
  /* 确保下拉菜单在移动端正确显示 */
  .dropdown-menu {
    position: static;
    margin-top: 8px;
    box-shadow: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
  }
}

/* 详细统计样式 */
.detailed-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.stats-detail-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #007bff;
}

.today-stats h4,
.week-stats h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.today-stat-item,
.week-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    padding: 5px 0;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

.stat-value {
    color: #007bff;
    font-weight: 600;
    font-size: 14px;
}

/* 题库统计样式 */
.module-stats-section {
    margin: 20px 0;
}

.module-stats-list h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.module-stat-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    border-left: 4px solid #28a745;
}

.module-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.module-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.module-stats .stat {
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #495057;
}

/* 学习趋势图表样式 */
.chart-container {
    min-height: 200px;
}

.trend-chart h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.trend-container {
    display: flex;
    align-items: end;
    gap: 10px;
    height: 150px;
    padding: 20px 0;
}

.trend-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.trend-date {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.trend-bar {
    background: linear-gradient(to top, #007bff, #0056b3);
    width: 20px;
    min-height: 5px;
    border-radius: 2px;
    transition: height 0.3s ease;
}

.trend-label {
    font-size: 11px;
    color: #666;
    margin-top: 5px;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .detailed-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .module-stats {
        flex-direction: column;
        gap: 8px;
    }
    
    .trend-container {
        gap: 5px;
    }
    
    .trend-bar {
        width: 15px;
    }
}

/* 无数据占位符样式 */
.no-data-placeholder {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
    margin: 40px auto;
    max-width: 500px;
}

.no-data-placeholder i {
    font-size: 48px;
    color: #6c757d;
    margin-bottom: 20px;
}

.no-data-placeholder h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 24px;
}

.no-data-placeholder p {
    color: #6c757d;
    margin-bottom: 25px;
    font-size: 16px;
    line-height: 1.5;
}

.no-data-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.no-data-actions .btn {
    min-width: 120px;
}

/* 错误占位符样式 */
.error-placeholder {
    text-align: center;
    padding: 40px 20px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    margin: 20px auto;
    max-width: 600px;
}

.error-placeholder i {
    font-size: 36px;
    color: #721c24;
    margin-bottom: 15px;
}

.error-placeholder h3 {
    color: #721c24;
    margin-bottom: 10px;
}

.error-placeholder p {
    color: #721c24;
    margin-bottom: 20px;
}

.error-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 加载占位符样式 */
.loading-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.loading-placeholder i {
    font-size: 24px;
    margin-bottom: 10px;
    color: #007bff;
}

.loading-placeholder p {
    margin: 0;
    font-size: 14px;
}

/* 历史记录样式 */
.history-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.history-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.history-filters select {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

.history-filters select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.history-stats {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 14px;
    color: #666;
}

.stat-item i {
    color: #007bff;
}

/* 历史记录列表容器 */
.history-list {
    min-height: 200px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

/* 历史记录项 - 列表样式 */
.history-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item:hover {
    background: #f8f9fa;
    transform: translateX(4px);
}

.history-item:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: transparent;
    transition: background 0.2s ease;
}

.history-item:hover:before {
    background: #007bff;
}

/* 列表项左侧图标区域 */
.history-item-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    margin-right: 1rem;
    transition: all 0.2s ease;
}

.history-item:hover .history-item-icon {
    background: #e3f2fd;
    transform: scale(1.05);
}

.history-item-icon i {
    font-size: 20px;
    color: #007bff;
}

/* 列表项主要内容区域 */
.history-item-content {
    flex: 1;
    min-width: 0;
}

.history-item-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.question-title {
    flex: 1;
    min-width: 0;
    margin-right: 1rem;
}

.question-title h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.question-sequence {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    min-width: 2.5rem;
    text-align: center;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

/* 访问时间显示 */
.visit-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 13px;
    color: #666;
    font-weight: 500;
    flex-shrink: 0;
}

.visit-time i {
    color: #999;
    font-size: 12px;
}

/* 题目元信息 */
.question-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.question-type {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 12px;
    color: #666;
    background: #f1f3f5;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-weight: 500;
}

.question-type i {
    color: #007bff;
    font-size: 11px;
}

.bank-name, .difficulty {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 11px;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-weight: 500;
    border: 1px solid transparent;
}

.bank-name {
    background: #e8f5e8;
    color: #2e7d2e;
    border-color: #c8e6c8;
}

.bank-name i {
    color: #2e7d2e;
}

.difficulty-beginner {
    background: #d4f6d4;
    color: #1e6b1e;
    border-color: #a8e6a8;
}

.difficulty-intermediate {
    background: #fff4d4;
    color: #b8860b;
    border-color: #f0d060;
}

.difficulty-advanced {
    background: #fdd4d4;
    color: #dc3545;
    border-color: #f5a6a6;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .history-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }
    
    .history-item-icon {
        width: 40px;
        height: 40px;
        margin-right: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .history-item-main {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    .question-title {
        margin-right: 0;
        margin-bottom: 0.5rem;
        width: 100%;
    }
    
    .question-title h4 {
        white-space: normal;
        overflow: visible;
    }
    
    .question-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

.history-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem;
}

.page-info {
    font-size: 14px;
    color: #666;
}

.no-history {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.no-history i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ccc;
}

.no-history h3 {
    margin: 1rem 0 0.5rem 0;
    color: #999;
}

.no-history p {
    margin: 0;
    font-size: 16px;
}