/* progress.css - 进度页样式（顶部概览 / 章节勾选 / 学习路线 / 笔记） */
/* 装修基础课 v1.2 */

.progress-main {
  max-width: var(--container-max);
  margin: var(--sp-6) auto;
  padding: 0 var(--sp-5);
}

/* ===== 顶部概览 ===== */

.progress-hero {
  background: linear-gradient(135deg, var(--c-card) 0%, var(--c-decor) 100%);
  border-radius: var(--r-lg);
  padding: var(--sp-8) var(--sp-5);
  margin-bottom: var(--sp-8);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.progress-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.4) 0%, transparent 50%),
                    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.3) 0%, transparent 40%);
  pointer-events: none;
}

.progress-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--c-mid);
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--sp-2);
  position: relative;
  z-index: 1;
}

.progress-title {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  color: var(--c-deep);
  margin: 0 0 var(--sp-2);
  border: none;
  padding: 0;
  position: relative;
  z-index: 1;
}

.progress-subtitle {
  color: var(--c-text-soft);
  margin-bottom: var(--sp-6);
  position: relative;
  z-index: 1;
}

.progress-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
  position: relative;
  z-index: 1;
}

.overview-card {
  background: var(--c-white);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-line);
  transition: all 0.2s;
}

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

.overview-num {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--c-mid);
  line-height: 1;
}

.overview-card.streak .overview-num {
  color: var(--c-yellow);
}

.overview-label {
  font-size: var(--fs-sm);
  color: var(--c-text);
  margin-top: var(--sp-2);
  font-weight: 600;
}

.overview-total {
  font-size: var(--fs-xs);
  color: var(--c-text-mute);
  margin-top: 2px;
}

.progress-bar-big {
  height: 12px;
  background: rgba(255,255,255,0.6);
  border-radius: var(--r-pill);
  overflow: hidden;
  margin: var(--sp-4) 0 var(--sp-5);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
  position: relative;
  z-index: 1;
}

.progress-fill-big {
  height: 100%;
  background: linear-gradient(90deg, var(--c-mid), var(--c-light), var(--c-yellow));
  transition: width 0.6s ease;
  border-radius: var(--r-pill);
}

.progress-actions {
  display: flex;
  gap: var(--sp-3);
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.btn-action {
  background: var(--c-white);
  color: var(--c-mid);
  border: 1px solid var(--c-line);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
  font-family: var(--font-body);
}

.btn-action:hover {
  background: var(--c-card);
  border-color: var(--c-mid);
  transform: translateY(-1px);
}

.btn-action.btn-danger {
  color: var(--c-red);
}

.btn-action.btn-danger:hover {
  background: #fdf0ee;
  border-color: var(--c-red);
}

/* ===== 章节勾选 ===== */

.progress-section {
  background: var(--c-white);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  margin-bottom: var(--sp-6);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--c-line);
}

.progress-section-title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  color: var(--c-mid);
  border-bottom: 2px solid var(--c-decor);
  padding-bottom: var(--sp-3);
  margin: 0 0 var(--sp-3);
}

.progress-section-lead {
  color: var(--c-text-soft);
  margin-bottom: var(--sp-5);
  max-width: 720px;
}

.chapter-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--sp-4);
}

.chapter-check {
  background: var(--c-card);
  border: 2px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  transition: all 0.2s;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.chapter-check:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--c-mid);
  border-bottom: 2px solid var(--c-mid);
}

.chapter-check.completed {
  background: linear-gradient(135deg, #f0f8e8 0%, #e8f5e0 100%);
  border-color: var(--c-green);
}

.chapter-check.completed .chapter-check-title {
  color: var(--c-green);
  text-decoration: line-through;
  text-decoration-color: var(--c-green);
  text-decoration-thickness: 2px;
}

.chapter-check.key::before {
  content: "⭐";
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  font-size: 1.2rem;
}

.chapter-check-header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.chapter-check-num {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--c-light);
  font-weight: 700;
}

.chapter-check-title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--c-deep);
  flex: 1;
}

.chapter-check-desc {
  font-size: var(--fs-sm);
  color: var(--c-text-soft);
  line-height: 1.5;
  flex: 1;
}

.chapter-check-meta {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.chapter-check-tag {
  font-size: var(--fs-xs);
  background: var(--c-white);
  color: var(--c-mid);
  padding: 2px 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-line);
}

.chapter-check-actions {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
  justify-content: space-between;
  margin-top: var(--sp-2);
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--c-line);
}

.check-label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  cursor: pointer;
  user-select: none;
  font-size: var(--fs-sm);
  color: var(--c-mid);
  font-weight: 600;
}

.check-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--c-green);
}

.chapter-check-link {
  font-size: var(--fs-sm);
  color: var(--c-light);
  text-decoration: none;
  font-weight: 600;
}

.chapter-check-link:hover {
  color: var(--c-mid);
  border-bottom: 1px solid var(--c-mid);
}

/* ===== 学习路线 ===== */

.route-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-4);
}

.route-card {
  background: var(--c-card);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  border: 1px solid var(--c-line);
  transition: all 0.2s;
}

.route-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--c-light);
}

.route-icon {
  font-size: 2rem;
  margin-bottom: var(--sp-2);
}

.route-title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  color: var(--c-deep);
  margin: 0 0 var(--sp-2);
  border: none;
  padding: 0;
}

.route-desc {
  font-size: var(--fs-sm);
  color: var(--c-text-soft);
  line-height: 1.6;
  margin-bottom: var(--sp-3);
}

.route-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.route-list li {
  font-size: var(--fs-sm);
  color: var(--c-text);
  padding: var(--sp-1) 0;
  padding-left: var(--sp-4);
  position: relative;
}

.route-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--c-light);
  font-weight: 700;
}

/* ===== 学习笔记 ===== */

.notes-box {
  border: 2px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-card);
  padding: var(--sp-4);
}

.notes-textarea {
  width: 100%;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.7;
  color: var(--c-text);
  resize: vertical;
  min-height: 200px;
  outline: none;
}

.notes-textarea::placeholder {
  color: var(--c-text-mute);
  font-style: italic;
}

.notes-meta {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--c-text-mute);
  margin-top: var(--sp-3);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--c-line);
}

.notes-meta #notesStatus.saved {
  color: var(--c-green);
  font-weight: 600;
}

/* ===== 响应式 ===== */

@media (max-width: 640px) {
  .progress-hero {
    padding: var(--sp-5) var(--sp-3);
  }
  .progress-overview {
    grid-template-columns: repeat(2, 1fr);
  }
  .chapter-check-grid {
    grid-template-columns: 1fr;
  }
  .progress-section {
    padding: var(--sp-4);
  }
}