.reveal .slides section {
  text-align: left;
}

.reveal .slides section h1,
.reveal .slides section h2,
.reveal .slides section h3 {
  text-align: center;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

.reveal input,
.reveal button,
.reveal select,
.reveal textarea,
.reveal label,
.reveal summary {
  touch-action: manipulation;
}

.reveal input[type="range"] {
  touch-action: pan-x;
}

.reveal {
  font-size: 24px;
  color: #3f3f3f;
}

.reveal,
.reveal .slides,
.reveal .slide-background,
.reveal .slide-background-content {
  background: rgb(247, 247, 247);
}

.reveal h1 {
  font-size: 1.8em;
}

.reveal h2 {
  font-size: 1.4em;
}

.reveal h3 {
  font-size: 1.15em;
}

.back-link-row {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  margin-top: 12px;
}

.back-link {
  display: inline-block;
  margin: 6px auto 0;
  font-size: 0.95em;
  letter-spacing: 0.03em;
}

.back-link {
  color: #1f1f1f;
  text-decoration: none;
}

.definition-box {
  border: 2px solid #222222;
  border-radius: 8px;
  padding: 16px 20px;
  background: rgb(247, 247, 247);
}

.button-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 12px auto 8px;
}

.slide-btn {
  display: block;
  margin: 0;
  padding: 10px 18px;
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 0 #1b4c61;
  background: #2e6f8e;
  color: #ffffff;
  font: inherit;
  cursor: pointer;
}

.slide-btn:hover {
  background: #3a7f9f;
}

.slide-btn:active {
  transform: translateY(4px);
  box-shadow: 0 0px 0 #1b4c61;
}

.variable-classifier {
  margin-top: 12px;
  position: relative;
}

.classifier-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  grid-template-rows: minmax(220px, auto) minmax(220px, auto);
  grid-template-areas:
    "discreta continua qualitativa"
    "pool pool pool";
  --zone-height: 220px;
  --pool-height: 180px;
  --item-width: 200px;
  --item-height: 48px;
  gap: 12px;
  align-items: start;
}

.classifier-pool,
.drop-zone {
  border: 2px dashed #9aa9b3;
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
  min-height: 220px;
  height: var(--zone-height);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.classifier-pool {
  grid-area: pool;
  min-height: var(--pool-height);
  height: var(--pool-height);
}

.drop-zone[data-category="discreta"] {
  grid-area: discreta;
}

.drop-zone[data-category="continua"] {
  grid-area: continua;
}

.drop-zone[data-category="qualitativa"] {
  grid-area: qualitativa;
}

.classifier-pool h4,
.drop-zone h4 {
  margin-top: 0;
  margin-bottom: 8px;
  text-align: center;
}

.variable-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, var(--item-width));
  column-gap: 32px;
  row-gap: 0px;
  min-height: 140px;
  max-height: calc(var(--pool-height) - 56px);
  overflow-y: scroll;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #93a3ad #eef2f4;
  padding-right: 4px;
  justify-content: center;
  justify-items: center;
}

.drop-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 140px;
  max-height: calc(var(--zone-height) - 40px);
  overflow-y: scroll;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #93a3ad #eef2f4;
  padding-right: 4px;
  align-items: center;
}

.variable-list::-webkit-scrollbar,
.drop-list::-webkit-scrollbar {
  width: 10px;
}

.variable-list::-webkit-scrollbar-track,
.drop-list::-webkit-scrollbar-track {
  background: #eef2f4;
  border-radius: 999px;
}

.variable-list::-webkit-scrollbar-thumb,
.drop-list::-webkit-scrollbar-thumb {
  background: #93a3ad;
  border-radius: 999px;
  border: 2px solid #eef2f4;
}

.drop-zone .variable-item {
  margin: 0 auto;
  flex: 0 0 auto;
}

.variable-item {
  padding: 8px 10px;
  border-radius: 10px;
  background: #2e6f8e;
  color: #ffffff;
  cursor: grab;
  user-select: none;
  font-size: 0.85em;
  text-align: center;
  border: none;
  width: var(--item-width);
  max-width: 100%;
  height: var(--item-height);
  overflow: hidden;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.variable-item.selected {
  outline: 2px solid #1b4c61;
  outline-offset: 2px;
}

.variable-item.dragging {
  opacity: 0.6;
}

.variable-item.correct {
  background: #2c8b5f;
}

.variable-item.incorrect {
  background: #c24b4b;
}

.drop-target.drop-over {
  border-color: #2e6f8e;
  box-shadow: 0 0 0 2px rgba(46, 111, 142, 0.2);
}

.classifier-feedback {
  text-align: center;
  font-weight: 600;
  min-height: 28px;
}

.classifier-feedback.success {
  color: #1d6f45;
}

.classifier-feedback.error {
  color: #a32121;
}

.fireworks {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(680px, 95%);
  height: 140px;
  margin: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.fireworks.active {
  opacity: 1;
}

.firework {
  position: absolute;
  width: 0;
  height: 0;
}

.firework .spark {
  position: absolute;
  width: 4px;
  height: 16px;
  background: var(--color);
  border-radius: 2px;
  transform-origin: 50% 100%;
  animation: spark 1.1s ease-out forwards;
  animation-delay: var(--delay);
}

@keyframes spark {
  0% {
    transform: rotate(var(--angle)) translateY(0);
    opacity: 1;
  }
  100% {
    transform: rotate(var(--angle)) translateY(-60px);
    opacity: 0;
  }
}

@media (max-width: 720px) {
  .classifier-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    grid-template-areas:
      "discreta"
      "continua"
      "qualitativa"
      "pool";
    --zone-height: 190px;
    --pool-height: 170px;
  }

  .variable-item {
    font-size: 0.9em;
  }
}
