body {
  font-family: var(--font-family);
  font-weight: var(--font-weight-regular);
  background:
    /* 微妙的有机纹理 - 使用CSS实现 */
    radial-gradient(ellipse at 20% 30%,
      rgba(107, 142, 99, 0.03) 0%,
      transparent 50%),
    radial-gradient(ellipse at 80% 70%,
      rgba(160, 82, 45, 0.03) 0%,
      transparent 50%),
    radial-gradient(ellipse at 50% 50%,
      rgba(139, 115, 85, 0.02) 0%,
      transparent 70%),
    var(--color-cream);
  margin: 0;
  padding: 20px;
  min-height: 100vh;
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  background: transparent;
  border-radius: 0;
  padding: 15px 16px;
  box-shadow: none;
  position: relative;
}

/* 切换考试按钮 */
.toggle-exam-button-container {
  margin: 10px 0;
  /* 减小上下间距 */
  text-align: center;
}

.toggle-exam-button {
  background: var(--color-primary);
  color: white;
  border: none;
  padding: 10px;
  font-size: 14px;
  cursor: pointer;
  transition:
    background var(--transition-normal),
    transform var(--transition-fast),
    box-shadow var(--transition-normal);
  width: 100%;
  max-width: 800px;
  border-radius: var(--radius-sm);
  font-weight: bold;
  text-align: center;
  min-height: 40px;
  box-sizing: border-box;
}

.toggle-exam-button:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* 功能介绍按钮 */
.intro-button {
  background: var(--color-accent);
  color: white;
  border: none;
  padding: 10px;
  font-size: 14px;
  cursor: pointer;
  transition:
    background var(--transition-normal),
    transform var(--transition-fast),
    box-shadow var(--transition-normal);
  width: 100%;
  max-width: 800px;
  border-radius: var(--radius-md);
  font-weight: bold;
  text-align: center;
  min-height: 40px;
  box-sizing: border-box;
}

.intro-button:hover {
  background: var(--color-secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* 小屏幕切换按钮 */
.toggle-button-small-screen {
  margin: 10px 0;
  /* 减小上下间距 */
}

.toggle-button-small-screen button {
  background: var(--color-primary);
  color: white;
  border: none;
  padding: 10px;
  font-size: 14px;
  cursor: pointer;
  transition:
    background var(--transition-normal),
    transform var(--transition-fast);
  width: 100%;
  border-radius: var(--radius-md);
  font-weight: bold;
  text-align: center;
  min-height: 40px;
  box-sizing: border-box;
}

.toggle-button-small-screen button:hover {
  background: var(--color-primary-dark);
}

/* 预设类型按钮样式 */
.preset-type-btn {
  padding: 6px 12px;
  font-size: 12px;
  border: 1px solid var(--color-earth);
  background: white;
  color: var(--color-text-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
  font-weight: 500;
}

.preset-type-btn:hover {
  background: var(--color-cream-dark);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.preset-type-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.preset-type-btn[data-type="custom"] {
  background: white;
  /* 默认为白色背景 */
  color: var(--color-text-light);
  /* 默认为灰色文字 */
  border-color: var(--color-earth);
  /* 默认为灰色边框 */
}

.preset-type-btn[data-type="custom"]:hover {
  background: var(--color-cream-dark);
  /* 悬停时浅色背景 */
  border-color: var(--color-warning);
  /* 悬停时橙色边框 */
  color: var(--color-warning);
  /* 悬停时橙色文字 */
}

.preset-type-btn[data-type="custom"].active {
  background: var(--color-warning);
  /* 选中状态使用橙色 */
  color: white;
  border-color: var(--color-warning);
}

/* 为小屏幕设备设置的预设类型按钮样式 */
@media (max-width: 768px) {
  .preset-type-buttons {
    width: 100%;
    justify-content: flex-start;
  }

  .preset-type-btn {
    flex: 1;
    max-width: 120px;
    background: var(--color-lavender);
    /* 确保小屏幕下也是紫色 */
    color: white;
  }

  /* 自定义考试页面响应式 */
  .section-card-fields {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

/* 恢复提示样式 */
.restore-hint {
  font-size: 0.9em;
  text-align: center;
  color: var(--color-text-muted);
  cursor: pointer;
  margin-top: 10px;
}

:root {
  /* Organic/Natural Color Palette */
  --color-primary: #4a6741;
  /* 苔藓绿 - 主色 */
  --color-primary-dark: #3a5334;
  /* 深苔藓绿 */
  --color-primary-light: #6b8e63;
  /* 浅苔藓绿 */
  --color-secondary: #a0522d;
  /* 赭石色 */
  --color-accent: #8b7355;
  /* 土棕色 */
  --color-earth: #c4a77d;
  /* 沙土色 */
  --color-cream: #faf8f5;
  /* 奶油白背景 */
  --color-cream-dark: #f5f2ed;
  /* 深奶油色 */
  --color-text: #3d3229;
  /* 深棕色文字 */
  --color-text-light: #6b5d4d;
  /* 浅棕色文字 */
  --color-text-muted: #9a8b78;
  /* 柔和棕色 */
  --color-success: #5b8c5a;
  /* 自然绿 */
  --color-warning: #c9844a;
  /* 秋季橙 */
  --color-danger: #a65d4e;
  /* 陶土红 */

  /* Natural Button Colors - 来自自然元素 */
  --color-sky: #5b8a8a;
  /* 青绿色 */
  --color-sky-dark: #4a7575;
  /* 深青绿色 */
  --color-autumn: #9b8568;
  /* 木色 */
  --color-autumn-dark: #8b7355;
  /* 深木色 */
  --color-lavender: #c2a2d2;
  /* 薰衣草紫 */
  --color-lavender-dark: #b283b6;
  /* 深薰衣草紫 */
  --color-moss: #6b8e6b;
  /* 苔藓绿 */
  --color-rust: #b8765a;
  /* 铁锈红 */

  /* Font - 免费商用字体 */
  --font-family:
    "Noto Serif SC", "Noto Serif", Georgia, "Nimbus Roman No9 L", "Songti SC",
    "Songti TC", "STSong", "SimSun", serif;
  --font-family-mono:
    "JetBrains Mono", "Roboto Mono", "SF Mono", "Consolas", Menlo, Monaco,
    monospace;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 800;

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;

  /* Border Radius - Organic feel */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows - Soft organic shadows */
  --shadow-sm: 0 2px 8px rgba(61, 50, 41, 0.08);
  --shadow-md: 0 4px 16px rgba(61, 50, 41, 0.12);
  --shadow-lg: 0 8px 32px rgba(61, 50, 41, 0.16);

  /* Transitions */
  --transition-fast: 0.15s ease-out;
  --transition-normal: 0.3s ease-out;
  --transition-slow: 0.5s ease-out;

  /* Timer Backgrounds (color mixed with cream-dark) */
  --color-section-completed-bg: color-mix(in oklch,
      var(--color-success) 12%,
      var(--color-cream-dark));
  --color-section-active-bg: color-mix(in oklch,
      var(--color-secondary) 12%,
      var(--color-cream-dark));
  --color-timer-section-bg: color-mix(in oklch,
      var(--color-warning) 15%,
      var(--color-cream-dark));
}

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

.introduction-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  min-height: calc(100vh - 200px);
  background: var(--color-cream);
}

.introduction-container header {
  text-align: center;
  padding: 100px 20px 80px;
  background: transparent;
  margin: 0;
}

.introduction-container h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 15px;
  color: var(--color-primary-dark);
  display: block;
}

.introduction-container .subtitle {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto 30px;
  line-height: 1.6;
}

.cta-button {
  display: inline-block;
  background: var(--color-primary);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 400;
  transition: all var(--transition-normal);
  border: none;
}

.cta-button:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.introduction-container .section {
  padding: 80px 0;
  border-bottom: none;
  background: transparent;
  margin: 0;
  border-left: none;
  border-radius: 0;
}

.introduction-container .section:last-child {
  border-bottom: none;
  padding-bottom: 100px;
}

.introduction-container .section-title {
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 60px;
  color: var(--color-primary-dark);
  display: block;
  text-align: center;
  unicode-bidi: isolate;
  letter-spacing: -0.5px;
}

.introduction-container .feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.introduction-container .feature-card {
  text-align: center;
  padding: 35px 30px;
  background: white;
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
  border: 1px solid var(--color-cream-dark);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.introduction-container .feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-earth);
}

.introduction-container .feature-icon {
  font-size: 2.75rem;
  margin-bottom: 18px;
  display: block;
  transition: transform var(--transition-normal);
}

.introduction-container .feature-card:hover .feature-icon {
  transform: scale(1.1);
}

.introduction-container .feature-card h3 {
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--color-text);
  display: block;
  letter-spacing: -0.3px;
  transition: color var(--transition-normal);
}

.introduction-container .feature-card:hover h3 {
  color: var(--color-primary);
}

.introduction-container .feature-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 auto;
  max-width: 65ch;
  transition: color var(--transition-normal);
}

.introduction-container .feature-card:hover p {
  color: var(--color-text-light);
}

.introduction-container .exam-types {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto;
}

.introduction-container .exam-type {
  background: var(--color-cream-dark);
  border: none;
  border-radius: var(--radius-lg);
  padding: 40px 35px;
  text-align: center;
  flex: 1;
  min-width: 280px;
  max-width: 320px;
  transition: all var(--transition-normal);
}

.introduction-container .exam-type:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.introduction-container .exam-type h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--color-primary-dark);
  display: block;
}

.introduction-container .exam-type p {
  margin: 8px 0;
  color: var(--color-text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

.introduction-container .exam-type ul {
  margin-top: 10px;
  padding-left: 20px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.8;
}

.introduction-container footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
}

/* 响应式优化 - introduction页面 */
@media (max-width: 768px) {
  .introduction-container {
    padding: 0 20px;
  }

  .introduction-container header {
    padding: 60px 20px 50px;
  }

  .introduction-container h1 {
    font-size: 2rem;
  }

  .introduction-container .subtitle {
    font-size: 1.1rem;
  }

  .introduction-container .section {
    padding: 50px 0;
  }

  .introduction-container .section:last-child {
    padding-bottom: 60px;
  }

  .introduction-container .section-title {
    font-size: 2rem;
    margin-bottom: 40px;
  }

  .introduction-container .feature-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .introduction-container .feature-card {
    padding: 30px 25px;
  }

  .introduction-container .exam-types {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .introduction-container .exam-type {
    max-width: 100%;
    padding: 35px 25px;
  }
}

/* ICP备案信息样式 */
.icp-info {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--color-text-muted);
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.icp-info a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.icp-info a:hover {
  color: var(--color-sky);
  text-decoration: underline;
}

/* 小屏幕设备的恢复提示 */
#restoreHintSmallScreen {
  display: none;
}

/* 模态窗口样式 */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid var(--color-text-muted);
  width: 90%;
  max-width: 600px;
  border-radius: var(--radius-md);
}

.close {
  color: var(--color-text-muted);
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
}

/* 表单样式 */
.custom-exam-form {
  margin-top: 20px;
}

.form-group {
  margin-bottom: 15px;
}

.display-settings-group {
  margin-top: 15px;
  margin-bottom: 15px;
}

.display-settings-group>label {
  font-weight: bold;
  display: block;
  margin-bottom: 8px;
}

.form-group>label {
  font-weight: bold;
  display: block;
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  border: 1px solid var(--color-earth);
  border-radius: var(--radius-sm);
  box-sizing: border-box;
}

/* 表单帮助文本样式 */
.form-help-text {
  font-size: 0.7em;
  color: var(--color-danger);
  margin-top: 5px;
  font-style: normal;
}

/* 自定义时间选择器样式 */
.custom-time-picker {
  position: relative;
  width: 100%;
}

.time-input-wrapper {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
  position: relative;
}

.time-input-display {
  flex: 1;
  padding: 8px;
  padding-right: 34px;
  border: 1px solid var(--color-earth);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: var(--font-family-mono);
  font-weight: var(--font-weight-medium);
  text-align: center;
  background: var(--color-cream-dark);
  color: var(--color-text);
  cursor: text;
  /* 给右侧小三角留空间 */
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
  font-variant-numeric: tabular-nums;
}

.time-input-display:focus {
  border-color: var(--color-sky);
  box-shadow: 0 0 0 2px rgba(91, 138, 138, 0.15);
  outline: none;
}

.time-separator {
  font-size: 18px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  font-family: var(--font-family);
}

.picker-toggle-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border: 1px solid var(--color-earth);
  border-radius: var(--radius-sm);
  background: var(--color-cream-dark);
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast);
}

.picker-toggle-btn:hover {
  border-color: var(--color-sky);
  color: var(--color-sky);
  background: var(--color-cream);
}

.picker-toggle-btn.active {
  border-color: var(--color-sky);
  box-shadow: 0 0 0 2px rgba(91, 138, 138, 0.15);
}

/* 统一给右侧小箭头添加旋转动画效果 */
.picker-toggle-btn .iconfont.icon-youjiantou {
  display: inline-block;
  transition: transform 0.2s ease;
}

.picker-toggle-btn.active .iconfont.icon-youjiantou {
  transform: rotate(90deg);
}

.time-dropdowns {
  gap: 5px;
  align-items: center;
  display: none;
}

.time-dropdowns.show-panel {
  display: flex;
}

.time-select-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.time-divider {
  font-size: 18px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  user-select: none;
}

.time-select-trigger {
  width: 100%;
  padding: 4px;
  background: var(--color-cream-dark);
  border: 1px solid var(--color-earth);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-family: var(--font-family);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  min-height: 26px;
  box-sizing: border-box;
  user-select: none;
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast);
}

.time-select-trigger:hover {
  border-color: var(--color-sky);
  background: var(--color-cream);
}

.time-select-trigger.active {
  border-color: var(--color-sky);
  box-shadow: 0 0 0 2px rgba(91, 138, 138, 0.15);
}

.time-value {
  flex-grow: 1;
  text-align: center;
  font-family: var(--font-family-mono);
}

.time-arrow {
  font-size: 12px;
  color: var(--color-text-muted);
  transition: transform var(--transition-fast);
  margin-left: 8px;
}

.time-select-trigger.active .time-arrow {
  transform: rotate(90deg);
}

.time-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--color-earth);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  margin-top: 4px;
  font-family: var(--font-family-mono);
  font-variant-numeric: tabular-nums;
}

.time-select-dropdown.show {
  display: block;
}

.time-select-options {
  max-height: 200px;
  overflow-y: auto;
}

.time-option {
  cursor: pointer;
  text-align: center;
  font-size: 16px;
  font-family: var(--font-family-mono);
  border-bottom: 1px solid var(--color-cream-dark);
  transition: background var(--transition-fast);
  min-height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}

.time-option:last-child {
  border-bottom: none;
}

.time-option:hover {
  background: var(--color-cream-dark);
}

.time-option.selected {
  background: var(--color-sky);
  color: white;
  font-weight: var(--font-weight-semibold);
}

/* 自定义日期选择器样式 */
.custom-date-picker {
  position: relative;
  width: 100%;
}

.date-input-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 8px;
}

.date-input-display {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--color-earth);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: var(--font-family-mono);
  font-weight: var(--font-weight-medium);
  text-align: center;
  background: var(--color-cream-dark);
  color: var(--color-text);
  box-sizing: border-box;
  cursor: text;
  padding-right: 34px;
  /* 给右侧小三角留空间 */
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
  font-variant-numeric: tabular-nums;
}

.date-input-display:focus {
  border-color: var(--color-sky);
  box-shadow: 0 0 0 2px rgba(91, 138, 138, 0.15);
  outline: none;
}

.date-dropdowns {
  gap: 5px;
  align-items: center;
  display: none;
  /* 默认隐藏，点击右侧小三角才展开 */
}

.date-dropdowns.show-panel {
  display: flex;
}

.date-select-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.date-divider {
  font-size: 16px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  user-select: none;
}

.date-select-trigger {
  width: 100%;
  padding: 4px;
  background: var(--color-cream-dark);
  border: 1px solid var(--color-earth);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-family: var(--font-family);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  min-height: 26px;
  box-sizing: border-box;
  user-select: none;
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast);
}

.date-select-trigger:hover {
  border-color: var(--color-sky);
  background: var(--color-cream);
}

.date-select-trigger.active {
  border-color: var(--color-sky);
  box-shadow: 0 0 0 2px rgba(91, 138, 138, 0.15);
}

.date-value {
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  flex-grow: 1;
  text-align: center;
}

.date-arrow {
  font-size: 12px;
  color: var(--color-text-muted);
  transition: transform var(--transition-fast);
  margin-left: 8px;
}

.date-select-trigger.active .date-arrow {
  transform: rotate(90deg);
}

.date-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--color-earth);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  margin-top: 4px;
}

.date-select-dropdown.show {
  display: block;
}

.date-select-options {
  max-height: 200px;
  overflow-y: auto;
}

.date-option {
  cursor: pointer;
  text-align: center;
  font-size: 16px;
  border-bottom: 1px solid var(--color-cream-dark);
  transition: background 0.2s;
  min-height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.date-option:last-child {
  border-bottom: none;
}

.date-option:hover {
  background: var(--color-cream-dark);
}

.date-option.selected {
  background: var(--color-sky);
  color: white;
  font-weight: bold;
}

/* 统一选择器组件 — div-based，替代浏览器默认下拉 */
.custom-select {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  padding: 8px 36px 8px 12px;
  border: 1px solid var(--color-earth);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-family);
  background: white;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 40px;
  box-sizing: border-box;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
  user-select: none;
}

.custom-select-trigger:hover {
  border-color: var(--color-sky);
}

.custom-select-trigger.active {
  border-color: var(--color-sky);
  box-shadow: 0 0 0 2px rgba(91, 138, 138, 0.15);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.custom-select-arrow {
  font-size: 10px;
  color: var(--color-text-light);
  transition: transform var(--transition-fast);
  line-height: 1;
}

.custom-select-trigger.active .custom-select-arrow {
  transform: rotate(180deg);
}

.custom-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--color-sky);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 1000;
  display: none;
  max-height: 200px;
  overflow-y: auto;
}

.custom-select-dropdown.show {
  display: block;
}

.custom-select-option {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--color-text);
  transition: background-color var(--transition-fast);
}

.custom-select-option:hover {
  background-color: var(--color-cream-dark);
  color: var(--color-primary);
}

.custom-select-option.selected {
  background-color: var(--color-sky);
  color: white;
  font-weight: 600;
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {

  .time-select-trigger,
  .date-select-trigger {
    min-height: 48px;
    padding: 14px;
  }

  .time-option,
  .date-option {
    min-height: 48px;
    padding: 14px;
  }

  .remove-section-btn,
  .move-up-btn,
  .move-down-btn {
    min-height: 44px;
    width: 44px !important;
    font-size: 18px;
  }
}

/* 环节卡片样式 */
/* 环节容器和标题行 */
.sections-wrapper {
  border: 2px solid var(--color-earth);
  border-radius: var(--radius-lg);
  padding: 10px;
  /* 减小内边距 */
  background: var(--color-cream-dark);
}

.section-headers-row {
  display: grid;
  grid-template-columns: 17px 2fr 1fr 2fr 1fr 27px;
  /* 将第一列(35px)和最后一列(50px)的宽度减半 */
  gap: 15px;
  padding: 8px 10px;
  /* 减小padding */
  background: var(--color-cream-dark);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 0.85rem;
  /* 修改字体大小 */
  color: var(--color-text-light);
  align-items: center;
}

.section-header-drag {
  text-align: center;
  color: var(--color-text-muted);
}

.section-header-name {
  text-align: center;
}

.section-header-duration {
  text-align: center;
}

.section-header-description {
  text-align: center;
}

.section-header-count {
  text-align: center;
}

.section-header-action {
  text-align: center;
}

.section-card {
  background: white;
  border: 2px solid var(--color-sky);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  padding: 6px 10px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  cursor: move;
}

.section-card:last-child {
  margin-bottom: 0;
}

.section-card:hover {
  box-shadow: 0 4px 16px rgba(52, 152, 219, 0.25);
  border-color: var(--color-sky-dark);
  transform: translateY(-2px);
}

.section-card input {
  padding-left: 5px;
  height: 30px;
  font-family: var(--font-family);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
}

.section-card input::placeholder {
  color: var(--color-text-muted);
}

/* 确保环节输入框字体统一 */
.section-card .section-name,
.section-card .section-duration,
.section-card .section-description {
  font-family: var(--font-family);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
}

.section-card.dragging {
  opacity: 0.5;
  border-color: var(--color-sky);
  box-shadow: 0 8px 24px rgba(52, 152, 219, 0.3);
}

.section-card-content {
  display: grid;
  grid-template-columns: 17px 2fr 1fr 2fr 1fr 27px;
  gap: 8px;
  /* 减小内部元素间距 */
  align-items: center;
  /* 网格项垂直居中 */
}

.section-card-drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  color: var(--color-text-muted);
  user-select: none;
  font-size: 14px;
  padding: 0;
  /* 设置左右间距为0 */
}

.section-card-drag-handle:active {
  cursor: grabbing;
}

.drag-icon {
  font-size: 14px;
  /* 减小图标大小 */
  line-height: 1;
}

.section-card-fields {
  display: contents;
}

.section-field {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

/* 专门针对复选框字段的样式 */
.section-field-checkbox {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
  width: auto;
  /* 减小宽度，不再占满整个容器 */
  align-self: stretch;
}

.count-in-total-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--color-text-light);
  padding: 0;
  height: auto;
  min-height: unset;
  height: 100%;
  box-sizing: border-box;
  line-height: 0;
}

.checkbox-text-mobile {
  display: none;
}

.move-up-btn,
.move-down-btn {
  display: none;
}

.count-in-total-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin: 0;
  transform: scale(1);
  display: block;
}

/* 为确保兼容性，添加更具体的选择器 */
.section-field.section-field-checkbox .count-in-total-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  transform: scale(1);
  display: block;
}

/* 统一复选框样式 - 绿色主题 */
input[type="checkbox"] {
  accent-color: var(--color-success);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.section-card-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0;
  /* 添加这行以确保内边距为0 */
}

.remove-section-btn {
  background-color: transparent !important;
  color: var(--color-danger) !important;
  border: none !important;
  padding: 0;
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  transition: all 0.2s;
  height: 32px;
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.7;
}

.remove-section-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* 考试结束环节样式 */
.end-section-card {
  background: var(--color-cream-dark);
  border-color: var(--color-danger);
  opacity: 0.9;
  cursor: default;
  padding: 6px 10px;
  /* 添加与section-card相同的padding */
}

.end-section-card:hover {
  transform: none;
  border-color: var(--color-danger);
}

.end-section-card .section-name[readonly],
.end-section-card .section-duration[readonly] {
  background: var(--color-cream-dark);
  cursor: not-allowed;
}

.end-section-card .section-description {
  background: white;
  cursor: text;
}

.end-section-card input[disabled] {
  cursor: not-allowed;
}

.add-section-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  text-align: center;
  min-height: 40px;
  box-sizing: border-box;
  background-color: var(--color-autumn-dark);
  color: white;
}

.form-actions {
  margin-top: 20px;
}

.form-actions-row {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.form-actions-row:last-child {
  margin-bottom: 0;
}

.form-actions button {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  text-align: center;
  box-sizing: border-box;
}

#saveCustomExamBtn {
  background-color: var(--color-success);
  color: white;
}

#applyCustomExamBtn {
  background-color: var(--color-lavender-dark);
  color: white;
}

#backToMainBtn {
  background-color: var(--color-sky);
  color: white;
}

#backToMainBtn:hover {
  background-color: var(--color-sky-dark);
}

/* 预设选择器样式 */
.preset-selector {
  margin-top: 15px;
  padding: 10px;
  border: 1px solid var(--color-earth);
  border-radius: var(--radius-sm);
  background-color: var(--color-cream-dark);
}

.preset-selector label {
  display: block;
  margin-bottom: 5px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}

.preset-selector select {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--color-earth);
  border-radius: var(--radius-sm);
  box-sizing: border-box;
  font-size: 14px;
}

/* 自定义预设选择器样式 */
.custom-preset-selector {
  margin: 10px 0;
  margin-left: 0;
  margin-right: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background-color: transparent;
  position: relative;
  z-index: 999;
  /* 确保选择器在其他元素之上 */
  width: 100%;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.preset-selector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 15px;
}

.preset-type-buttons {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.preset-selector-dropdown {
  position: relative;
  width: 100%;
}

.preset-selector-selected {
  width: 100%;
  padding: 10px;
  background: var(--color-sky);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: bold;
  min-height: 40px;
  box-sizing: border-box;
  transition: background 0.3s;
}

.preset-selector-selected:hover {
  background-color: var(--color-sky-dark);
}

.preset-selector-selected.custom-selected {
  background-color: var(--color-autumn);
  /* 选中状态背景色为橙色 */
}

.preset-selector-selected.custom-selected:hover {
  background-color: var(--color-autumn-dark);
  /* 悬停状态背景色为深橙色 */
}

.dropdown-arrow {
  font-size: 12px;
  transition: transform 0.3s;
}

.preset-selector-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--color-earth);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 1000;
  /* 确保下拉选项在最上层 */
  max-height: 300px;
  overflow-y: auto;
  margin-top: 2px;
}

.preset-option-group {
  border-bottom: 1px solid var(--color-cream-dark);
}

.preset-option-group:last-child {
  border-bottom: none;
}

.option-group-title {
  padding: 10px 12px;
  background-color: var(--color-cream-dark);
  font-weight: 600;
  font-size: 13px;
  color: var(--color-text-light);
  text-align: left;
}

.preset-option {
  padding: 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--color-cream-dark);
  z-index: 1001;
  /* 确保选项在最上层 */
  font-size: 14px;
  color: var(--color-text);
  transition: background-color var(--transition-normal);
}

.preset-option:last-child {
  border-bottom: none;
}

.preset-option:hover {
  background-color: var(--color-cream-dark);
  color: var(--color-secondary);
}

.preset-option.disabled {
  color: var(--color-text-muted);
  cursor: not-allowed;
  background-color: var(--color-cream);
}

.preset-option-divider {
  height: 1px;
  background-color: var(--color-cream-dark);
  margin: 0;
}

.preset-option-group-label {
  padding: 6px 12px 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-light);
  background-color: var(--color-cream);
  letter-spacing: 0.5px;
}

.preset-level2-title {
  padding: 10px 12px 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  background-color: var(--color-cream-dark);
  letter-spacing: 0.8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.preset-level3-title {
  padding: 8px 12px 4px 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-light);
  background-color: var(--color-cream);
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.preset-option.level2-child {
  padding-left: 24px;
}

.preset-option.level3-child {
  padding-left: 36px;
}

/* 预设选择器横跨两栏样式 */
.preset-selector-full-width {
  width: 100%;
  padding: 0;
  box-sizing: border-box;
  position: relative;
  z-index: 999;
  /* 确保整个区域在上层 */
  display: flex;
  justify-content: center;
  margin: 10px 0;
  border-top: 2px solid var(--color-cream-dark);
  padding-top: 20px;
}

/* 大屏幕设备下的样式 */
@media (min-width: 801px) {
  .preset-selector-full-width {
    flex: 0 0 100%;
    padding: 0;
    margin: 10px 0;
  }

  .custom-preset-selector {
    width: 100%;
    max-width: 800px;
  }
}

/* 已保存的考试配置列表样式 */
.right-column h2 {
  margin-top: 0;
  margin-bottom: 24px;
  font-size: 1.2em;
  display: block;
  font-weight: 800;
}

.exam-item {
  border: 1px solid var(--color-earth);
  border-radius: var(--radius-md);
  padding: 12px 15px;
  margin-bottom: 12px;
  background-color: var(--color-cream-dark);
}

.exam-item h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1em;
  display: block;
}

.exam-item p {
  margin: 4px 0;
  font-size: 0.85em;
  color: var(--color-text-light);
  font-family: var(--font-family-mono);
  font-variant-numeric: tabular-nums;
}

.exam-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}

.exam-actions button {
  flex: 1;
  padding: 6px 12px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: bold;
  font-size: 12px;
  text-align: center;
  min-height: 32px;
  box-sizing: border-box;
}

.edit-exam-btn {
  background-color: var(--color-autumn-dark);
  color: white;
}

.apply-exam-btn {
  background-color: var(--color-lavender-dark);
  color: white;
}

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

.no-exams {
  text-align: center;
  color: var(--color-text-muted);
  font-style: italic;
  padding: 20px;
}

/* 大屏幕设备的恢复提示 */
#restoreHintLargeScreen {
  display: none;
  margin-top: 5px;
  padding-top: 10px;
  border-top: 1px dashed var(--color-earth);
}

/* 响应式布局 - 当屏幕宽度小于等于800px时 */
@media (max-width: 800px) {

  /* 隐藏大屏幕切换按钮容器 */
  .toggle-exam-button-container {
    display: none !important;
  }

  /* 显示小屏幕切换按钮 */
  #toggleButtonSmallScreen {
    display: block !important;
  }

  /* 显示小屏幕功能介绍按钮 */
  #introButtonSmallScreen {
    display: block !important;
  }

  /* 预设选择器在小屏幕上的样式 */
  .preset-selector-full-width {
    padding: 0 20px;
  }

  .custom-preset-selector {
    max-width: 100%;
    width: 100%;
  }

  /* 预设选择器头部响应式 */
  .preset-selector-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .preset-type-buttons {
    width: 100%;
    justify-content: flex-start;
  }

  .preset-type-btn {
    flex: 1;
    max-width: 120px;
  }

  /* 自定义考试页面响应式 */
  .section-headers-row {
    grid-template-columns: 1fr;
    gap: 8px;
    display: none;
    /* 小屏幕隐藏标题行 */
  }

  .section-card-content {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .section-card-drag-handle {
    order: -1;
    justify-self: start;
  }

  .section-field-description {
    grid-column: 1;
  }

  .section-card-actions {
    width: 100%;
    justify-content: center;
    gap: 8px;
  }

  .remove-section-btn {
    width: 36px;
  }

  .move-up-btn,
  .move-down-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-autumn);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    height: 32px;
    width: 36px;
    transition: all 0.2s;
    line-height: 1;
    flex-shrink: 0;
  }

  .move-up-btn:hover,
  .move-down-btn:hover {
    background-color: var(--color-autumn-dark);
  }

  .checkbox-text-mobile {
    display: inline;
    margin-left: 8px;
    font-size: 0.9em;
    color: var(--color-text-light);
  }

  .vertical-setting-controls {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 16px;
    gap: 10px;
  }

  /* 表单按钮在小屏幕上垂直排列 */
  .form-actions-row {
    flex-direction: column;
  }

  .form-actions button {
    width: 100%;
    margin-bottom: 10px;
  }

  /* 右侧栏在小屏幕上移到下方 */
  .right-column {
    margin-top: 20px;
  }

  /* 考试操作按钮垂直排列 */
  .exam-actions {
    flex-direction: column;
  }

  /* 响应式显示设置 */
  .inline-display-settings {
    padding: 14px;
  }

  .inline-setting-checkboxes {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .inline-setting-checkboxes .setting-checkbox-horizontal {
    flex: none;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-fast);
  }

  .inline-setting-checkboxes .setting-checkbox-horizontal:hover {
    background-color: var(--color-cream);
  }

  .setting-checkbox-horizontal span {
    white-space: nowrap;
  }

  .inline-setting-header {
    flex-direction: row;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .inline-display-settings .display-settings-label {
    font-size: 0.85em;
    letter-spacing: 0.3px;
  }

  .reset-display-settings-btn {
    font-size: 0.8em;
    padding: 4px 10px;
    height: 26px;
    flex-shrink: 0;
  }

  .exam-time-header {
    gap: 4px 8px;
    padding: 10px;
  }

  .exam-time-header .header-divider {
    display: none;
  }

  .exam-time-header>span {
    white-space: nowrap;
  }

  .exam-time-header .exam-countdown {
    width: 100%;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px rgba(255, 255, 255, 0.2) solid;
  }
}

/* 响应式布局 - 当屏幕宽度大于800px时 */
@media (min-width: 801px) {
  body {
    background: var(--color-cream);
    padding: 20px;
  }

  .container {
    width: 800px;
    max-width: 800px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    background: var(--color-cream);
    margin: 0 auto;
    padding: 15px 0;
  }

  .left-column {
    flex: 0 0 calc(55% - 10px);
  }

  .right-column {
    flex: 0 0 calc(45% - 10px);
  }

  /* 环节卡片在大屏幕上的优化 */
  .section-card-fields {
    grid-template-columns: 2fr 1fr 2fr 1fr;
  }

  .column-wrapper {
    display: contents;
  }

  .section-timeline {
    margin-top: 0;
  }

  /* 调整恢复提示的显示 */
  #restoreHintSmallScreen {
    display: none;
  }

  #restoreHintLargeScreen {
    display: none;
    text-align: center;
    margin: 5px auto 0;
    padding: 10px 0 0;
    border-top: 1px dashed var(--color-earth);
  }

  /* 隐藏小屏幕切换按钮 */
  #toggleButtonSmallScreen {
    display: none !important;
  }

  /* 隐藏小屏幕功能介绍按钮 */
  #introButtonSmallScreen {
    display: none !important;
  }

  /* 大屏幕考试信息横幅 - 横跨两栏 */
  .header-wrapper {
    flex: 0 0 100%;
  }

  /* 大屏幕切换按钮居中 */
  .toggle-exam-button-container {
    flex: 0 0 100%;
    margin: 10px 0;
    /* 减小上下间距 */
    text-align: center;
  }

  .toggle-exam-button {
    margin: 0 auto;
  }

  .intro-button {
    margin: 0 auto;
  }
}

.header-wrapper {
  position: relative;
}

.exam-time-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-align: center;
  background: linear-gradient(135deg,
      var(--color-primary) 0%,
      var(--color-primary-dark) 100%);
  color: white;
  padding: 8px 12px;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  font-size: 0.8em;
  font-weight: bold;
  box-shadow: var(--shadow-md);
  line-height: 1.2;
  position: relative;
  font-family: var(--font-family);
  font-variant-numeric: tabular-nums;
}

.exam-countdown {
  color: rgba(255, 255, 255, 0.9);
  font-weight: normal;
  font-variant-numeric: tabular-nums;
}

h1 {
  text-align: center;
  color: var(--color-primary-dark);
  margin-bottom: 20px;
  font-size: 2em;
  display: block;
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* index.html 专用 h3 标题样式 - 与 design.html section h3 一致 */
.skip-selector h3,
.preset-selector-label,
.display-settings-label {
  font-size: 0.9em;
  font-weight: 600;
  color: var(--color-text);
  margin: 16px 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.current-section {
  background: color-mix(in srgb, var(--color-lavender) 20%, transparent);
  border: 2px solid var(--color-lavender-dark);
  padding: 15px;
  border-radius: var(--radius-md);
  text-align: center;
  margin: 20px 0;
  font-size: 1.2em;
  color: var(--color-text);
}

.real-time-display {
  text-align: center;
  font-size: 1.5em;
  color: var(--color-primary-dark);
  margin: 15px 0;
  padding: 15px;
  background: var(--color-section-completed-bg);
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-primary);
  font-weight: var(--font-weight-bold);
  font-family: "JetBrains Mono", monospace;
  font-variant-numeric: tabular-nums;
}

.timer-display {
  text-align: center;
  font-size: 1.5em;
  font-weight: var(--font-weight-bold);
  color: var(--color-secondary);
  margin: 15px 0;
  padding: 15px;
  background: var(--color-section-active-bg);
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-secondary);
  font-family: "JetBrains Mono", monospace;
  font-variant-numeric: tabular-nums;
}

.section-timer-display {
  text-align: center;
  font-size: 1.5em;
  font-weight: var(--font-weight-bold);
  color: var(--color-warning);
  margin: 15px 0;
  padding: 15px;
  background: var(--color-timer-section-bg);
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-warning);
  font-family: "JetBrains Mono", monospace;
  font-variant-numeric: tabular-nums;
}

.countdown-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 10px 0;
}

.countdown {
  flex: 1;
  text-align: center;
  font-size: 1em;
  padding: 8px;
  background: var(--color-section-completed-bg);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--color-primary);
  font-weight: bold;
  font-family: "JetBrains Mono", monospace;
}

.next-button {
  padding: 10px;
  background: var(--color-cream-dark);
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  box-sizing: border-box;
  transition: all var(--transition-normal);
}

.next-button:hover {
  background: var(--color-primary);
  color: white;
}

.next-button:active {
  transform: translateY(1px);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
  justify-content: space-between;
}

.controls button {
  flex: 1;
  background: var(--color-primary);
  color: white;
  border: none;
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition:
    background var(--transition-normal),
    transform var(--transition-fast),
    box-shadow var(--transition-normal);
  text-align: center;
  min-height: 40px;
  box-sizing: border-box;
  margin: 0;
}

.controls button:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.controls button:disabled {
  background: var(--color-text-muted);
  cursor: not-allowed;
}

.section {
  position: relative;
  background: var(--color-cream-dark);
  border-radius: var(--radius-md);
  padding: 12px 12px 12px 32px;
  margin: 0 0 15px 0;
  border: none !important;
  transition: all var(--transition-normal);
}

.section:last-child {
  margin-bottom: 0;
}

/* The vertical line connecting sections */
.section:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 28px;
  bottom: -15px;
  /* Cover the 15px margin to connect strictly to the next section */
  width: 2px;
  background-color: var(--color-earth);
  opacity: 0.3;
  transition: all var(--transition-normal);
  z-index: 1;
}

/* The dot */
.section::before {
  content: "";
  position: absolute;
  left: 12px;
  /* Center dot (8px) at 16px to align with vertical line (x=15, w=2 -> center 16) */
  top: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-earth);
  transition: all var(--transition-normal);
  z-index: 2;
}

.section.completed {
  background: var(--color-section-completed-bg);
}

.section.completed::before {
  background-color: var(--color-success);
}

.section.completed:not(:last-child)::after {
  background-color: var(--color-success);
  opacity: 0.6;
}

.section.active {
  background: var(--color-section-active-bg);
  transform: scale(1.01);
}

.section.active::before {
  background-color: var(--color-rust);
  /* Aligned with Current badge color */
  box-shadow: 0 0 0 3px rgba(184, 118, 90, 0.2);
  transform: scale(1.2);
}

.section.active .section-title {
  color: var(--color-rust);
}

.section-title {
  font-weight: bold;
  color: var(--color-text);
  margin-bottom: 5px;
  display: block;
  unicode-bidi: isolate;
}

.section-time {
  color: var(--color-text-muted);
  font-size: 0.9em;
  font-family: var(--font-family-mono);
  font-variant-numeric: tabular-nums;
}

.section-real-time {
  color: var(--color-secondary);
  font-weight: normal;
  font-size: 0.9em;
  font-family: var(--font-family-mono);
  font-variant-numeric: tabular-nums;
}

.section-status {
  position: absolute;
  right: 15px;
  top: 15px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.8em;
}

.status-current {
  background: var(--color-rust);
  color: white;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-weight: bold;
  font-size: 0.7em;
  border: none;
  font-family: var(--font-family-mono);
}

.status-upcoming {
  background: var(--color-moss);
  color: white;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-weight: bold;
  font-size: 0.7em;
  border: none;
  font-family: var(--font-family-mono);
}

.status-completed {
  background: var(--color-success);
  color: white;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-weight: bold;
  font-size: 0.7em;
  border: none;
  font-family: var(--font-family-mono);
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: var(--color-cream-dark);
  border-radius: var(--radius-full);
  margin: 20px 0;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg,
      var(--color-primary) 0%,
      var(--color-success) 100%);
  width: 0%;
  transition: width var(--transition-normal) ease-out;
}

.stats {
  display: flex;
  justify-content: space-around;
  margin: 20px 0;
  text-align: center;
}

.stat-item {
  background: var(--color-cream-dark);
  padding: 15px;
  border-radius: var(--radius-md);
  flex: 1;
  margin: 0 5px;
  box-shadow: var(--shadow-sm);
}

.stat-number {
  font-size: 2em;
  font-weight: bold;
  color: var(--color-primary);
  font-family: var(--font-family-mono);
  font-variant-numeric: tabular-nums;
}

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

.skip-selector {
  flex: 1 100%;
  margin-top: 10px;
}

.skip-selector label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.skip-selector select {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-earth);
  font-size: 14px;
  box-sizing: border-box;
}

.countdown-label {
  font-weight: bold;
}

.countdown-value {
  font-weight: normal;
}

/* 显示设置控件样式 */
/* 显示设置控件样式 */
.inline-display-settings {
  width: 100%;
  background-color: var(--color-cream-dark);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-earth);
  padding: 16px;
  margin-top: 20px;
  box-sizing: border-box;
  box-shadow: var(--shadow-sm);
}

.inline-setting-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--color-earth);
}

.inline-display-settings .display-settings-label {
  margin: 0;
  font-size: 0.95em;
  font-weight: 600;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.reset-display-settings-btn {
  padding: 4px 12px;
  font-size: 0.85em;
  color: var(--color-primary);
  font-weight: 500;
  background-color: transparent;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  height: 28px;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reset-display-settings-btn:hover {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.inline-setting-checkboxes {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.setting-checkbox-horizontal {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  font-size: 0.9em;
  cursor: pointer;
  gap: 8px;
  user-select: none;
}

.setting-checkbox-horizontal input[type="checkbox"] {
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
  margin: 0;
}

.setting-checkbox-horizontal span {
  cursor: pointer;
  line-height: 1.4;
  font-size: 1em;
  font-weight: normal;
  color: var(--color-text-light);
  transition: color var(--transition-fast);
}

.setting-checkbox-horizontal:hover span {
  color: var(--color-text);
}

/* Keep mobile display-settings overrides after the base rules so they win. */
@media (max-width: 800px) {
  .inline-display-settings {
    padding: 14px;
  }

  .inline-setting-header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .inline-setting-checkboxes {
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 4px;
  }

  .inline-setting-checkboxes .setting-checkbox-horizontal {
    width: 100%;
    flex: none;
    min-width: 0;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-fast);
  }

  .inline-setting-checkboxes .setting-checkbox-horizontal:hover {
    background-color: var(--color-cream);
  }

  .inline-setting-checkboxes .setting-checkbox-horizontal input[type="checkbox"] {
    flex-shrink: 0;
  }

  .setting-checkbox-horizontal span {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 480px) {
  .inline-display-settings .display-settings-label {
    font-size: 0.85em;
    letter-spacing: 0.3px;
    min-width: 0;
  }

  .reset-display-settings-btn {
    flex: 0 0 auto;
    font-size: 0.8em;
    padding: 4px 10px;
    height: 26px;
  }
}

/* 竖向显示设置控件样式 */
.vertical-setting-controls {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  background-color: var(--color-cream-dark);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-earth);
  margin-top: 10px;
  width: 100%;
  box-sizing: border-box;
  min-height: 40px;
}

.setting-checkbox-vertical {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  font-size: 0.9em;
  cursor: pointer;
  min-width: 0;
  gap: 5px;
  margin: 3px 0;
}

.setting-checkbox-vertical input[type="checkbox"] {
  margin-bottom: 0;
  cursor: pointer;
  margin-right: 4px;
  width: auto;
}

.setting-checkbox-vertical span {
  cursor: pointer;
  word-break: break-all;
  line-height: 1.2;
  font-size: 0.9em;
  font-weight: normal;
}

/* 底部区域样式 */
.bottom-bar {
  background-color: var(--color-cream-dark);
  /* 浅色背景进行区分 */
  padding: 15px 0;
  margin-top: 15px;
  margin-left: -20px;
  margin-right: -20px;
  border-top: 1px solid var(--color-earth);
  text-align: center;
  width: calc(100% + 40px);
  box-sizing: border-box;
}

.bottom-content {
  margin: 0 auto;
  padding: 0 10px;
  width: 100%;
}

.icp-info-full-width {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 底部文本样式 */
.footer-text {
  color: var(--color-text-light);
  /* 柔和文字 */
  font-size: 14px;
  margin: 8px 0;
  cursor: pointer;
  display: block;
  transition: color var(--transition-fast);
}

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

.bottom-bar .icp-info {
  margin-top: 10px;
  color: var(--color-text-muted);
  /* 柔和文字 */
  font-size: 12px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.bottom-bar .icp-info a {
  color: var(--color-text-muted);
  /* 柔和链接 */
  text-decoration: none;
  transition: color var(--transition-fast);
}

.bottom-bar .icp-info a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* 恢复提示样式 */
.bottom-bar .restore-hint {
  color: var(--color-text-light);
  /* 柔和文字 */
  font-size: 14px;
  margin: 8px 0;
  cursor: pointer;
  display: block;
}

.bottom-bar .restore-hint:hover {
  color: var(--color-primary);
}

/* ==========================================
   官方预设市场与收藏功能样式
   ========================================== */

/* 调整切换按钮容器布局（大屏幕） */
@media (min-width: 801px) {
  .toggle-exam-button-container {
    display: flex !important;
    flex-direction: row;
    justify-content: center;
    gap: 16px;
    max-width: 800px;
    margin: 15px auto !important;
  }
  
  .toggle-exam-button-container .toggle-exam-button {
    flex: 1;
    max-width: 392px;
    margin: 0 !important;
  }
}

/* 调整切换按钮容器布局（小屏幕） */
@media (max-width: 800px) {
  .toggle-exam-button-container {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 0 20px;
    margin: 15px 0 !important;
    box-sizing: border-box;
  }
  
  .toggle-exam-button-container .toggle-exam-button {
    flex: 1;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
  }
}

/* 预设市场按钮专属颜色 */
.preset-market-btn {
  background: var(--color-sky) !important;
}

.preset-market-btn:hover {
  background: var(--color-sky-dark) !important;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* 收藏星号样式 */
.preset-fav-star {
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 16px;
  transition: color var(--transition-fast), transform var(--transition-fast);
  user-select: none;
}

.preset-fav-star:hover {
  transform: scale(1.2);
  color: var(--color-warning);
}

.preset-fav-star.active {
  color: #ffb800 !important;
}

/* 选项内容居中对齐，支持星号悬浮右侧 */
.preset-option {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
}

.preset-option-text {
  flex: 1;
  text-align: left;
}

/* 预设市场模态框 */
.market-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: marketFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes marketFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.market-modal-card {
  background-color: var(--color-cream);
  width: 90%;
  max-width: 850px;
  height: 80vh;
  max-height: 700px;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  animation: marketSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.market-modal-header {
  padding: 16px 24px;
  background-color: var(--color-cream-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.market-modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  font-family: var(--font-family);
}

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

.market-modal-close:hover {
  color: var(--color-primary);
  background-color: rgba(0, 0, 0, 0.05);
}

.market-modal-search-bar {
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background-color: var(--color-cream-dark);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.market-modal-search-bar input {
  flex: 1;
  padding: 8px 16px;
  border: 1px solid var(--color-earth);
  border-radius: var(--radius-sm);
  background-color: white;
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition-fast);
  color: var(--color-text);
}

.market-modal-search-bar input:focus {
  border-color: var(--color-primary);
}

.market-favorites-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-light);
  white-space: nowrap;
}

.market-content-layout {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.market-categories-sidebar {
  width: 200px;
  background-color: var(--color-cream-dark);
  border-right: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  padding: 12px 8px;
  gap: 4px;
  overflow-y: auto;
}

.market-category-btn {
  padding: 10px 16px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  text-align: left;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--color-text);
  font-weight: 500;
  font-family: var(--font-family);
}

.market-category-btn:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.market-category-btn.active {
  background-color: var(--color-primary);
  color: white;
  font-weight: 600;
}

.market-presets-grid {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  align-content: start;
}

/* 预设卡片 */
.market-preset-card {
  background-color: white;
  border: 1px solid var(--color-cream-dark);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
  box-sizing: border-box;
}

.market-preset-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-light);
}

.market-preset-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.market-preset-title-area {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.market-preset-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  font-family: var(--font-family);
}

.market-preset-badge {
  display: inline-block;
  padding: 2px 6px;
  background-color: var(--color-cream-dark);
  color: var(--color-text-light);
  font-size: 11px;
  border-radius: 4px;
  font-weight: 600;
  margin-top: 4px;
  align-self: start;
}

.market-preset-fav-btn {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: transform 0.2s, color 0.2s;
  padding: 0;
  line-height: 1;
  user-select: none;
}

.market-preset-fav-btn:hover {
  transform: scale(1.2);
  color: var(--color-warning);
}

.market-preset-fav-btn.active {
  color: #ffb800 !important;
}

.market-preset-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--color-text-light);
  border-bottom: 1px dashed var(--color-cream-dark);
  padding-bottom: 8px;
  text-align: left;
}

.market-preset-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.market-preset-sections {
  flex: 1;
  font-size: 12px;
  color: var(--color-text-light);
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.market-preset-sections-title {
  font-weight: 600;
  color: var(--color-text);
}

.market-preset-sections-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  line-height: 1.4;
}

.market-preset-section-tag {
  background-color: var(--color-cream-dark);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  color: var(--color-text);
}

.market-preset-section-arrow {
  color: var(--color-text-muted);
  font-size: 9px;
  font-weight: bold;
}

.market-preset-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
}

.market-preset-apply-btn {
  background-color: var(--color-primary);
  color: white;
  border: none;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.market-preset-apply-btn:hover {
  background-color: var(--color-primary-dark);
}

/* 吐司通知 */
.market-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color-text);
  color: var(--color-cream);
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  z-index: 3000;
  box-shadow: var(--shadow-lg);
  animation: marketToastFade 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: none;
  font-family: var(--font-family);
}

@keyframes marketToastFade {
  0% { transform: translate(-50%, 15px); opacity: 0; }
  10% { transform: translate(-50%, 0); opacity: 1; }
  90% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, -15px); opacity: 0; }
}

/* 市场小屏幕自适应 */
@media (max-width: 600px) {
  .market-modal-card {
    width: 95%;
    height: 85vh;
    max-height: none;
  }
  .market-content-layout {
    flex-direction: column;
  }
  .market-categories-sidebar {
    width: 100%;
    height: auto;
    max-height: 50px;
    flex-direction: row;
    white-space: nowrap;
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 6px 12px;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .market-category-btn {
    display: inline-block;
    padding: 6px 12px;
    font-size: 13px;
    white-space: nowrap;
  }
  .market-presets-grid {
    padding: 12px;
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
