/* Curriculum demo page aligned with the main AI Professor site design */
.curriculum-demo-section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 24px 20px;
  color: var(--text);
}
.curriculum-demo-section * { box-sizing: border-box; }
.curriculum-demo-shell {
  width: 100%;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.16), transparent 28rem),
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.12), transparent 26rem),
    rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}
.curriculum-demo-inner {
  width: 100%;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  padding: 42px clamp(24px, 4vw, 64px);
}

.curriculum-demo-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  gap: 34px;
  align-items: start;
  margin-bottom: 40px;
}
.curriculum-demo-section .eyebrow {
  color: var(--primary);
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.curriculum-demo-title {
  margin: 10px 0 18px;
  color: var(--text);
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.065em;
}
.curriculum-demo-desc {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}
.curriculum-panel {
  padding: 26px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}
.curriculum-panel label {
  display: block;
  margin-bottom: 16px;
  color: #334155;
  font-weight: 900;
}
.curriculum-panel input,
.curriculum-panel select {
  width: 100%;
  margin-top: 8px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  color: var(--text);
  font-size: 16px;
  outline: none;
}
.curriculum-panel input:focus,
.curriculum-panel select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.11);
}
.curriculum-demo-section button { font-family: inherit; }
#generateBtn {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 15px 18px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 950;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#generateBtn:hover { transform: translateY(-2px); }
#generateBtn:disabled { opacity: 0.6; cursor: wait; transform: none; }
.debug-hint { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.debug-hint a { color: var(--primary); font-weight: 900; }
.result-section,
.weeks-section { margin-top: 40px; }
.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.section-title h2,
.weeks-section h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}
#statusText { margin: 8px 0 0; color: var(--muted); }
.ai-badge {
  flex: none;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 950;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: #334155;
}
.ai-badge.idle { color: var(--muted); }
.ai-badge.loading { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.ai-badge.success { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.ai-badge.error { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.map-card {
  height: min(760px, calc(100vh - 120px));
  min-height: 620px;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(226, 232, 240, 0.96);
  background: #ffffff;
  box-shadow: 0 22px 66px rgba(15, 23, 42, 0.10);
}
.map-card:fullscreen { width: 100vw; height: 100vh; min-height: 100vh; border-radius: 0; border: 0; background: #ffffff; }
.map-card.pseudo-fullscreen { position: fixed; inset: 0; z-index: 9999; width: 100vw; height: 100vh; min-height: 100vh; border-radius: 0; border: 0; }
body:has(.pseudo-fullscreen) { overflow: hidden; }
.map-toolbar {
  min-height: 56px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.88);
  backdrop-filter: blur(10px);
}
.map-card:fullscreen .map-toolbar,
.map-card.pseudo-fullscreen .map-toolbar { min-height: 58px; padding: 10px 18px; }
.toolbar-left,
.toolbar-right { display: flex; align-items: center; gap: 8px; }
.tool-btn {
  min-width: 38px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}
.tool-btn:hover { background: #eff6ff; border-color: rgba(37, 99, 235, 0.32); color: var(--primary); }
.tool-btn.primary { color: #ffffff; background: var(--primary); border-color: var(--primary); }
.tool-btn.fullscreen { color: var(--text); background: #ffffff; border-color: var(--line); }
.tool-btn.fullscreen:hover { color: #ffffff; background: var(--secondary); border-color: var(--secondary); }
#zoomLabel { min-width: 46px; color: var(--text); font-size: 13px; font-weight: 950; text-align: right; }
.toolbar-hint { color: var(--muted); font-size: 12px; font-weight: 800; }
.map-card:fullscreen .toolbar-hint::after,
.map-card.pseudo-fullscreen .toolbar-hint::after { content: " · ESC로 종료"; }
.map-viewport {
  flex: 1;
  width: 100%;
  position: relative;
  overflow: auto;
  background:
    linear-gradient(rgba(37, 99, 235, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.06) 1px, transparent 1px),
    #fbfdff;
  background-size: 48px 48px;
}
.graph-scaler { position: relative; width: 1400px; height: 900px; }
.graph-world { position: absolute; left: 0; top: 0; width: 1400px; height: 900px; transform-origin: 0 0; }
.edge-layer { position: absolute; left: 0; top: 0; z-index: 1; overflow: visible; pointer-events: none; }
.node-layer { position: absolute; inset: 0; z-index: 2; }
.graph-node {
  position: absolute;
  border-radius: 999px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 22px;
  text-align: center;
  line-height: 1.28;
  font-size: 14px;
  font-weight: 850;
  white-space: normal;
  word-break: keep-all;
  color: var(--text);
  background: #ffffff;
  border: 1.8px solid rgba(15, 23, 42, 0.18);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}
.graph-node span { display: block; max-width: 100%; white-space: normal; overflow: visible; text-overflow: initial; }
.graph-node.root {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
  border-width: 0;
  font-size: 18px;
  font-weight: 950;
}
.graph-node.week { background: #eff6ff; border-color: rgba(37, 99, 235, 0.55); color: #1e3a8a; }
.graph-node.detail { background: #f5f3ff; border-color: rgba(124, 58, 237, 0.46); color: #4c1d95; font-size: 13.5px; font-weight: 780; line-height: 1.34; }
.graph-edge { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.main-edge { stroke: rgba(37, 99, 235, 0.62); stroke-width: 1.6; }
.detail-branch-edge { stroke: rgba(124, 58, 237, 0.42); stroke-width: 1.15; }
.arrow-main { fill: rgba(37, 99, 235, 0.64); }
.arrow-small { fill: rgba(124, 58, 237, 0.52); }
.week-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.week-card {
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}
.week-card h3 { margin: 0 0 12px; color: var(--text); }
.week-card ul { margin: 0; padding-left: 20px; color: #334155; line-height: 1.7; }
@media (max-width: 920px) {
  .curriculum-demo-section { padding: 44px 16px 16px; }
  .curriculum-demo-inner { padding: 28px; }
  .curriculum-demo-intro { grid-template-columns: 1fr; }
  .section-title { align-items: flex-start; flex-direction: column; }
  .map-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-left, .toolbar-right { flex-wrap: wrap; }
  .week-list { grid-template-columns: 1fr; }
  .map-card { height: calc(100vh - 80px); min-height: 600px; }
}
@media (max-width: 680px) {
  .curriculum-demo-inner { padding: 22px; }
  .curriculum-panel { padding: 20px; }
}

/* Pretty generation modal for curriculum demo */
.curriculum-progress-open {
  overflow: hidden;
}

.curriculum-progress-modal[hidden],
.curriculum-progress-close[hidden] {
  display: none !important;
}

.curriculum-progress-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s ease;
}

.curriculum-progress-modal.is-active {
  opacity: 1;
  pointer-events: auto;
}

.curriculum-progress-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(37, 99, 235, 0.32), transparent 28rem),
    radial-gradient(circle at 82% 20%, rgba(124, 58, 237, 0.28), transparent 30rem),
    radial-gradient(circle at 50% 92%, rgba(6, 182, 212, 0.20), transparent 26rem),
    rgba(15, 23, 42, 0.54);
  backdrop-filter: blur(18px);
}

.curriculum-progress-card {
  position: relative;
  width: min(720px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.96)),
    #ffffff;
  box-shadow: 0 34px 110px rgba(15, 23, 42, 0.28);
  transform: translateY(14px) scale(0.985);
  transition: transform 0.26s ease;
}

.curriculum-progress-modal.is-active .curriculum-progress-card {
  transform: translateY(0) scale(1);
}

.curriculum-progress-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.18), transparent);
  transform: translateX(-100%);
  animation: curriculumProgressSweep 2.6s ease-in-out infinite;
  pointer-events: none;
}

.curriculum-progress-orb {
  position: relative;
  height: 136px;
  display: grid;
  place-items: center;
  margin: 34px 34px 0;
  border-radius: 28px;
  background:
    radial-gradient(circle at center, rgba(37, 99, 235, 0.12), transparent 7.5rem),
    linear-gradient(180deg, #f8fbff, #eef6ff);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.curriculum-progress-orb::before,
.curriculum-progress-orb::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  border: 1px dashed rgba(37, 99, 235, 0.24);
  animation: curriculumOrbit 10s linear infinite;
}

.curriculum-progress-orb::before {
  width: 110px;
  height: 110px;
}

.curriculum-progress-orb::after {
  width: 78px;
  height: 78px;
  animation-duration: 7s;
  animation-direction: reverse;
}

.curriculum-progress-orb span {
  position: absolute;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 0 24px rgba(37, 99, 235, 0.38);
}

.curriculum-progress-orb span:nth-child(1) {
  width: 46px;
  height: 46px;
  animation: curriculumOrbFloat 2.2s ease-in-out infinite;
}

.curriculum-progress-orb span:nth-child(2) {
  width: 14px;
  height: 14px;
  left: calc(50% - 72px);
  top: 38px;
  animation: curriculumPulse 1.5s ease-in-out infinite;
}

.curriculum-progress-orb span:nth-child(3) {
  width: 18px;
  height: 18px;
  right: calc(50% - 86px);
  bottom: 34px;
  background: linear-gradient(135deg, #06b6d4, var(--secondary));
  animation: curriculumPulse 1.5s ease-in-out infinite 0.32s;
}

.curriculum-progress-copy {
  position: relative;
  z-index: 1;
  padding: 28px 38px 0;
  text-align: center;
}

.curriculum-progress-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.09);
  color: var(--primary);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.curriculum-progress-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.36);
  animation: curriculumPulseRing 1.4s ease-in-out infinite;
}

.curriculum-progress-copy h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.curriculum-progress-meta {
  margin: 12px 0 0;
  color: #475569;
  font-size: 14px;
  font-weight: 900;
}

.curriculum-progress-message {
  min-height: 28px;
  margin: 12px auto 0;
  max-width: 540px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.curriculum-progress-meter {
  position: relative;
  z-index: 1;
  padding: 24px 38px 0;
}

.curriculum-progress-meter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  color: #334155;
  font-size: 13px;
  font-weight: 950;
}

#curriculumProgressPercent {
  color: var(--primary);
  font-size: 26px;
  letter-spacing: -0.04em;
}

.curriculum-progress-track {
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

.curriculum-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--secondary), #06b6d4);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
  transition: width 0.42s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.curriculum-progress-steps {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 22px 38px 34px;
}

.curriculum-progress-step {
  display: grid;
  gap: 8px;
  justify-items: center;
  min-width: 0;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.84);
  color: #64748b;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.curriculum-progress-step span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
}

.curriculum-progress-step strong {
  display: block;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.curriculum-progress-step.is-active {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.42);
  background: #eff6ff;
  color: var(--primary);
}

.curriculum-progress-step.is-active span,
.curriculum-progress-step.is-done span {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.curriculum-progress-step.is-done {
  border-color: rgba(16, 185, 129, 0.36);
  background: #ecfdf5;
  color: #047857;
}

.curriculum-progress-modal[data-state="success"] .curriculum-progress-bar {
  background: linear-gradient(90deg, #10b981, #06b6d4);
}

.curriculum-progress-modal[data-state="error"] .curriculum-progress-card {
  border-color: rgba(248, 113, 113, 0.56);
}

.curriculum-progress-modal[data-state="error"] .curriculum-progress-bar {
  background: linear-gradient(90deg, #ef4444, #f97316);
}

.curriculum-progress-close {
  position: relative;
  z-index: 1;
  display: block;
  width: calc(100% - 76px);
  margin: -12px 38px 34px;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  color: #ffffff;
  background: var(--text);
  font-size: 15px;
  font-weight: 950;
  cursor: pointer;
}

@keyframes curriculumProgressSweep {
  0% { transform: translateX(-100%); }
  48%, 100% { transform: translateX(100%); }
}

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

@keyframes curriculumOrbFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes curriculumPulse {
  0%, 100% { transform: scale(1); opacity: 0.92; }
  50% { transform: scale(1.24); opacity: 0.64; }
}

@keyframes curriculumPulseRing {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.34); }
  100% { box-shadow: 0 0 0 12px rgba(37, 99, 235, 0); }
}

@media (max-width: 720px) {
  .curriculum-progress-modal { padding: 16px; }
  .curriculum-progress-orb { height: 108px; margin: 22px 22px 0; }
  .curriculum-progress-copy { padding: 22px 24px 0; }
  .curriculum-progress-meter { padding: 20px 24px 0; }
  .curriculum-progress-steps {
    grid-template-columns: 1fr;
    padding: 18px 24px 28px;
  }
  .curriculum-progress-step {
    grid-template-columns: 34px 1fr;
    justify-items: start;
    align-items: center;
    text-align: left;
  }
  .curriculum-progress-close {
    width: calc(100% - 48px);
    margin: -8px 24px 28px;
  }
}
