/* FCC Online Docs & Quiz Styles */
.fcc-docs-wrapper {
  max-width: 1380px !important;
  margin: 0 auto;
  padding: 10px 15px;
}
.fcc-docs-layout {
  display: flex;
  gap: 25px;
  align-items: flex-start;
}
/* Sidebar */
.fcc-sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 75px;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  background: var(--anzhiyu-card-bg);
  border-radius: 12px;
  padding: 15px;
  border: 1px solid var(--anzhiyu-border-color, #e3e8f7);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}
.fcc-sidebar::-webkit-scrollbar {
  width: 5px;
}
.fcc-sidebar::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 4px;
}
.fcc-sidebar-header {
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--anzhiyu-border-color, #e3e8f7);
}
.fcc-back-link {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--anzhiyu-theme, #425aef);
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.fcc-sub-accordion {
  margin-bottom: 8px;
  border-radius: 8px;
  border: 1px solid transparent;
}
.fcc-sub-accordion[open] {
  background: rgba(66, 90, 239, 0.03);
}
.fcc-sub-summary {
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 10px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  user-select: none;
}
.fcc-sub-summary:hover {
  background: rgba(0, 0, 0, 0.04);
}
.fcc-sub-tag {
  background: var(--anzhiyu-theme, #425aef);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}
.fcc-sub-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fcc-sec-links {
  padding: 4px 6px 8px 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.fcc-sec-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 8px;
  font-size: 0.8rem;
  color: var(--anzhiyu-fontcolor, #333);
  text-decoration: none;
  border-radius: 5px;
  background: rgba(0,0,0,0.02);
  border: 1px solid transparent;
}
.fcc-sec-link:hover {
  background: rgba(66, 90, 239, 0.08);
  color: var(--anzhiyu-theme, #425aef);
}
.fcc-sec-link.active {
  background: var(--anzhiyu-theme, #425aef) !important;
  color: #fff !important;
  font-weight: 700;
}
.fcc-sec-link .q-count {
  font-size: 0.7rem;
  opacity: 0.75;
}

/* Main Content Area */
.fcc-main-content {
  flex: 1;
  min-width: 0;
}

/* Section Banner & Header */
.fcc-sec-banner {
  background: var(--anzhiyu-card-bg);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
  border: 1px solid var(--anzhiyu-border-color, #e3e8f7);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}
.fcc-breadcrumb {
  font-size: 0.85rem;
  color: var(--anzhiyu-secondtext, #777);
  margin-bottom: 10px;
}
.fcc-breadcrumb a {
  color: var(--anzhiyu-secondtext, #777);
  text-decoration: none;
}
.fcc-breadcrumb a:hover {
  color: var(--anzhiyu-theme, #425aef);
}
.fcc-breadcrumb .active {
  color: var(--anzhiyu-theme, #425aef);
  font-weight: 600;
}
.fcc-sec-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}
.fcc-sec-title {
  margin: 0 0 6px 0;
  font-size: 1.4rem;
  font-weight: 800;
}
.fcc-sec-meta {
  font-size: 0.9rem;
  color: var(--anzhiyu-secondtext, #777);
}
.fcc-mode-switch {
  display: flex;
  gap: 8px;
  background: rgba(0,0,0,0.04);
  padding: 4px;
  border-radius: 8px;
}
.fcc-btn-mode {
  border: none;
  background: transparent;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  color: var(--anzhiyu-fontcolor, #444);
  transition: all 0.2s;
}
.fcc-btn-mode.active {
  background: var(--anzhiyu-card-bg);
  color: var(--anzhiyu-theme, #425aef);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Question Cards */
.fcc-questions-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.fcc-question-card {
  background: var(--anzhiyu-card-bg);
  border-radius: 12px;
  padding: 22px 26px;
  border: 1px solid var(--anzhiyu-border-color, #e3e8f7);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s, box-shadow 0.2s;
}
.fcc-question-card:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}
.fcc-q-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.fcc-q-code {
  font-family: monospace;
  font-size: 1rem;
  font-weight: 800;
  color: var(--anzhiyu-theme, #425aef);
  background: rgba(66, 90, 239, 0.08);
  padding: 3px 10px;
  border-radius: 6px;
}
.fcc-q-anchor a {
  text-decoration: none;
  opacity: 0.4;
  font-size: 0.9rem;
}
.fcc-q-anchor a:hover {
  opacity: 1;
}
.fcc-q-title-en {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--anzhiyu-fontcolor, #111);
  line-height: 1.5;
  margin-bottom: 6px;
}
.fcc-q-title-zh {
  font-size: 1rem;
  font-weight: 500;
  color: var(--anzhiyu-secondtext, #555);
  line-height: 1.5;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--anzhiyu-border-color, #eee);
}
.fcc-figure {
  text-align: center;
  margin: 18px 0;
  background: #ffffff;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.fcc-figure img {
  max-width: 100%;
  max-height: 480px;
  height: auto;
  border-radius: 6px;
  display: inline-block;
  vertical-align: middle;
}
[data-theme="dark"] .fcc-figure {
  background: #ffffff;
  border-color: #334155;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Options */
.fcc-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fcc-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--anzhiyu-border-color, #e5e7eb);
  background: rgba(0, 0, 0, 0.015);
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}
.fcc-option:hover {
  border-color: var(--anzhiyu-theme, #425aef);
  background: rgba(66, 90, 239, 0.03);
}
.fcc-opt-letter {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
}
.fcc-opt-body {
  flex: 1;
}
.fcc-opt-en {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--anzhiyu-fontcolor, #222);
  margin-bottom: 3px;
}
.fcc-opt-zh {
  font-size: 0.88rem;
  color: var(--anzhiyu-secondtext, #666);
}
.fcc-correct-tag {
  font-size: 0.75rem;
  font-weight: 700;
  background: #10b981;
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  align-self: center;
}

/* Learn mode default (Correct answer is highlighted) */
.fcc-option.is-correct {
  border-color: #10b981 !important;
  background: rgba(16, 185, 129, 0.08) !important;
}
.fcc-option.is-correct .fcc-opt-letter {
  background: #10b981;
  color: #fff;
}
.fcc-option.is-correct .fcc-opt-en {
  color: #065f46;
}

/* Quiz mode (Hide answers until click) */
.fcc-quiz-mode .fcc-option.is-correct {
  border-color: var(--anzhiyu-border-color, #e5e7eb) !important;
  background: rgba(0, 0, 0, 0.015) !important;
}
.fcc-quiz-mode .fcc-option.is-correct .fcc-opt-letter {
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
}
.fcc-quiz-mode .fcc-option.is-correct .fcc-opt-en {
  color: var(--anzhiyu-fontcolor, #222);
}
.fcc-quiz-mode .fcc-correct-tag {
  display: none !important;
}
/* Quiz mode user feedback */
.fcc-quiz-mode .fcc-option.user-correct {
  border-color: #10b981 !important;
  background: rgba(16, 185, 129, 0.15) !important;
}
.fcc-quiz-mode .fcc-option.user-correct .fcc-opt-letter {
  background: #10b981 !important;
  color: #fff !important;
}
.fcc-quiz-mode .fcc-option.user-wrong {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.12) !important;
}
.fcc-quiz-mode .fcc-option.user-wrong .fcc-opt-letter {
  background: #ef4444 !important;
  color: #fff !important;
}
.fcc-quiz-mode .fcc-option.user-reveal-correct {
  border-color: #10b981 !important;
  border-style: dashed !important;
  background: rgba(16, 185, 129, 0.08) !important;
}

/* Bottom Navigation */
.fcc-bottom-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  gap: 15px;
  flex-wrap: wrap;
}
.fcc-nav-btn {
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--anzhiyu-card-bg);
  border: 1px solid var(--anzhiyu-border-color, #e3e8f7);
  color: var(--anzhiyu-fontcolor, #333);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.fcc-nav-btn:hover {
  border-color: var(--anzhiyu-theme, #425aef);
  color: var(--anzhiyu-theme, #425aef);
  transform: translateY(-2px);
}
.fcc-nav-btn.center {
  background: rgba(66, 90, 239, 0.06);
  color: var(--anzhiyu-theme, #425aef);
}

/* Class Index & Sub-element Grid */
.fcc-class-hero, .fcc-home-hero {
  background: var(--anzhiyu-card-bg);
  border-radius: 14px;
  padding: 30px;
  margin-bottom: 25px;
  border: 1px solid var(--anzhiyu-border-color, #e3e8f7);
  box-shadow: 0 4px 16px rgba(0,0,0,0.03);
}
.fcc-class-title, .fcc-hero-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 10px 0;
}
.fcc-class-desc, .fcc-hero-subtitle {
  font-size: 1.05rem;
  color: var(--anzhiyu-secondtext, #666);
  line-height: 1.6;
  margin-bottom: 16px;
}
.fcc-class-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.fcc-class-badges .badge {
  background: rgba(66, 90, 239, 0.08);
  color: var(--anzhiyu-theme, #425aef);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}
.fcc-subelements-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
.fcc-subelement-card {
  background: var(--anzhiyu-card-bg);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--anzhiyu-border-color, #e3e8f7);
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.fcc-sub-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  padding-bottom: 10px;
}
.fcc-sub-badge {
  background: var(--anzhiyu-theme, #425aef);
  color: #fff;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 800;
}
.fcc-sub-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}
.fcc-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fcc-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(0,0,0,0.03);
  color: var(--anzhiyu-fontcolor, #333);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}
.fcc-chip:hover {
  background: var(--anzhiyu-theme, #425aef);
  color: #fff;
}
.fcc-chip .count {
  font-size: 0.75rem;
  opacity: 0.75;
}

/* Home Cards */
.fcc-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  margin-bottom: 25px;
}
.fcc-home-card {
  background: var(--anzhiyu-card-bg);
  border-radius: 14px;
  padding: 26px;
  border: 1px solid var(--anzhiyu-border-color, #e3e8f7);
  box-shadow: 0 4px 16px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.25s, box-shadow 0.25s;
}
.fcc-home-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}
.fcc-home-card .card-badge {
  align-self: flex-start;
  background: rgba(66, 90, 239, 0.1);
  color: var(--anzhiyu-theme, #425aef);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.fcc-home-card h2 {
  margin: 0 0 6px 0;
  font-size: 1.35rem;
}
.fcc-home-card .card-period {
  font-size: 0.85rem;
  color: var(--anzhiyu-secondtext, #888);
  margin-bottom: 12px;
}
.fcc-home-card .card-desc {
  font-size: 0.92rem;
  color: var(--anzhiyu-secondtext, #555);
  line-height: 1.5;
  flex: 1;
  margin-bottom: 18px;
}
.fcc-home-card .card-stats {
  display: flex;
  justify-content: space-between;
  background: rgba(0,0,0,0.02);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  margin-bottom: 18px;
}
.fcc-home-card .card-btn {
  display: block;
  text-align: center;
  padding: 10px 16px;
  background: var(--anzhiyu-theme, #425aef);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: opacity 0.2s;
}
.fcc-home-card .card-btn:hover {
  opacity: 0.9;
}
.fcc-home-tips {
  background: var(--anzhiyu-card-bg);
  border-radius: 12px;
  padding: 20px 24px;
  border: 1px solid var(--anzhiyu-border-color, #e3e8f7);
}
.fcc-home-tips h3 {
  margin: 0 0 10px 0;
}
.fcc-home-tips ul {
  margin: 0;
  padding-left: 20px;
  line-height: 1.8;
}

/* Mobile responsiveness */
@media screen and (max-width: 991px) {
  .fcc-docs-layout {
    flex-direction: column;
  }
  .fcc-sidebar {
    width: 100%;
    position: static;
    max-height: 380px;
    margin-bottom: 15px;
  }
  .fcc-sec-links {
    grid-template-columns: repeat(3, 1fr);
  }
}
