/* Topic Detail Page Specific Styles */

.topic_header_section {
  padding: 80px 0 60px;
  text-align: center;
}

.topic_title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 6vw, 5rem);
  margin-bottom: 32px;
}

.topic_goal_card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 24px 32px;
  border-radius: 16px;
  display: inline-block;
  max-width: 600px;
  margin-bottom: 32px;
  text-align: left;
}

.topic_goal_card h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.topic_goal_card p {
  color: var(--text-main);
  font-weight: 500;
  line-height: 1.5;
}

.topic_description {
  max-width: 700px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.8;
}

/* Roadmap Flow */
.topic_roadmap_section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.roadmap_flow {
  display: flex;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
  padding: 40px 0;
  scrollbar-width: none; /* Firefox */
}

.roadmap_flow::-webkit-scrollbar { display: none; } /* Chrome/Safari */

.roadmap_item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.roadmap_node {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all 0.3s ease;
  cursor: pointer;
}

.roadmap_node:hover {
  border-color: var(--accent-gold);
  color: var(--accent);
}

.roadmap_node.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.roadmap_connector {
  width: 40px;
  height: 2px;
  background: var(--border);
}

/* Subtopic Status Cards */
.subtopic_cards_section {
  padding: 0 0 100px;
}

.subtopic_grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.subtopic_card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 32px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.subtopic_card h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 24px;
}

.status_rail {
  display: flex;
  background: var(--bg-subtle);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 20px;
}

.status_rail button {
  flex: 1;
  border: none;
  padding: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
}

.status_rail button[data-status="known"].active { background: var(--known); color: white; }
.status_rail button[data-status="revision"].active { background: var(--revision); color: white; }
.status_rail button[data-status="unknown"].active { background: var(--unknown); color: white; }

.status-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  margin-top: 16px;
}

.subtopic_card.known .status-pill { background: rgba(45, 74, 62, 0.15); color: var(--known); }
.subtopic_card.revision .status-pill { background: rgba(197, 163, 88, 0.15); color: var(--revision); }
.subtopic_card.unknown .status-pill { background: rgba(163, 74, 62, 0.15); color: var(--unknown); }

.subtopic_card.known { border-left: 6px solid var(--known); background-color: rgba(45, 74, 62, 0.03); }
.subtopic_card.revision { border-left: 6px solid var(--revision); background-color: rgba(197, 163, 88, 0.03); }
.subtopic_card.unknown { border-left: 6px solid var(--unknown); background-color: rgba(163, 74, 62, 0.03); }

/* Practice Questions */
.practice_section {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.questions_list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.question_card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s;
}

.question_card:hover {
  transform: translateX(8px);
  border-color: var(--accent-gold);
}

.q_main h4 { font-size: 1.1rem; margin-bottom: 8px; }
.q_meta { display: flex; gap: 12px; align-items: center; }
.difficulty { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; }
.difficulty.easy { background: rgba(45, 74, 62, 0.1); color: var(--accent); }
.difficulty.medium { background: rgba(197, 163, 88, 0.1); color: var(--accent-gold); }
.difficulty.hard { background: rgba(163, 74, 62, 0.1); color: #a34a3e; }
.q_tags { font-size: 0.8rem; color: var(--text-muted); }

.q_actions { display: flex; gap: 12px; }
.btn_solve { background: var(--accent); color: white; border: none; padding: 8px 16px; border-radius: 6px; font-weight: 600; cursor: pointer; }
.btn_bookmark { background: transparent; border: 1px solid var(--border); padding: 8px; border-radius: 6px; cursor: pointer; }

.scroll_sentinel {
  padding: 40px;
  text-align: center;
}

.loading_spinner {
  width: 30px;
  height: 30px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  display: inline-block;
  animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Compiler Section */
.compiler_section {
  padding: 100px 0 140px;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
}

.compiler_wrapper {
  background: #1a1a1a;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.3);
  margin-top: 40px;
}

.compiler_controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.lang_select {
  background: #2d2d2d;
  color: white;
  border: 1px solid #444;
  padding: 8px 16px;
  border-radius: 6px;
  font-family: var(--font-sans);
}

.compiler_actions { display: flex; gap: 12px; }
.btn_run { background: var(--accent-light); color: white; border: none; padding: 10px 24px; border-radius: 6px; font-weight: 600; cursor: pointer; }
.btn_submit { background: var(--accent); color: white; border: none; padding: 10px 24px; border-radius: 6px; font-weight: 600; cursor: pointer; }

.editor_container {
  height: 400px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #333;
  margin-bottom: 40px;
}

.featured_console_panel {
  background: #0f0f0f;
  border-radius: 12px;
  padding: 32px;
  border: 1px solid rgba(255,255,255,0.05);
}

.compiler_console_output {
  height: 200px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: #ddd;
  line-height: 1.6;
}

.system_msg { color: #56d364; }

.topic_goal_card.full_width {
  max-width: 100%;
  width: 100%;
  text-align: center;
}

.practice_cta_section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.section_heading.centered { text-align: center; }
