/* ══════════════════════════════════════
   SCREEN: LESSON LOADER
   Unified generating + topics screen
   ══════════════════════════════════════ */

/* Layout */
#lesson-loader.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding-top: 0;
  text-align: center;
}

/* Header */
.ll-header {
  margin-bottom: 28px;
  width: 100%;
  max-width: 520px;
}
.ll-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
}
.ll-sub {
  color: var(--fg-muted);
  font-size: 15px;
  margin-top: 4px;
  margin-bottom: 0;
  transition: opacity 0.35s var(--ease);
}

/* Canvas + tag overlays (already in HTML outside section) */
#gen-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 10;
  display: none;
}
#gen-canvas.active {
  display: block;
}
.gen-tags-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 11;
  display: none;
}
.gen-tags-overlay.active {
  display: block;
}

/* Constellation tags (opacity + transform driven by RAF in animations.js) */
.gen-tag {
  position: absolute;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  background: var(--primary-50);
  color: var(--primary-700);
  border: 1px solid var(--primary-200);
  white-space: nowrap;
  will-change: transform, opacity;
}
.dark .gen-tag { color: var(--primary-400); }
.gen-tag.glowing {
  box-shadow: 0 0 12px var(--primary-300), 0 0 4px var(--primary-200);
}
.dark .gen-tag.glowing {
  box-shadow: 0 0 16px var(--primary-400), 0 0 6px var(--primary-300);
}

/* Topic cards container */
.ll-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 520px;
}

/* Topic card — resolving state (initial, during animation) */
.topic-card-resolving {
  opacity: 0;
  filter: blur(8px);
  transform: scale(0.96);
  pointer-events: none;
  transition: none;
}

/* Topic card — resolved (animation complete per card) */
.topic-card-resolved {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
  pointer-events: none;
  transition: opacity 0.6s var(--ease), filter 0.6s var(--ease), transform 0.5s var(--ease);
}

/* Topic card — interactive (clickable) */
.topic-card-interactive {
  pointer-events: auto;
  cursor: pointer;
}

/* Topic card structure */
.topic-card {
  display: flex;
  align-items: center;
  gap: 16px;
}
.topic-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--primary-50);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  color: var(--primary-500);
}
.topic-body { flex: 1; }
.topic-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
}
.topic-subtitle {
  font-size: 13px;
  color: var(--fg-muted);
  margin-top: 2px;
}
.topic-tag {
  margin-top: 6px;
}

/* Custom topic card */
.custom-topic-card {
  cursor: default;
  pointer-events: none;
}
.custom-topic-hidden {
  opacity: 0;
  filter: blur(4px);
  transform: translateY(8px);
  transition: opacity 0.5s var(--ease), filter 0.5s var(--ease), transform 0.5s var(--ease);
}
.custom-topic-visible {
  opacity: 0.65;
  filter: blur(0);
  transform: translateY(0);
  transition: opacity 0.5s var(--ease), filter 0.5s var(--ease), transform 0.5s var(--ease);
}
.custom-topic-card:hover {
  box-shadow: none;
  transform: none;
  border-color: var(--border);
}
.custom-topic-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.custom-topic-input {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--fg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  min-width: 0;
  flex: 1;
  outline: none;
}
.custom-topic-input::placeholder {
  color: var(--fg-hint);
  font-size: 13px;
}
.custom-topic-input:disabled {
  opacity: 0.5;
}
