/* Estilos da demo interativa de Diffusion Models.
   Reusa as variáveis de tema de ../style.css. */

.demo-hero {
  padding: 3.2rem 1rem 1.6rem;
  text-align: center;
}
.demo-hero .course-desc { max-width: 760px; margin: 0 auto; }

.demo-section { padding: 1.6rem 1rem 1rem; }
.demo-section .container { max-width: 1060px; margin: 0 auto; }

.sub-title {
  color: var(--fg);
  font-size: 1.05rem;
  margin: 1.6rem 0 .4rem;
}

.demo-text {
  color: var(--fg);
  font-size: .95rem;
  line-height: 1.55;
  max-width: 860px;
  margin: .4rem 0 .9rem;
}
.demo-text.small { font-size: .84rem; color: var(--comment); }

.formula {
  font-family: "STIX Two Math", "Cambria Math", Georgia, serif;
  color: var(--cyan);
  white-space: nowrap;
}
.formula-lines { white-space: normal; line-height: 1.8; }
.demo-text .formula { font-size: .98em; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .9rem 1rem 1rem;
  margin-bottom: 1.4rem;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1.1rem;
  margin-bottom: .7rem;
}

.tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.tab {
  background: transparent;
  color: var(--comment);
  border: none;
  padding: .35rem .8rem;
  font-size: .85rem;
  cursor: pointer;
}
.tab.active { background: var(--purple); color: var(--bg); font-weight: 600; }

.btn-ctl {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .35rem .8rem;
  font-size: .85rem;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.btn-ctl:hover:not(:disabled) { border-color: var(--cyan); color: var(--cyan); }
.btn-ctl:disabled { opacity: .45; cursor: not-allowed; }
.btn-ctl.primary { border-color: var(--purple); }

.slider-label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--comment);
  font-size: .85rem;
}
.slider-label input[type="range"] { accent-color: var(--purple); width: 160px; }
.slider-label select {
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .25rem .4rem;
  font-size: .85rem;
}

.readout { color: var(--comment); font-size: .85rem; }

.canvas-row {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  align-items: stretch;
}
.canvas-row.hidden { display: none; }

.canvas-box {
  flex: 1 1 280px;
  min-width: 240px;
  display: flex;
  flex-direction: column;
}
.canvas-box.wide { flex: 2 1 420px; }
.canvas-box.square { flex: 0 1 420px; }
.canvas-box canvas {
  width: 100%;
  height: 240px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  touch-action: none;
}
.canvas-box.square canvas { height: 380px; }
.canvas-box.tall canvas { height: 320px; }
.canvas-box.img-box { flex: 0 1 580px; }
.canvas-box.img-box canvas { height: 256px; image-rendering: auto; }

.canvas-caption {
  color: var(--comment);
  font-size: .78rem;
  margin: 0 0 .3rem;
}

@media (max-width: 700px) {
  .canvas-box.wide, .canvas-box.square { flex-basis: 100%; }
}
