/* style.css - 现代化响应式设计 */

/* ====== 基础设置 ====== */
:root {
  /* 颜色变量 */
  --primary-color: #5190A6;
  --primary-hover: #3a56e7;
  --secondary-color: #3f8efc;
  --success-color: #A0CB2A;
  --danger-color: #DD9191;
  --warning-color: #CBA52A;
  --info-color: #80C3EF;
  --light-color: #f8f9fa;
  --dark-color: #1773B0;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  
  --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  
  /* 字体与尺寸 */
  --font-main: 'Roboto', 'Noto Sans SC', sans-serif;
  --border-radius: 0.5rem;
  --box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;

  /* 文字颜色 */
  --text-color: #212529;
  --text-muted: #6c757d;
}

/* 1. 基础重置：清除默认边距/内边距，统一字体 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* 用无衬线字体，更显简洁；取消加粗/斜体等多余样式 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-sans-serif);
  font-size: 15px; /* 14px 基础字号 */
  color: var(--text-color);
  line-height: 1.5;
}


.card {
  border-color: rgba(0, 0, 0, 0.125);
  box-shadow: none !important; /* 取消阴影，贴近原图无装饰风格 */
  border: 1px solid #ddd !important; /* 仅保留细边框，避免粗边框显臃肿 */
  border-radius: 2px !important; /* 极小圆角（或0），原图风格更锐利 */
  margin-bottom: 8px !important; /* 元素底部间距从1.5rem→8px */
  padding: 8px !important; /* 卡片内边距从1.5rem→8px */
}

.card-header {
  background-color: #f8f9fa;
  border-bottom-color: rgba(0, 0, 0, 0.125);
}

.table {
  --bs-table-color: #212529;
  --bs-table-bg: transparent;
  --bs-table-striped-color: #212529;
  --bs-table-striped-bg: rgba(0, 0, 0, 0.02);
  --bs-table-hover-color: #212529;
  --bs-table-hover-bg: rgba(0, 0, 0, 0.075);
}

/* 按钮颜色统一 */
.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #0b5ed7;
  --bs-btn-hover-border-color: #0a58ca;
}

.btn-danger {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--danger);
  --bs-btn-border-color: var(--danger);
}

/* 警告框颜色统一 */
.alert-info {
  --bs-alert-color: #055160;
  --bs-alert-bg: #cff4fc;
  --bs-alert-border-color: #b6effb;
}

/* 徽章颜色统一 */
.badge {
  --bs-badge-font-size: 0.75em;
  --bs-badge-font-weight: 700;
  --bs-badge-padding-x: 0.35em;
  --bs-badge-padding-y: 0.25em;
}

.badge.bg-primary {
  --bs-badge-color: #fff;
  --bs-badge-bg: var(--primary);
}
/* ====== 顶部导航栏 ====== */
nav {
  background-color: #fff;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  padding: 0.8rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.nav-left {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
}

.nav-logo {
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  margin-right: 2rem;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.nav-logo i {
  margin-right: 0.5rem;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center; /* 电脑模式下剧中 */
  width: 100%;
}

.nav-link {
  color: var(--gray-700);
  text-decoration: none;
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.nav-link:hover {
  background-color: var(--gray-100);
  color: var(--primary-color);
}

.nav-link.active {
  background-color: var(--primary-color);
  color: white;
}

.nav-right .logout-link {
  background-color: var(--danger-color);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  color: white;
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
}

.nav-right .logout-link:hover {
  background-color: #d32f2f;
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  background: var(--primary-color);
  border: none;
  font-size: 1.5rem;
  color: white;
  cursor: pointer;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(67, 97, 238, 0.3);
  z-index: 1001;
}

/* ====== 主内容容器 ====== */
.container {
  width: 100%;
  max-width: 800px !important; /* 缩小页面最大宽度，避免元素分散 */
  margin: 0 auto !important;
  padding: 5px !important; /* 容器内边距从1rem→5px，更紧凑 */
  flex: 1;
}

.card {
  background-color: white;
  margin-bottom: 8px !important; /* 元素底部间距从1.5rem→8px */
  padding: 8px !important; /* 卡片内边距从1.5rem→8px */
  transition: var(--transition);
  box-shadow: none !important; /* 取消阴影，贴近原图无装饰风格 */
  border: 1px solid #ddd !important; /* 仅保留细边框，避免粗边框显臃肿 */
  border-radius: 2px !important; /* 极小圆角（或0），原图风格更锐利 */
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.8rem 1.5rem rgba(0, 0, 0, 0.1);
}

.card-title {
  color: var(--gray-800);
  margin-bottom: 1rem;
  font-weight: 600;
}

.card-subtitle {
  color: var(--gray-600);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* ====== 表单元素 ====== */
.form-group {
  margin-bottom: 8px !important; /* 元素底部间距从1.5rem→8px */
  padding: 8px !important; /* 卡片内边距从1.5rem→8px */
}

.form-label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 500;
  color: var(--gray-700);
}

.form-control {
  width: 100%;
  padding: 4px 8px !important; /* 内边距从0.75rem→4px，控件更小巧 */
  height: auto !important; /* 取消固定高度，随内容自适应 */
  font-size: 1rem;
  line-height: 1.5;
  color: var(--gray-700);
  background-color: #fff;
  background-clip: padding-box;
  transition: var(--transition);
  -webkit-appearance: none; /* 移除iOS默认样式 */
  appearance: none;
  /* 移动端触摸优化 */
  touch-action: manipulation;
  box-shadow: none !important; /* 取消阴影，贴近原图无装饰风格 */
  border: 1px solid #ddd !important; /* 仅保留细边框，避免粗边框显臃肿 */
  border-radius: 2px !important; /* 极小圆角（或0），原图风格更锐利 */
}

.form-control:focus {
  border-color: var(--primary-color);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.25);
}

/* 输入框优化 */
input.form-control {
  min-height: 2.75rem; /* 确保触摸区域足够大 */
}

.input-group {
    display: flex;
    align-items: center;
}

.input-icon {
    padding: 0.375rem 0.75rem;
    border: none #ced4da;
    border-right: none;
}

input::placeholder {
    color: #ccc !important; /* 浅灰色（可根据需求调整色值） */
    opacity: 1; /* 确保 Firefox 中不透明度为 1（默认可能较低） */
}

/* 为移动设备优化的选择框 */
select.form-control {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c757d' d='M3.5 4.5L6 7l2.5-2.5L10 6l-4 4-4-4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 0.75rem;
  padding-right: 0.5rem;
}

/* 为移动设备优化的复选框和单选框 */
.option-checkbox,
input[type="checkbox"],
input[type="radio"] {
  min-width: 1.5rem;
  min-height: 1.5rem;
  margin-top: 0rem; /* 微调顶部间距，与文本中线对齐 */
  margin-right: 0.75rem;
  vertical-align: middle; /* 关键：与文本垂直居中对齐 */
  /* 确保足够大的触摸区域 */
}



/* ====== 按钮样式 ====== */
.btn {
  display: inline-block;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid #ddd !important; /* 仅保留细边框，避免粗边框显臃肿 */
  padding: 4px 8px !important; /* 内边距从0.75rem→4px，控件更小巧 */
  height: auto !important; /* 取消固定高度，随内容自适应 */
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 2px !important; /* 极小圆角（或0），原图风格更锐利 */
  box-shadow: none !important; /* 取消阴影，贴近原图无装饰风格 */
  transition: var(--transition);
  cursor: pointer;
  /* 触摸优化 */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
  /* 确保移动端触摸区域足够大 */
  min-height: 2.75rem;
}

/* 添加触摸反馈效果 */
.btn::after {
  content: '';
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.3) 10%, transparent 10.01%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10, 10);
  opacity: 0;
  transition: transform 0.5s, opacity 0.8s;
}

.btn:active::after {
  transform: scale(0, 0);
  opacity: 0.3;
  transition: 0s;
}

.btn:focus {
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.25);
}

.btn-primary {
  color: #fff;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-2px);
}

.btn-success {
  color: #fff;
  background-color: var(--success-color);
  border-color: var(--success-color);
}

.btn-success:hover {
  background-color: #25a99d;
  border-color: #25a99d;
  transform: translateY(-2px);
}

.btn-danger {
  color: #fff;
  background-color: var(--danger-color);
  border-color: var(--danger-color);
}

.btn-danger:hover {
  background-color: #d32f2f;
  border-color: #d32f2f;
  transform: translateY(-2px);
}

.btn-warning {
  color: #212529;
  background-color: var(--warning-color);
  border-color: var(--warning-color);
}

.btn-warning:hover {
  background-color: #e5a602;
  border-color: #e5a602;
  transform: translateY(-2px);
}

.btn-outline-primary {
  color: var(--primary-color);
  background-color: transparent;
  border-color: var(--primary-color);
}

.btn-outline-primary:hover {
  color: #fff;
  background-color: var(--primary-color);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  min-height: 2.0rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.25rem;
  min-height: 3.25rem;
}

.btn-block {
  display: block;
  width: 100%;
}

/* 按钮文字响应式显示 */
.btn-text {
	display: none;
}

@media (min-width: 768px) {
    .btn-text {
        display: inline;
    }
}


.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 比例 */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}


textarea.form-control {
    overflow-y: auto;
    resize: vertical; /* 允许用户垂直调整高度（可选） */
}

/* 添加iframe专用样式 */
.question-stem iframe,
.answer-content iframe,
.explanation-content iframe {
    max-width: 100% !important;
    max-height: none !important;
    width: 100%;
    height: 400px;
}


/* 控制试题中的图片显示 */
.question-stem img,
.option-text img,
.question-media
{
	max-width: 95%; /* 最大宽度不超过父容器 */
	height: auto; /* 高度自动，保持比例 */
	
}








/* 更小屏幕的按钮优化 */
@media (max-width: 480px) {
  .btn {
    font-size: 0.95rem;
	box-shadow: none !important; /* 取消阴影，贴近原图无装饰风格 */
    border: 1px solid #ddd !important; /* 仅保留细边框，避免粗边框显臃肿 */
    border-radius: 2px !important; /* 极小圆角（或0），原图风格更锐利 */
	padding: 4px 8px !important; /* 内边距从0.75rem→4px，控件更小巧 */
    height: auto !important; /* 取消固定高度，随内容自适应 */
  }
  
  .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
  }
  
  .btn-lg {
    padding: 0.9rem 1.75rem;
    font-size: 1.1rem;
  }
}

/* ====== 徽章 ====== */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 50rem;
}

.badge-primary { background-color: var(--primary-color); color: white; }
.badge-success { background-color: var(--success-color); color: white; }
.badge-danger { background-color: var(--danger-color); color: white; }
.badge-warning { background-color: var(--warning-color); color: var(--gray-800); }
.badge-info { background-color: var(--info-color); color: white; }


.question-header {
    display: flex;
    justify-content: space-between; /* 左右两端对齐 */
    align-items: flex-start; /* 垂直居中对齐 */
    width: 100%;
    padding: 5px 5px;
    margin-bottom: 5px;
}

.question-info {
    display: flex;
    align-items: flex-start;
    gap: 5px; /* 题目信息和题型标签之间的间距 */
	flex-wrap: nowrap;

}

.question-number {
    background-color: white;
    color: black;
    padding: 2px 6px;
    border-radius: 2px;
    font-weight: 500;
}

.question-type {
    background-color: #e8f0fe;
    color: #1967d2;
    padding: 4px 6px;
    border-radius: 12px;
    font-size: 16px;
}

.question-difficulty {
  padding: 0.35rem 0.75rem;
  border-radius: var(--border-radius);
  font-weight: 500;
}

.difficulty-easy { background-color: #a3e635; color: var(--gray-800); }
.difficulty-medium { background-color: #facc15; color: var(--gray-800); }
.difficulty-hard { background-color: #f87171; color: white; }

/* 调整题干下方间距 */
.question-stem {
  font-size: 1rem;
  margin-bottom: 1rem; /* 减小题干与选项的距离 */
}

.answer-content{
  font-size: 1rem;
  margin-bottom: 1rem; /* 减小题干与选项的距离 */
}

.options-list {
  font-size: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem; /* 选项之间的间距 */
  margin: 0.5rem 0;
  padding: 0.5rem; /* 增加内边距避免边缘拥挤 */
}

.option-item {
  /* 基础设置：不限制最大宽度，让内容决定 */
  flex: 1 1 auto; /* 关键：让元素根据内容自动计算宽度 */
  min-width: calc(25% - 0.75rem); /* 大屏幕最小宽度(4列基准) */
  max-width: 25%; /* 允许最大宽度为100% */
  box-sizing: border-box;
  margin-bottom: 1rem !important;
  line-height: 1.3 !important;
  padding: 0.5rem;
  position: relative;
  overflow: visible;
}

/* 图片核心控制 */
.option-item img {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  object-fit: contain;
  margin: 0 auto 0.5rem;
}

/* 文本内容处理 */
.option-item .option-text {
  word-break: break-word;
  overflow-wrap: break-word;
}

/* 中等屏幕：最小宽度设为50%基准(2列) */
@media (min-width: 768px) and (max-width: 991px) {
  .option-item {
    min-width: calc(50% - 0.75rem);
  }
}

/* 小屏幕：最小宽度设为100%(1列) */
@media (max-width: 767px) {
  .option-item {
    min-width: calc(50% - 0.75rem);
  }
}
.option-label {
  display: flex;
  align-items: center;
  padding: 1rem;
  background-color: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  /* 移动端触摸优化 */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

/* 添加触摸反馈效果 */
.option-label::after {
  content: '';
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(67, 97, 238, 0.1) 10%, transparent 10.01%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10, 10);
  opacity: 0;
  transition: transform 0.5s, opacity 0.8s;
}

.option-label:active::after {
  transform: scale(0, 0);
  opacity: 0.3;
  transition: 0s;
}

.option-label:hover {
  background-color: var(--gray-200);
}

/* 选中状态增强 */
.option-item input:checked + .option-text {
  font-weight: 500;
  color: var(--primary-color);
}

.option-item input:checked ~ .option-label {
  background-color: rgba(67, 97, 238, 0.05);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 1px var(--primary-color);
}

.option-text {
  flex: 1;
}

/* 移动设备优化 */
@media (max-width: 768px) {
  .option-label {
    padding: 0.75rem;
  }
  
  .option-checkbox {
    transform: scale(1.5);
    margin-right: 0.75rem;
  }
}

@media (max-width: 480px) {
  .option-label {
    padding: 0.75rem;
  }
  
}


.favorite-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: white;
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.favorite-btn:hover {
  background-color: var(--gray-100);
}

.favorite-btn.active {
  background-color: var(--warning-color);
  border-color: var(--warning-color);
  color: var(--gray-800);
}

.result-message {
  margin: 1.5rem 0;
  padding: 1rem;
  border-radius: var(--border-radius);
  font-weight: 500;
}

.result-correct {
  background-color: rgba(46, 196, 182, 0.2);
  color: #1a8a7e;
  border-left: 4px solid var(--success-color);
}

.result-incorrect {
  background-color: rgba(230, 57, 70, 0.2);
  color: #b71c1c;
  border-left: 4px solid var(--danger-color);
}

/* ====== 进度条 ====== */
.progress-container {
  margin-bottom: 2rem;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.progress-title {
  font-weight: 500;
  color: var(--gray-700);
}

.progress-value {
  font-weight: 600;
  color: var(--primary-color);
}

.progress-bar-container {
  width: 100%;
  height: 0.75rem;
  background-color: var(--gray-200);
  border-radius: 1rem;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 1rem;
  transition: width 0.3s ease;
}

/* ====== 表格样式 ====== */
.table-container {
  overflow-x: auto;
  margin-bottom: 0.2rem;
  /* 添加移动端水平滚动支持 */
  -webkit-overflow-scrolling: touch;
  position: relative;
}

/* 添加滚动指示器 */
.table-container::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 20px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(0, 0, 0, 0.05));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

/* 仅在可滚动且非移动设备上显示滚动指示器 */
@media (min-width: 769px) {
  .table-container.is-scrollable::after {
    opacity: 1;
  }
}

.table {
  width: 100%;
  margin-bottom: 8px !important;
  border-collapse: collapse !important; /* 合并边框，更紧凑 */
  /* 确保表格在移动设备上不会被压缩 */
  table-layout: fixed;
}

.table th,
.table td {
  text-align: left;
  /* 移动端文本处理 */
  word-wrap: break-word;
  overflow-wrap: break-word;
  padding: 4px 8px !important; /* 单元格内边距从1rem→4px */
  border-bottom: 1px solid #ddd !important;
  line-height: 1.3 !important;
}

.table th {
  color: var(--gray-700);
  /* 粘性表头，在水平滚动时保持可见 */
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: #fff !important; /* 取消表头背景色，更简洁 */
  font-weight: 400 !important; /* 表头文字不加粗 */
}

.table tbody tr {
  transition: var(--transition);
}

.table tbody tr:hover {
  background-color: rgba(67, 97, 238, 0.05);
}

/* 响应式表格 - 移动优化 */
@media (max-width: 768px) {
  .table-container {
    margin-left: -1rem;
    margin-right: -1rem;
    width: calc(100% + 0.2rem);
    padding: 0 1rem;
    /* 添加滚动提示 */
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) transparent;
  }
  
  .table th,
  .table td {
    padding: 0.25rem 0.5rem;
    font-size: 1.5rem;
  }
  
  /* 特定表格列宽调整 - 适用于答题历史表格 */
  .table th:nth-child(1), 
  .table td:nth-child(1) {
    width: 40px;
    min-width: 40px;
  }
  
  .table th:nth-child(2), 
  .table td:nth-child(2) {
    width: 60px;
    min-width: 60px;
  }
  
  .table th:nth-child(3), 
  .table td:nth-child(3) {
    width: auto;
    min-width: 120px;
  }
  
  .table th:nth-child(4), 
  .table td:nth-child(4) {
    width: 60px;
    min-width: 60px;
  }
  
  .table th:nth-child(5), 
  .table td:nth-child(5) {
    width: 80px;
    min-width: 60px;
  }
  
  .table th:nth-child(6), 
  .table td:nth-child(6) {
    width: 100px;
    min-width: 100px;
  }
  
  /* 为小屏幕添加水平滚动提示 */
  .table-scroll-hint {
    display: block;
    text-align: center;
    color: var(--gray-600);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    opacity: 0.7;
  }
  
  /* 卡片式移动表格 - 用于特定表格 */
  .table.table-card-mobile {
    border: 0;
  }
  
  .table.table-card-mobile thead {
    display: none; /* 隐藏表头 */
  }
  
  .table.table-card-mobile tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
  }
  
  .table.table-card-mobile td {
    display: block;
    text-align: right;
    border-bottom: 1px solid var(--gray-200);
    position: relative;
    padding-left: 50%;
  }
  
  .table.table-card-mobile td:last-child {
    border-bottom: 0;
  }
  

}

@media (max-width: 480px) {
  .table th,
  .table td {
    padding: 0.25rem 0.5rem;
    font-size: 1.5rem;
  }
  
  .nav-right .logout-link {
    width: 95%;
  }
}

/* ====== 卡片样式 ====== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.5rem;
}

.stat-card {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.8rem 1.5rem rgba(0, 0, 0, 0.1);
}

.stat-icon {
  width: 3rem;
  height: 3rem;
  background-color: rgba(67, 97, 238, 0.1);
  color: var(--primary-color);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--gray-600);
  font-size: 1rem;
}

/* ====== 登录/注册页面 ====== */
.auth-container {
  max-width: 480px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-title {
  text-align: center;
  color: var(--gray-800);
  font-size: 1.75rem;
  margin-bottom: 2rem;
}

.auth-form {
  margin-bottom: 1.5rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
}

.auth-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* ====== 提醒消息 ====== */
.alert {
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 500;
}

.alert-success {
  background-color: rgba(46, 196, 182, 0.2);
  color: #1a8a7e;
  border-left: 4px solid var(--success-color);
}

.alert-danger {
  background-color: rgba(230, 57, 70, 0.2);
  color: #b71c1c;
  border-left: 4px solid var(--danger-color);
}

.alert-warning {
  background-color: rgba(255, 183, 3, 0.2);
  color: #9c6d00;
  border-left: 4px solid var(--warning-color);
}

.alert-info {
  background-color: rgba(76, 201, 240, 0.2);
  color: #0277bd;
  border-left: 4px solid var(--info-color);
}

/* ====== 倒计时样式 ====== */
.countdown-container {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 2rem;
}

.countdown-title {
  color: var(--gray-700);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.countdown-timer {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.countdown-warning {
  color: var(--warning-color);
}

.countdown-danger {
  color: var(--danger-color);
}

/* ====== 页脚样式 ====== */
.footer {
  background-color: white;
  padding: 2rem 0;
  margin-top: auto;
  text-align: center;
  border-top: 1px solid var(--gray-200);
}

.footer-text {
  color: var(--gray-600);
  font-size: 0.875rem;
}

.footer-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.footer-link:hover {
  text-decoration: underline;
}

.form-check-label {
    cursor: pointer;
}


/* 优化复选框样式 */
.form-check-input {
  width: 18px;
  height: 18px;
  /* 增加边框宽度到2px（默认通常是1px） */
  border-width: 2px !important;
  /* 加深边框颜色（使用深灰色） */

  accent-color: var(--primary-color);
  margin-right: 8px;
}

/* 保持hover和focus状态的样式协调 */
.form-check-input:hover {
  /* 悬停时边框颜色稍浅但仍深于默认 */
  border-color: #333 !important;
}

.form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(81, 144, 166, 0.2);
  /* 聚焦时保持深色边框 */
  border-color: #555 !important;
}

/* ====== 响应式设计 ====== */
@media (max-width: 992px) {
  .nav-left {
    gap: 0.5rem;
  }
  
  .nav-link {
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
  }
  
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .stat-value {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.1rem;
  }
  
  .nav-logo {
    margin-right: 0;

	white-space: nowrap;
  }
  
  .nav-links {
    display: none !important;
	transform: translateX(-100%);
    width: 100%;
    flex-direction: column;
    margin-top: 1rem;
    flex-wrap: nowrap;
    background: white;
    border-radius: 12px;
    padding: 0.4rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-height: 50vh;
    overflow-y: auto;
    position: absolute;
    right: 0.1rem;
    width: auto;
    min-width: 200px
    max-width: 80%;
	gap: 4px !important;
    top: 2rem;
    /* 添加平滑滚动 */
    scroll-behavior: smooth;
    /* 美化滚动条 */
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) transparent;
  }
  
  .nav-links::-webkit-scrollbar {
    width: 6px;
  }
  
  .nav-links::-webkit-scrollbar-track {
    background: transparent;
  }
  
  .nav-links::-webkit-scrollbar-thumb {
    background-color: var(--gray-300);
    border-radius: 5px;
  }
  
  /* 菜单打开时添加背景遮罩 */
  .menu-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 999;
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .menu-backdrop.active {
    display: block;
    opacity: 1;
  }
  
  .nav-links.active {
    display: block !important; /* 激活时才显示 */
	transform: translateX(0);
    position: relative;
    z-index: 1000;
  }
  
 
  
  .nav-link {
    padding: 4px 8px !important;
    width: 100%;
    border-radius: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    margin-bottom: 0.3rem;
    font-weight: 500;
    transition: all 0.2s ease;
    background-color: var(--gray-100);
  }
  
  .nav-link i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    color: var(--primary-color);
  }
  
  .nav-link:last-child {
    margin-bottom: 0;
  }
  
  .nav-link:hover {
    background-color: var(--gray-200);
    transform: translateX(3px);
  }
  
  .nav-link.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.25);
  }
  
  .nav-link.active i {
    color: white;
  }
  
  .menu-toggle {
    display: flex;
    position: absolute;
    top: 1rem;
    right: 1rem;
    transform: scale(1);
  }
  
  .menu-toggle:active {
    transform: scale(0.92);
  }
  
  .nav-right {
    width: 100%;
    margin-top: 1.25rem;
    display: flex;
    justify-content: center;
    padding: 0.1rem;
    box-sizing: border-box;
  }
  
  .nav-right .logout-link {
    width: 100%;
    padding: 0.8rem 1rem;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  .question-actions {
    flex-direction: column;
    gap: 1rem;
  }
  
  .question-actions button {
    width: 100%;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  
  .table-container {
    margin-left: -1rem;
    margin-right: -1rem;
    width: calc(100% + 2rem);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 1rem;
  }
  
  .option-label {
    padding: 0.5rem;
  }
  
  .option-checkbox {
    margin-right: 0.75rem;
}
  
  .pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }
}

@media (max-width: 576px) {
  body {
    font-size: 15px;
  }
  
  .container {
    max-width: 800px !important; /* 缩小页面最大宽度，避免元素分散 */
    margin: 0 auto !important;
    padding: 5px !important; /* 容器内边距从1rem→5px，更紧凑 */
  }
  

  .card-title {
    font-size: 1.2rem;
  }
  
  .auth-container {
    margin: 0.1rem;
    max-width: none;
  }
  
  
  .nav-links {
  display: none !important;
  transform: translateX(-100%);
  visibility: hidden; /* 额外增加，确保不占据空间 */
}

.nav-links.active {
  display: block !important;
  transform: translateX(0);
  visibility: visible;
}
  .question-stem {
    font-size: 1rem;
  }
  

  .option-list {
    font-size: 1rem;
  }
  
  .option-label {
    padding: 0.75rem;
  }
  
  .stat-value {
    font-size: 1.65rem;
  }
  
  .countdown-timer {
    font-size: 1.85rem;
  }

  
  .btn {
	box-shadow: none !important; /* 取消阴影，贴近原图无装饰风格 */
    border: 1px solid #ddd !important; /* 仅保留细边框，避免粗边框显臃肿 */
    border-radius: 2px !important; /* 极小圆角（或0），原图风格更锐利 */
	padding: 4px 8px !important; /* 内边距从0.75rem→4px，控件更小巧 */
    height: auto !important; /* 取消固定高度，随内容自适应 */
  }
  
  .btn-block {
    width: 100%;
  }
  
  .form-control {
    padding: 4px 8px !important; /* 内边距从0.75rem→4px，控件更小巧 */
    height: auto !important; /* 取消固定高度，随内容自适应 */
    font-size: 1rem;
	box-shadow: none !important; /* 取消阴影，贴近原图无装饰风格 */
    border: 1px solid #ddd !important; /* 仅保留细边框，避免粗边框显臃肿 */
    border-radius: 2px !important; /* 极小圆角（或0），原图风格更锐利 */
  }
  
  .footer {
    padding: 1.5rem 0;
  }
  
  .footer-text {
    font-size: 0.8rem;
  }
  
    .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
  }
}

/* 更多手机端优化 */
@media (max-width: 480px) {
  body {
    font-size: 15px;
  }
  
  .container {
    padding: 0.05rem;
	max-width: 800px !important; /* 缩小页面最大宽度，避免元素分散 */
    margin: 0 auto !important;
    padding: 5px !important; /* 容器内边距从1rem→5px，更紧凑 */
  }

  
  .card-title {
    font-size: 1rem;
    margin-bottom: 0.2rem;
  }
  
  .question-stem {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  
  .option-label {
    padding: 0.625rem;
  }
  
  .option-checkbox {
    transform: scale(1.2);
  }
  
  .btn {
    font-size: 1rem;
	box-shadow: none !important; /* 取消阴影，贴近原图无装饰风格 */
    border: 1px solid #ddd !important; /* 仅保留细边框，避免粗边框显臃肿 */
    border-radius: 2px !important; /* 极小圆角（或0），原图风格更锐利 */
    padding: 4px 8px !important; /* 内边距从0.75rem→4px，控件更小巧 */
    height: auto !important; /* 取消固定高度，随内容自适应 */
  }
  
  .badge {
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
  }
  
  .alert {
    padding: 0.85rem;
    margin-bottom: 1.25rem;
  }
  
  .stat-card {
    padding: 0.25rem;
  }
  
  .stat-value {
    font-size: 1.5rem;
  }
  
  .stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.25rem;
  }
  
  .auth-container {
    padding: 1.5rem 1rem;
  }
  
  .auth-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .countdown-timer {
    font-size: 1.75rem;
  }
  
  .nav-links {
  display: none !important;
  transform: translateX(-100%);
  visibility: hidden; /* 额外增加，确保不占据空间 */
}

.nav-links.active {
  display: block !important;
  transform: translateX(0);
  visibility: visible;
}
  /* 更小屏幕的导航菜单优化 */
  .nav-links {
    margin-top: 1.25rem;
    padding: 0.65rem;
    max-height: 60vh;
    right: 0.85rem;
  }
  
  .nav-link {
    padding: 0.85rem;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    text-align: left;
  }
  
  .nav-link i {
    margin-right: 0.6rem;
    font-size: 1rem;
    width: 20px;
  }
  
  .menu-toggle {
    width: 38px;
    height: 38px;
    font-size: 1.35rem;
    top: 0.85rem;
    right: 0.85rem;
  }
}

/* ====== 主题色变量自定义 ====== */
[data-theme="blue"] {
  --primary-color: #9CC6D4;
  --primary-hover: #3a56e7;
}

[data-theme="green"] {
  --primary-color: #5BB9A1;
  --primary-hover: #25a99d;
}

[data-theme="purple"] {
  --primary-color: #A15BB9;
  --primary-hover: #5f08a0;
}

[data-theme="orange"] {
  --primary-color: #B9A15B;
  --primary-hover: #e67700;
}

/* ====== 翻页样式 ====== */
.pagination {
  display: flex;
  padding-left: 0;
  list-style: none;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
}

.page-item {
  position: relative;
  display: block;
}

.page-item:not(:first-child) .page-link {
  margin-left: -1px;
}

.page-item.active .page-link {
  z-index: 3;
  color: #fff;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.page-item.disabled .page-link {
  color: #6c757d;
  pointer-events: none;
  background-color: #fff;
  border-color: #dee2e6;
}

.page-link {
  position: relative;
  display: block;
  color: var(--primary-color);
  text-decoration: none;
  background-color: #fff;
  border: 1px solid #dee2e6;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  padding: 0.375rem 0.75rem;
  margin-left: -1px;
  line-height: 1.25;
}

.page-link:hover {
  z-index: 2;
  color: var(--primary-hover);
  text-decoration: none;
  background-color: #e9ecef;
  border-color: #dee2e6;
}

.page-link:focus {
  z-index: 3;
  color: var(--primary-hover);
  background-color: #e9ecef;
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.25);
}

.page-item:first-child .page-link {
  border-top-left-radius: var(--border-radius);
  border-bottom-left-radius: var(--border-radius);
}

.page-item:last-child .page-link {
  border-top-right-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
}

.pagination-lg .page-link {
  padding: 0.75rem 1.5rem;
  font-size: 1.25rem;
}

.pagination-sm .page-link {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

/* ====== 答题历史记录文本限制 ====== */
.question-text-truncate {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 移动端答题历史文本限制 */
@media (max-width: 768px) {
  .question-text-truncate {
    max-width: 150px;
  }
}

@media (max-width: 576px) {
  .question-text-truncate {
    max-width: 120px;
  }
}

@media (max-width: 480px) {
  .question-text-truncate {
    max-width: 100px;
  }
}

/* ====== 辅助工具类 ====== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-decoration-none { text-decoration: none !important; }

/* Margin utilities */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }
.mb-4 { margin-bottom: 2rem !important; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mt-4 { margin-top: 2rem !important; }
.me-1 { margin-right: 0.5rem !important; }
.me-2 { margin-right: 1rem !important; }
.me-3 { margin-right: 1.5rem !important; }
.ms-1 { margin-left: 0.5rem !important; }
.ms-2 { margin-left: 1rem !important; }
.ms-3 { margin-left: 1.5rem !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }

/* Padding utilities */
.p-0 { padding: 0 !important; }
.p-1 { padding: 0.5rem !important; }
.p-2 { padding: 1rem !important; }
.p-3 { padding: 1.5rem !important; }

/* Display utilities */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }

/* Responsive display utilities */
@media (min-width: 576px) {
  .d-sm-none { display: none !important; }
  .d-sm-block { display: block !important; }
  .d-sm-flex { display: flex !important; }
}

@media (min-width: 768px) {
  .d-md-none { display: none !important; }
  .d-md-block { display: block !important; }
  .d-md-flex { display: flex !important; }
}

@media (min-width: 992px) {
  .d-lg-none { display: none !important; }
  .d-lg-block { display: block !important; }
  .d-lg-flex { display: flex !important; }
}

/* Flexbox utilities */
.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.justify-content-start { justify-content: flex-start !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around { justify-content: space-around !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-baseline { align-items: baseline !important; }
.align-items-stretch { align-items: stretch !important; }

/* Gap utilities */
.gap-1 { gap: 0.1rem !important; }
.gap-2 { gap: 0.2rem !important; }
.gap-3 { gap: 0.3rem !important; }

/* Width utilities */
.w-25 { width: 25% !important; }
.w-50 { width: 50% !important; }
.w-75 { width: 75% !important; }
.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }

/* Font utilities */
.font-weight-bold { font-weight: 700 !important; }
.font-weight-normal { font-weight: 400 !important; }
.fw-bold { font-weight: 700 !important; }
.fw-normal { font-weight: 400 !important; }

/* Text color utilities */
.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-info { color: var(--info-color) !important; }
.text-muted { color: var(--gray-600) !important; }

/* Position utilities */
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }
.position-sticky { position: sticky !important; }

/* 响应式显示类 */
.mobile-only {
  display: none;
}

/* 移动端全宽元素 */
.mobile-full-width {
  width: auto;
}

@media (max-width: 768px) {
  .mobile-only {
    display: block;
  }
  
  .desktop-only {
    display: none;
  }
  
  .mobile-full-width {
    width: 90% !important;
  }
}

@media (max-width: 480px) {
  .mobile-full-width {
    width: 95% !important;
  }
}

.question-image {
    margin: 1rem 0;
    text-align: center;
}

.question-image img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.question-formula {
    margin: 1rem 0;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

/* 筛选条件和结果字段的颜色定义 */
/* 类型：蓝色 */
.bg-primary {
    background-color: var(--primary-color) !important;
    color: white !important;
}

/* 杯赛：灰色 */
.bg-secondary {
    background-color: #A9A9A9 !important;
    color: white !important;
}




/* 难度：紫色（自定义颜色） */
.bg-purple {
    background-color: #9333ea !important;
    color: white !important;
}

.question-checkbox {
    pointer-events: auto !important;
    opacity: 1 !important;
    /* 确保没有定位导致的遮挡 */
    position: relative;
    z-index: 10;
}

.question-media {
    margin: 0.5rem 0;
}


.question-media.formula {
    font-size: 1.1em;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    overflow-x: auto;
}

.question-media.image {
    margin: 1rem 0;
    text-align: center;
}

.question-media.image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 下拉菜单样式 */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    background: none;
    border: none;
    padding: 0.5rem 0.5rem;
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-menu {
    display: none !important;  /* 强制隐藏 */
	visibility: hidden;        /* 辅助隐藏，避免占据空间 */
	opacity: 0;                /* 透明度为0 */
	transition: all 0.2s ease; /* 平滑过渡 */
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 60px;
    box-shadow: none !important; /* 取消阴影，贴近原图无装饰风格 */
    z-index: 1000;
    padding: 1;
    margin: 2;
    list-style: none;
    border: 1px solid #ddd !important; /* 仅保留细边框，避免粗边框显臃肿 */
    border-radius: 2px !important; /* 极小圆角（或0），原图风格更锐利 */
}

.dropdown-menu.show {
    display: block !important;  /* 显示时强制可见 */
	visibility: visible;
	opacity: 1;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem 0.5rem;
    clear: both;
    text-align: left;
    text-decoration: none;
    color: #333;
    background-color: transparent;
    border: 0;
}

.dropdown-item:hover, .dropdown-item.active {
    background-color: #f8f9fa;
    color: #0d6efd;
}

/* 仅作用于掌握程度下拉框 */
.mastery-dropdown .dropdown-toggle {
    font-size: 1rem !important; /* 按钮字体大小 */
    font-family: 'Microsoft YaHei', sans-serif; /* 按钮字体 */
}

.mastery-dropdown .dropdown-menu {
    font-size: 0.95rem!important; /* 菜单选项字体大小 */
    font-family: 'Microsoft YaHei', sans-serif; /* 菜单选项字体 */
    background-color: #f8f9fa; /* 菜单背景色（超浅灰） */
    border-radius: 6px; /* 菜单圆角 */
}

.mastery-dropdown .dropdown-item {
    padding: 0.25rem 1rem; /* 减小内边距 */
}

.mastery-dropdown .dropdown-item:hover {
    background-color: #e9ecef; /* hover背景色 */
}

/* 仅作用于掌握程度的下拉菜单 */
.mastery-dropdown .dropdown-menu {
  font-size: 0.95rem !important; /* 字体大小（12px，比默认更小） */
  min-width: 120px !important; /* 限制下拉框宽度 */
  padding: 0.25rem 0; /* 减小菜单内边距 */
}

/* 下拉选项样式 */
.mastery-dropdown .dropdown-item {
  font-size: 0.95rem !important; /* 选项文字大小与菜单一致 */
  padding: 0.25rem 0.95rem; /* 减小选项内边距（上下0.25rem，左右0.75rem） */
  line-height: 1.2; /* 减小行高，使选项更紧凑 */
}

/* 鼠标悬停时的样式保持协调 */
.mastery-dropdown .dropdown-item:hover {
  padding: 0.25rem 0.95rem !important; /* 保持悬停时内边距一致 */
}



/* 移动端适配 */
@media (max-width: 768px) {
    .nav-dropdown {
        display: block;
    }
    
  /* 确保下拉菜单在移动端正确显示 */
  .dropdown-menu {
	display: none !important;  /* 强制隐藏 */
	visibility: hidden;        /* 辅助隐藏，避免占据空间 */
	opacity: 0;                /* 透明度为0 */
	transition: all 0.2s ease; /* 平滑过渡 */
    position: absolute !important;
    left: auto !important;
    right: 0 !important; /* 靠右显示，避免溢出屏幕 */
    top: 100% !important; /* 紧接按钮下方 */
    min-width: 80px !important;
    z-index: 1050 !important; /* 提高层级，避免被遮挡 */
    transform: none !important; /* 清除可能的错位变换 */
	padding: 0;
    margin: 2;
  }

  /* 确保下拉菜单在打开时正确显示 */
  .dropdown-menu.show {
    display: block !important;  /* 显示时强制可见 */
	visibility: visible;
	opacity: 1;
  }
  
  
  /* 优化移动端下拉按钮触摸区域 */
  .btn.dropdown-toggle {
    padding: 0.5rem 1rem !important;
    min-height: 44px !important; /* 符合移动端触摸区域标准 */
  }
  
  /* 修复下拉项点击区域 */
  .dropdown-item {
    padding: 0.25rem 1rem !important;
    font-size: 1.1rem !important;
  }
  

  
  .mastery-btn {
    /* 强制与 btn-sm 保持一致，覆盖可能的移动端放大样式 */
    padding: 0.25rem 0.5rem !important;
    font-size: 0.8rem !important;
    height: auto !important;
    min-height: 2.0rem !important;
    /* 确保按钮不被拉伸 */
    width: auto !important;
    white-space: nowrap;
  }
  
  /* 如果标记框是下拉按钮，同步优化下拉箭头区域 */
  .mastery-btn.dropdown-toggle::after {
    margin-left: 0.25rem !important;
  }
  
}


.toast-container {
    z-index: 1090;
    position: fixed;
}

/* 添加表格内按钮的移动端适配 */
@media (max-width: 768px) {
  .table .btn {
    width: auto !important; /* 取消强制100%宽度 */
    min-width: 10px; /* 设置最小宽度保持一致性 */
    margin: 0 !important; /* 清除margin */
    font-size: 1rem !important; /* 统一字体大小 */
	box-shadow: none !important; /* 取消阴影，贴近原图无装饰风格 */
    border: 1px solid #ddd !important; /* 仅保留细边框，避免粗边框显臃肿 */
    border-radius: 2px !important; /* 极小圆角（或0），原图风格更锐利 */
	padding: 4px 8px !important; /* 内边距从0.75rem→4px，控件更小巧 */
    height: auto !important; /* 取消固定高度，随内容自适应 */
  }
  
  /* 修复表格单元格内按钮布局 */
  .table td {
    position: relative;
    padding: 0.25rem !important;
  }
}






    /* 打印样式 */
    @media print {
        body {
            padding: 0;
            margin: 0;
            font-family: "Times New Roman", SimSun, serif;
            font-size: 14pt;
            line-height: 1.3;
            color: #000;
            background: white;
			border: none !important;
        }
        
        .no-print {
            display: none !important;
        }
        
        .no-screen {
            display: inline;
        }
        
		 .card, .exam-container {
			border: none !important;
			box-shadow: none !important;
			padding: 0 !important;
			margin: 0 !important;
		}
		


		 
				
		
		* {
			border: none !important;
			box-shadow: none !important;
		}
		
        .exam-container {
            max-width: 100%;
        }
        
        .print-header {
            text-align: center;
            margin-bottom: 6mm;
            page-break-after: avoid;
        }
        
        .exam-title {
            font-size: 14pt;
            margin-bottom: 2mm;
        }
        
        .exam-meta {
            font-size: 11pt;
            margin-bottom: 2mm;
        }
		
        .question-container {
            /* 移除强制分页避免，允许自然分页 */
            page-break-inside: auto;
            break-inside: avoid !important;
			margin-bottom: 10mm !important; /* 增加底部间距避免紧贴分页 */
            padding: 0;
            background: transparent;
            border: none !important;
        }
        
        /* 只在必要时才分页避免 */
        .question-container:last-child {
            page-break-inside: avoid;
            break-inside: avoid;
        }

        /* 确保题目头部单行显示 */
        .question-header {
            display: flex !important;
            flex-wrap: nowrap !important;
            align-items: left;
            white-space: nowrap;
        }
    
        .question-number {
            white-space: nowrap;
        }
            
        .question-stem {
            margin-bottom: 3mm;
            font-size: 12pt;
            page-break-inside: avoid;
        }
        
        .options-container {
            grid-template-columns: repeat(2, 1fr);
            gap: 2mm;
            margin-top: 2mm;
            page-break-inside: avoid;
        }
        
        .option-item {
            margin-bottom: 0;
            font-size: 14pt;
            page-break-inside: avoid;
        }
        
        /* 问答题打印预留空间 - 修复显示 */
        .answer-space {
            display: block !important;
            margin-top: 8mm;
            padding-top: 2mm;
            min-height: 40mm;
            page-break-inside: avoid;
        }
        
	
        .answer-line {
            height: 6mm;
            border-bottom: none;
            margin-bottom: 2mm;
        }
        
        img, svg {
            max-width: 150mm !important;
            max-height: 40mm !important;
            page-break-inside: avoid;
        }
        
        /* 优化分页控制 */
        .exam-questions {
            page-break-before: auto;
            page-break-after: auto;
            page-break-inside: auto;
        }
        
        /* 避免在题目中间分页 */
        .question-stem, .options-container, .answer-space {
            page-break-inside: avoid;
            break-inside: avoid;
        }
        
        /* 允许在题目之间分页 */
        .question-container {
            page-break-before: auto;
            page-break-after: auto;
        }
        
        @page {
            size: A4;
            margin: 15mm;

            
            @bottom-center {
                content: "第 " counter(page) " 页";
                font-size: 10pt;
                margin-bottom: 5mm;
            }
        }
    }











/* 确保没有其他元素覆盖 */
body {
    position: relative;
}