body {
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  background-color: var(--primary);
  /* padding: 20px; */
}

/* --- 大標題 Hero 區塊樣式 (基於 colors-config.css) --- */
.page-hero {
  padding: 60px 20px 40px;
  text-align: center;
  background: var(--gradient-light);
  /* border-bottom:3px solid var(--primary-light); ; */
}

.hero-container {
  max-width: 850px;
  margin: 0 auto;
}

/* 分類小標籤 - 使用深色調 */
.category-tag {
  background-color: var(--primary-dark);
  color: var(--white);
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--radius-xl);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  display: inline-block;
}

/* 標題 - 使用主色系深色 */
.note-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  color: var(--primary-dark);
  /* 回歸深紫藍色 */
}

/* 副標題說明 - 使用中性次要文字 */
.hero-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto var(--spacing-lg);
}

/* 裝飾底線 - 使用主色 */
.hero-divider {
  width: 50px;
  height: 4px;
  background-color: var(--primary-dark);
  margin: 0 auto;
  border-radius: var(--radius-sm);
}

/* --- 題目需求區塊樣式 --- */
.ques-section {
  background-color: var(--white);
  /* 保持乾淨背景 */
  border-left: 4px solid var(--primary-light);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 4px 8px 8px 4px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.02);
  /* 輕微內陰影增加深度 */
  line-height: 1.7;
  color: var(--text-main);
  position: relative;
}

/* 題目需求強標題 */
.ques-section strong {
  color: var(--primary-dark);
  font-size: 1.05rem;
  display: block;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

/* 題目內部的邏輯條列說明（如果有換行或文字） */
.ques-section br+br {
  display: block;
  content: "";
  margin-top: 8px;
}

/* 題目區塊內的補充文字（如：年份判斷邏輯） */
.ques-section {
  font-size: 0.95rem;
  background-image: linear-gradient(to right, rgba(99, 102, 241, 0.03), transparent);
}

/* 裝飾性小標示：在右上角加入「Exercise」字樣（選用） */
.ques-section::after {
  content: "PRACTICE";
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 0.7rem;
  font-weight: 900;
  color: var(--primary-light);
  opacity: 0.3;
  letter-spacing: 1px;
}

.custom-list {
  /* 1. 讓點點出現在內容裡面，這樣才會跟標題對齊 */
  list-style-position: inside;
  padding-left: 0;
  margin-top: 15px;
}

.custom-list {
  /* 1. 改回 outside，讓點點獨立在文字框外 */
  list-style-position: outside;

  /* 2. 這是對齊標題的關鍵：
     標題前面有圖釘 emoji，通常需要大約 1.5rem ~ 2rem 的左邊距
     來讓點點剛好落在圖釘下方或文字開頭處 */
  padding-left: 1.2rem;
  margin-left: 0.5rem;
  margin-top: 15px;
}

.custom-list li {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 2;
  margin-bottom: 8px;

  /* 3. 重要：確保這裡沒有 display: flex，不然點點會不見 */
  display: list-item;
}

.custom-list li::marker {
  color: var(--primary-dark);
  font-weight: bold;
}

/* 響應式微調 */
@media (max-width: 768px) {
  .note-title {
    font-size: 2rem;
  }
}

.ex {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.note-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #6366f1;
  font-weight: 600;
  margin-bottom: 2rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid #6366f1;
  border-radius: 0.5rem;
  transition: all 0.25s ease-in-out;
}

.back-link:hover {
  background-color: #6366f1;
  color: white;
  transform: translateX(-4px);
}

/* 程式碼區塊樣式 */

.code-section {
  background-color: white;
  /* border: 1px solid #e5e7eb; */
  border-radius: 0.375rem;
  padding: 1rem;
  font-family: "Courier New", monospace;
  color: #374151;
  margin-top: 1rem;
  overflow-x: auto;
}

/* 筆記外框 */
.note-card {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 小標題樣式 */
.note-card h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: var(--primary-dark);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
}

.note-card h3::before {
  content: "💎";
  margin-right: 8px;
}

.note-card li {
  margin-bottom: 8px;
  /* 刪除 display: flex; */
  /* 刪除 align-items: center; */
  display: list-item;
  /* 確保它是清單模式 */
}

/* 內容區塊 */
.note-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 學習重點獨立區塊優化 */
.learning-point-box {
  margin-top: 25px;
  padding: 15px 20px;
  background-color: rgba(74, 111, 165, 0.05);
  border-radius: 8px;
  border-left: 4px solid var(--primary);
  /* 專業感深藍左邊框 */
}

.learning-point-title {
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: bold;
  /* margin-bottom: 10px; */
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 確保區塊內的列表縮排與整體對齊 */
.learning-point-box .custom-list {
  margin: 0;
  padding-left: 5px;
}


/* 執行結果區塊強化 */
/* 1. 執行結果區塊 - 帶虛線邊框 */
.code-section {
  background: #f8f9fa;
  border: 1px dashed #dee2e6;
  padding: 20px;
  margin-top: 1rem;
  margin-bottom: 25px;
  border-radius: 8px;
}

.section-label {
  display: block;
  font-size: 0.85rem;
  color: #adb5bd;
  margin-bottom: 10px;
  font-weight: bold;
}

/* 重點筆記區塊 */
.note-highlight {
  background-color: #fff9db;
  /* 溫暖的淺黃色 */
  border-left: 5px solid #fab005;
  padding: 15px 20px;
  margin-bottom: 15px;
  border-radius: 4px;
}

.highlight-title {
  color: #f08c00;
  font-size: 1rem;
  margin-bottom: 5px;
}

.highlight-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.9rem;
  color: #495057;
}

.note-item {
  display: flex;
  flex-direction: column;
  /* align-items: center; */
  padding: 1rem 0;
}

/* 說明層：負責 code 與 span 的左右排版 */
.note-desc {
  display: grid;
  /* 第一欄是圖示寬度，第二欄佔滿 */
  grid-template-columns: 28px 1fr;
  /* 兩列：第一列給 h4，第二列給 code */
  grid-template-rows: auto auto;
  column-gap: 4px;
  row-gap: 2px;
  /* 縮短標題與 code 的垂直距離 */
  align-items: start;
  margin-bottom: 12px;
}

.note-desc::before {
  content: "⚡";
  grid-column: 1;
  /* 讓閃電跨越兩列，守在左側 */
  grid-row: 1 / span 2;
  font-size: 1.1rem;
  padding-top: 2px;
  /* 微調對齊 h4 的高度 */
}

.note-desc h4 {
  color: var(--primary-dark);
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.4;
}

.note-desc code {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  justify-self: start;
  /* 確保內部的 <br> 能正常換行 */
  white-space: pre-wrap;
}

/* 針對內嵌整段代碼的樣式修正 */
pre {
  background-color: #2d2d2d;
  /* 深色背景 */
  color: #f8f8f2;
  padding: 15px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 10px 0;
}

/* 當 code 在 pre 裡面時，取消原本單行 code 的背景色與邊距 */
pre code {
  background-color: transparent !important;
  padding: 0 !important;
  font-family: "Consolas", monospace;
  color: inherit;
}

form {
  gap: 12px;
  padding: 50px;
}

/* 強調文字樣式 */
mark {
  background-color: #8af6fe;
  /* 淺黃色高亮 */
  color: #00205a;
  padding: 0 4px;
  border-radius: 2px;
}

/* 2. 學習重點區塊 - 妳要求的獨立藍色區塊 */
.learning-point-box {
  margin-top: 25px;
  padding: 15px 20px;
  background-color: var(--white);
  border-radius: 8px;
  border-left: 4px solid var(--primary);
  /* 藍色粗邊框 */
}

.learning-point-title {
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: bold;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 3. 清單縮排與點點顏色 */
.custom-list {
  list-style-position: outside;
  padding-left: 1.2rem;
  margin-left: 0.5rem;
}

.custom-list li {
  color: var(--text-secondary);
  display: list-item;
}

.custom-list li::marker {
  color: var(--primary);
  /* 點點顏色跟著重點區塊走 */
}