/* 🌿 全局基础样式 */
body {
  font-family: "Segoe UI", "Noto Sans", "Helvetica Neue", sans-serif;
  background: #fefefe;
  padding: 20px;
  max-width: 900px;
  margin: auto;
  line-height: 1.8;
  color: #333;
  overflow-x: hidden;
}

h1,
h2 {
  color: #222;
  margin-bottom: 12px;
  font-weight: 600;
}

section {
  margin-bottom: 40px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  padding: 24px;
}

/* 🔗 链接样式 */
a {
  color: #39c5bb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* 🔘 按钮样式 */
button {
  padding: 10px 20px;
  background: #39c5bb;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  margin-top: 10px;
  transition: background 0.2s ease;
}

button:hover {
  background: #2bb3a9;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 📅 日期输入框 */
input[type="date"] {
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-right: 10px;
}

/* 🧾 JSON 展示区域 */
pre {
  background: #f7f9fc;
  padding: 16px;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 15px;
  font-family: "Courier New", monospace;
}

code.language-json {
  white-space: pre-wrap;
  word-break: break-word;
}

/* ✨ Prism.js 高亮补充 */
.token.property {
  color: #39c5bb;
}

.token.string {
  color: #e67e22;
}

.token.number {
  color: #2ecc71;
}

.token.boolean {
  color: #f39c12;
}

.token.null {
  color: #95a5a6;
}

/* 📋 列表样式 */
ul {
  list-style: none;
  padding-left: 0;
}

li {
  background: #f0f4ff;
  border: 1px solid #dbe4ff;
  border-radius: 10px;
  padding: 12px 16px;
  margin: 8px 0;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 16px;
}

li:hover {
  background: #e0ecff;
}

/* 🧠 答题卡片样式 */
.quiz-block {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 24px;
  margin-bottom: 32px;
  transition: box-shadow 0.3s;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

.quiz-block:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.quiz-block h3 {
  font-size: 20px;
  margin-bottom: 18px;
  color: #444;
}

/* ✅ 答题选项按钮 */
.option-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: #f9f9f9;
  border: none;
  border-radius: 10px;
  padding: 14px 18px;
  margin: 10px 0;
  font-size: 17px;
  cursor: pointer;
  transition: background 0.2s ease;
  width: 100%;
  text-align: left;
  line-height: 1.6;
  color: #333;
  white-space: normal;
  word-break: break-word;
}

.option-btn:hover {
  background: #f0f0f0;
}

.option-btn.correct {
  background: #d0f5d8;
  color: #2e7d32;
}

.option-btn.incorrect {
  background: #ffe0e0;
  color: #c62828;
}

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

/* 📊 答题热度图进度条 */
.percent-label {
  font-size: 14px;
  color: #666;
  margin-top: 6px;
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: #eee;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 4px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #a0eac9, #39c5bb);
  border-radius: 6px;
  transition: width 0.6s ease;
}

/* 📣 正确答案提示 */
.answer-info {
  margin-top: 16px;
  padding: 14px;
  background: #fff8dc;
  border-left: 6px solid #ffcc00;
  border-radius: 8px;
  font-weight: bold;
  color: #8a6d3b;
  word-break: break-word;
}

/* 📱 响应式适配优化 */
@media (max-width: 600px) {
  body {
    padding: 12px;
  }

  button,
  input[type="date"] {
    width: 100%;
    margin-top: 10px;
  }

  .option-btn {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-color-scheme: dark) {
  body {
    background: #1e1e1e;
    color: #e0f7f5;
  }

  section {
    background: #2a2a2a;
    box-shadow: none;
  }

  a {
    color: #39c5bb;
  }

  button {
    background: #39c5bb;
    color: #fff;
  }

  button:hover {
    background: #2bb3a9;
  }

  input[type="date"] {
    background: #333;
    color: #eee;
    border: 1px solid #555;
  }

  pre {
    background: #2a2a2a;
    color: #cceeea;
  }

  .quiz-block {
    background: #2a2a2a;
    box-shadow: none;
  }

  .option-btn {
    background: #333;
    color: #eee;
  }

  .option-btn:hover {
    background: #444;
  }

  .option-btn.correct {
    background: #2e7d32;
    color: #d0f5d8;
  }

  .option-btn.incorrect {
    background: #c62828;
    color: #ffe0e0;
  }

  .progress-bar {
    background: #444;
  }

  .progress-fill {
    background: linear-gradient(90deg, #39c5bb, #a0eac9);
  }

  .answer-info {
    background: #3a3a3a;
    border-left: 6px solid #ffcc00;
    color: #f0e68c;
  }
}