/* 课程中心 · 学术风格公开浏览页 */

.cc-main {
  padding-bottom: 3rem;
}

.cc-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.cc-eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fh-red);
}

.cc-course-picker {
  display: block;
  min-width: 14rem;
  max-width: min(22rem, 100%);
  font-size: 0.75rem;
  color: #64748b;
}

.cc-course-picker select {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 2.5rem;
  margin-top: 0;
  padding: 0 2.35rem 0 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(139, 26, 26, 0.22);
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%238B1A1A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  background-size: 0.8rem;
  color: var(--fh-ink);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cc-course-picker select:focus {
  outline: none;
  border-color: var(--fh-red);
  box-shadow: 0 0 0 3px rgba(139, 26, 26, 0.12);
}

.cc-banner {
  position: relative;
  overflow: hidden;
  border-radius: 0.85rem;
  border: 1px solid rgba(201, 168, 76, 0.35);
  background: linear-gradient(135deg, #5c1212 0%, #8b1a1a 48%, #6e1515 100%);
  box-shadow: 0 6px 18px rgba(90, 20, 20, 0.14);
}

.cc-banner-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.15rem;
  padding: 0.85rem 1.1rem;
}

.cc-banner #cc-title {
  font-size: 1.35rem;
  line-height: 1.3;
}

@media (min-width: 640px) {
  .cc-banner #cc-title {
    font-size: 1.55rem;
  }
}

.cc-banner #cc-teachers,
.cc-banner-teachers {
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #f3e6b8;
  letter-spacing: 0.02em;
}

.cc-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(3.6rem, 4.6rem));
  gap: 0.15rem 0;
  padding: 0.35rem 0.2rem;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(245, 230, 184, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.cc-stat {
  position: relative;
  min-width: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 0;
  background: transparent;
  border: none;
  text-align: center;
}

.cc-stat:nth-child(3n + 1)::before,
.cc-stat:nth-child(3n + 2)::before {
  content: '';
  position: absolute;
  top: 18%;
  bottom: 18%;
  right: 0;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(245, 230, 184, 0.35) 25%,
    rgba(245, 230, 184, 0.35) 75%,
    transparent 100%
  );
}

.cc-stat:nth-child(n + 4) {
  border-top: 1px solid rgba(245, 230, 184, 0.18);
}

.cc-stat-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #f8ecc0;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.cc-stat-value {
  display: block;
  margin-top: 0.15rem;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.15;
  color: #fffef8;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.cc-type-bar {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 1.1rem 0.75rem;
}

.cc-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(232, 212, 154, 0.28);
  color: var(--fh-gold-light);
  font-size: 0.72rem;
}

.cc-type-chip strong {
  color: #fff;
  font-weight: 600;
}

.cc-classes {
  padding: 0.75rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(139, 26, 26, 0.12);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
}

.cc-section-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.cc-section-label h3 {
  margin: 0;
  font-family: 'Noto Serif SC', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--fh-ink);
}

.cc-classes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.cc-class-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(139, 26, 26, 0.12);
  background: #fff;
  font-size: 0.8125rem;
  color: var(--fh-ink);
}

.cc-class-chip .cc-class-count {
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(139, 26, 26, 0.08);
  color: var(--fh-red);
  font-size: 0.7rem;
  font-weight: 600;
}

.cc-workspace {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

@media (max-width: 900px) {
  .cc-workspace {
    grid-template-columns: 1fr;
  }

  .cc-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(100%, 18rem);
  }
}

.cc-sidebar,
.cc-detail {
  border-radius: 0.9rem;
  border: 1px solid rgba(139, 26, 26, 0.12);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 18px rgba(42, 34, 34, 0.04);
}

.cc-sidebar {
  position: sticky;
  top: 5.5rem;
  max-height: calc(100vh - 6.5rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cc-sidebar-head {
  padding: 0.85rem 1rem 0.7rem;
  border-bottom: 1px solid rgba(139, 26, 26, 0.08);
}

.cc-sidebar-head h3 {
  margin: 0;
  font-family: 'Noto Serif SC', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--fh-ink);
}

.cc-toc {
  flex: 1;
  overflow: auto;
  padding: 0.5rem 0.55rem 0.85rem;
}

.cc-empty {
  margin: 1rem;
  font-size: 0.875rem;
  color: #94a3b8;
  text-align: center;
}

.cc-book {
  margin-bottom: 0.75rem;
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 0.65rem;
  background: rgba(255, 252, 247, 0.9);
  overflow: hidden;
}

.cc-book-btn {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0.8rem;
  border: 0;
  background: linear-gradient(90deg, rgba(139, 26, 26, 0.08), rgba(201, 168, 76, 0.12));
  text-align: left;
  cursor: pointer;
}

.cc-book-btn:hover {
  background: linear-gradient(90deg, rgba(139, 26, 26, 0.12), rgba(201, 168, 76, 0.18));
}

.cc-book-title {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #8b1a1a;
  line-height: 1.4;
}

.cc-book-meta {
  flex-shrink: 0;
  font-size: 0.7rem;
  color: #94a3b8;
  white-space: nowrap;
}

.cc-book-body {
  display: none;
  padding: 0.35rem 0.4rem 0.5rem;
}

.cc-book.is-open > .cc-book-body {
  display: block;
}

.cc-chapter {
  margin-bottom: 0.35rem;
}

.cc-chapter-btn {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.7rem;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.cc-chapter-btn:hover {
  background: rgba(139, 26, 26, 0.05);
}

.cc-chapter.is-open > .cc-chapter-btn {
  background: rgba(139, 26, 26, 0.07);
}

.cc-chapter-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fh-ink);
  line-height: 1.35;
}

.cc-chapter-meta {
  flex-shrink: 0;
  font-size: 0.68rem;
  color: #94a3b8;
  white-space: nowrap;
}

.cc-period-list {
  display: none;
  padding: 0.15rem 0 0.35rem 0.55rem;
  margin: 0 0 0.25rem 0.35rem;
  border-left: 2px solid rgba(201, 168, 76, 0.45);
}

.cc-chapter.is-open .cc-period-list {
  display: block;
}

.cc-period-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  margin-bottom: 0.15rem;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.cc-period-btn:hover {
  background: rgba(201, 168, 76, 0.12);
}

.cc-period-btn.is-active {
  background: rgba(139, 26, 26, 0.1);
  box-shadow: inset 3px 0 0 var(--fh-red);
}

.cc-period-btn-title {
  font-size: 0.8125rem;
  color: #475569;
  line-height: 1.35;
}

.cc-period-btn.is-active .cc-period-btn-title {
  color: var(--fh-red);
  font-weight: 600;
}

.cc-period-btn-count {
  flex-shrink: 0;
  min-width: 1.4rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.1);
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 600;
  text-align: center;
}

.cc-detail {
  min-height: 18rem;
  padding: 1.15rem 1.25rem 1.5rem;
}

.cc-detail-empty[hidden],
.cc-detail-panel[hidden],
.cc-classes[hidden],
.cc-type-bar[hidden] {
  display: none !important;
}

.cc-detail-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 10rem;
  text-align: center;
  padding: 1.25rem 1rem;
}

.cc-empty-icon {
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.85rem;
  border-radius: 0.75rem;
  background: rgba(139, 26, 26, 0.08);
  color: var(--fh-red);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
}

.cc-period-head {
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(139, 26, 26, 0.1);
}

.cc-crumb {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

.cc-phase-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding: 0.3rem;
  border-radius: 0.7rem;
  background: rgba(247, 241, 232, 0.85);
  border: 1px solid rgba(139, 26, 26, 0.08);
}

.cc-phase-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 6.5rem;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: #64748b;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.cc-phase-tab:hover {
  background: rgba(255, 255, 255, 0.7);
  color: var(--fh-ink);
}

.cc-phase-tab.is-active {
  background: #fff;
  color: var(--fh-ink);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(42, 34, 34, 0.08);
}

.cc-phase-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  flex-shrink: 0;
}

.cc-phase-dot--sky { background: #0284c7; }
.cc-phase-dot--crimson { background: var(--fh-red); }
.cc-phase-dot--amber { background: #d97706; }
.cc-phase-dot--violet { background: #7c3aed; }

.cc-phase-panels {
  display: grid;
  gap: 0.85rem;
}

.cc-phase-panel {
  display: grid;
  gap: 1rem;
}

.cc-phase-panel[hidden] {
  display: none !important;
}

.cc-block {
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: #fff;
  overflow: hidden;
}

.cc-block--sky { border-left: 3px solid #0284c7; }
.cc-block--crimson { border-left: 3px solid var(--fh-red); }
.cc-block--amber { border-left: 3px solid #d97706; }
.cc-block--violet { border-left: 3px solid #7c3aed; }

.cc-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.95rem;
  background: rgba(247, 241, 232, 0.55);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.cc-block-head h4 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--fh-ink);
  font-family: 'Noto Serif SC', serif;
}

.cc-block-badge {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 500;
}

.cc-block-body {
  padding: 0.9rem 0.95rem 1rem;
}

.cc-text-body {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.75;
  color: #334155;
  white-space: pre-wrap;
}

.cc-text-empty,
.cc-list-empty {
  margin: 0;
  font-size: 0.875rem;
  color: #94a3b8;
}

.cc-resource-list {
  display: grid;
  gap: 0.55rem;
}

.cc-resource-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(251, 247, 240, 0.55);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.cc-resource-item:hover {
  border-color: rgba(139, 26, 26, 0.28);
  background: #fff;
}

.cc-resource-thumb {
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  border-radius: 0.4rem;
  object-fit: cover;
  background: rgba(139, 26, 26, 0.08);
}

.cc-resource-icon {
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  border-radius: 0.4rem;
  display: grid;
  place-items: center;
  background: rgba(139, 26, 26, 0.08);
  color: var(--fh-red);
  font-size: 0.65rem;
  font-weight: 700;
}

.cc-resource-meta {
  min-width: 0;
  flex: 1;
}

.cc-resource-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fh-ink);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-resource-aside {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.2rem;
  text-align: right;
  max-width: 42%;
}

.cc-resource-type {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.02em;
}

.cc-resource-points {
  font-size: 0.7rem;
  color: #94a3b8;
  white-space: nowrap;
}

.cc-resource-sub {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  color: #94a3b8;
}

@media (max-width: 640px) {
  .cc-resource-aside {
    max-width: 38%;
  }

  .cc-resource-points {
    white-space: normal;
  }
}

.cc-qna-list {
  display: grid;
  gap: 0.75rem;
}

.cc-qna-item {
  padding: 0.75rem 0.85rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(124, 58, 237, 0.15);
  background: rgba(245, 243, 255, 0.55);
}

.cc-qna-q {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fh-ink);
  line-height: 1.5;
}

.cc-qna-a {
  margin: 0.45rem 0 0;
  font-size: 0.84rem;
  line-height: 1.65;
  color: #475569;
}

.cc-qna-meta {
  margin: 0.45rem 0 0;
  font-size: 0.7rem;
  color: #94a3b8;
}

@media (max-width: 640px) {
  .cc-sidebar {
    position: static;
    max-height: none;
  }

  .cc-banner-inner {
    padding: 0.75rem 0.9rem;
  }

  .cc-banner #cc-title {
    font-size: 1.2rem;
  }

  .cc-detail {
    padding: 1rem;
  }
}

