.discovery-intro {
  background-color: var(--secondary-color);
  color: white;
  padding: 15px;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgb(0 0 0 / 0.15);
  text-align: center;
  font-size: 18px;
  max-width: 800px;
  margin: 20px auto;
}
.lab-selector {
  text-align: center;
  margin: 30px auto;
  width: 90%;
  max-width: 800px;
}
.lab-item {
  background-color: white;
  border-radius: 15px;
  padding: 20px 10px;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 5px 15px rgb(0 0 0 / 0.1);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  border: 2px solid var(--neutral-medium);
  display: inline-block;
  margin: 10px;
}
.lab-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgb(255 255 255 / 0.1) 0%, rgb(255 255 255 / 0) 100%);
  z-index: 1;
}
.lab-item:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 10px 25px rgb(0 0 0 / 0.15);
  border-color: var(--primary-color);
}
.lab-icon {
  font-size: 36px;
  margin-bottom: 10px;
  position: relative;
  z-index: 2;
  animation: float 3s ease-in-out infinite;
}
.lab-name {
  font-weight: bold;
  font-size: 18px;
  color: var(--text-color);
  position: relative;
  z-index: 2;
}
@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
  100% {
    transform: translateY(0);
  }
}
.lab-experiment {
  background-color: white;
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 8px 16px rgb(0 0 0 / 0.1);
  margin: 20px 0;
  position: relative;
}
.experiment-intro {
  text-align: center;
  margin-bottom: 20px;
}
.experiment-description {
  font-size: 18px;
  color: var(--primary-dark);
  max-width: 700px;
  margin: 0 auto;
}
.multiplication-carousel {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  padding: 15px 0;
  margin: 20px 0;
}
.multiplication-carousel::-webkit-scrollbar {
  height: 8px;
}
.multiplication-carousel::-webkit-scrollbar-track {
  background: var(--neutral-light);
  border-radius: 10px;
}
.multiplication-carousel::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 10px;
}
.carousel-item {
  width: 45%;
  max-width: 200px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.equation-card {
  background: linear-gradient(135deg, var(--neutral-light) 0%, white 100%);
  border: 2px solid var(--primary-color);
  padding: 20px;
  min-width: 120px;
  text-align: center;
}
.equation-card:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 8px 16px rgb(0 0 0 / 0.15);
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}
.equation-card:hover .equation-display {
  color: white;
}
.equation-display {
  font-size: 20px;
  font-weight: bold;
  color: var(--text-color);
  transition: color 0.3s;
}
.animation-area {
  margin: 30px 0;
  background-color: #f9f9f9;
  border-radius: 15px;
  padding: 20px;
  box-shadow: inset 0 0 10px rgb(0 0 0 / 0.1);
  text-align: center;
  min-height: 200px;
}
.animation-title {
  color: var(--neutral-dark);
  margin-bottom: 15px;
  font-size: 18px;
}
.animation-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 150px;
}
.animated-equation {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.5s,
    transform 0.5s;
}
.animated-equation.animate {
  opacity: 1;
  transform: translateY(0);
}
.animation-step {
  padding: 20px;
  border-radius: 15px;
  background-color: white;
  box-shadow: 0 5px 15px rgb(0 0 0 / 0.1);
  max-width: 600px;
  margin: 0 auto;
  opacity: 0;
  transform: scale(0.8);
  transition:
    opacity 0.5s 0.2s,
    transform 0.5s 0.2s;
}
.animation-step.animate {
  opacity: 1;
  transform: scale(1);
}
.animation-text {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--primary-color);
}
.animation-objects {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin: 20px 0;
}
.object-group {
  display: flex;
  border: 2px dashed var(--primary-color);
  padding: 10px;
  border-radius: 10px;
  background-color: rgb(255 255 255 / 0.1);
}
.object {
  margin: 0 3px;
  font-size: 24px;
}
.animation-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin: 15px 0;
}
.diagram-row {
  display: flex;
  gap: 10px;
}
.diagram-cell {
  width: 20px;
  height: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  color: var(--primary-color);
}
.animation-result {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color);
  margin-top: 20px;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.5s 0.7s,
    transform 0.5s 0.7s;
}
.animation-result.animate {
  opacity: 1;
  transform: translateY(0);
}
.mnemonic-card {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
  border-radius: 15px;
  padding: 20px;
  margin: 30px 0;
  color: white;
  position: relative;
  box-shadow: 0 6px 12px rgb(0 0 0 / 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mnemonic-card h3 {
  color: white;
  margin-bottom: 20px;
}
.mnemonic-character {
  font-size: 48px;
  margin-bottom: 15px;
}
.mnemonic-card p {
  font-size: 18px;
  line-height: 1.6;
  max-width: 600px;
  text-align: center;
}
.visual-exploration {
  margin: 30px 0;
  text-align: center;
}
.visual-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 20px;
  margin: 20px 0;
}
.visual-card {
  padding: 20px;
  transition:
    all 0.3s,
    border-color 0.3s,
    box-shadow 0.3s;
  border: 3px solid transparent;
}
.visual-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 20px rgb(0 0 0 / 0.15);
}
.visual-card.highlighted,
.pattern-card.highlighted {
  border-color: var(--accent-color);
  box-shadow: 0 8px 20px rgb(243 156 18 / 0.3);
  transform: scale(1.03);
}
.visual-equation {
  font-weight: bold;
  font-size: 20px;
  margin-bottom: 15px;
}
.visual-objects {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.pattern-card {
  transition:
    all 0.3s,
    border-color 0.3s,
    box-shadow 0.3s;
  text-align: center;
  display: inline-block;
  margin: 10px;
  border: 3px solid transparent;
}
.pattern-card:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 6px 12px rgb(0 0 0 / 0.15);
}
.pattern-equation {
  font-size: 16px;
  margin-bottom: 10px;
}
.pattern-visualization {
  border-radius: 10px;
  padding: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.pattern-result {
  font-size: 24px;
  font-weight: bold;
}
.optional-interaction {
  background-color: #f9f9f9;
  border-radius: 15px;
  padding: 25px;
  margin: 30px 0;
  box-shadow: 0 5px 15px rgb(0 0 0 / 0.1);
  text-align: center;
}
.interaction-instructions {
  background-color: var(--accent-color);
  background-image: linear-gradient(45deg, var(--accent-color), var(--accent-dark));
  border-radius: 15px;
  padding: 15px;
  margin: 15px 0;
  font-size: 16px;
  color: white;
  border: 2px solid transparent;
  box-shadow: 0 4px 8px rgb(0 0 0 / 0.1);
  text-align: center;
}
.theme-dark .interaction-instructions {
  background-color: #3498db;
  background-image: linear-gradient(45deg, #3498db, #2980b9);
  color: white;
  border: none;
}
.interaction-instructions strong {
  font-weight: bold;
  font-size: 18px;
  display: block;
  margin-bottom: 8px;
}
#drag-area {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
}
.drag-item {
  background-color: var(--primary-color);
  background-image: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 15px;
  border-radius: 50%;
  cursor: move;
  user-select: none;
  font-size: 20px;
  font-weight: bold;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgb(0 0 0 / 0.2);
  transition: all 0.3s;
  border: 2px solid rgb(255 255 255 / 0.3);
}
.drag-item:hover {
  transform: translateY(-5px) rotate(5deg);
  box-shadow: 0 6px 12px rgb(0 0 0 / 0.3);
}
.dragging {
  opacity: 0.9;
  background-color: var(--accent-color);
  background-image: linear-gradient(45deg, var(--accent-color), var(--accent-dark));
  transform: scale(1.2) rotate(-5deg);
  z-index: 10;
}
.lab-dropzone {
  position: relative;
  min-height: 100px;
  padding: 25px;
  background-color: var(--neutral-light);
  border: 3px dashed var(--neutral-medium);
  border-radius: 20px;
  margin: 15px auto;
  max-width: 400px;
  font-size: 18px;
  text-align: center;
  transition: all 0.3s;
  box-shadow: inset 0 0 10px rgb(0 0 0 / 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.dropzone-content {
  margin-bottom: 15px;
  font-weight: bold;
  font-size: 22px;
}
.dropzone-flask {
  font-size: 36px;
  transition: all 0.5s;
}
.dropzone-flask.react {
  animation:
    shake 0.5s,
    glow 1.5s;
}
@keyframes shake {
  0% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-5deg);
  }
  50% {
    transform: rotate(5deg);
  }
  75% {
    transform: rotate(-5deg);
  }
  100% {
    transform: rotate(0deg);
  }
}
@keyframes glow {
  0% {
    text-shadow: 0 0 5px rgb(255 255 0 / 0.5);
  }
  50% {
    text-shadow:
      0 0 20px rgb(255 255 0 / 0.8),
      0 0 30px rgb(255 200 0 / 0.6);
  }
  100% {
    text-shadow: 0 0 5px rgb(255 255 0 / 0.5);
  }
}
.lab-dropzone:hover,
.lab-dropzone.drag-over {
  background-color: #d6eaf8;
  border-color: var(--primary-color);
  transform: scale(1.03);
  box-shadow:
    inset 0 0 15px rgb(0 0 0 / 0.1),
    0 6px 12px rgb(0 0 0 / 0.1);
}
.lab-dropzone.show-result {
  background-color: #eafaf1;
  border-color: var(--secondary-color);
  color: var(--secondary-dark);
  animation: pop 0.7s;
  box-shadow: 0 8px 16px rgb(0 0 0 / 0.15);
}
@keyframes pop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}
.reset-btn {
  display: block;
  margin: 15px auto 0;
  background-color: #4caf50;
  color: white;
  padding: 10px 15px;
  font-size: 16px;
  border-radius: 15px;
}
.voice-control {
  margin: 20px 0;
  text-align: center;
}
@media (max-width: 768px) {
  .visual-grid,
  .patterns-grid {
    grid-template-columns: 1fr 1fr;
  }
  .animation-step {
    padding: 15px;
  }
  .lab-selector {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}
@media (max-width: 480px) {
  .visual-grid,
  .patterns-grid {
    grid-template-columns: 1fr;
  }
  .lab-selector {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
  .equation-card {
    min-width: 100px;
    padding: 15px;
  }
}
.dropzone-content {
  font-size: 18px;
}
.return-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 1001;
  background-color: var(--primary-color);
  color: var(--text-color);
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 16px;
  box-shadow: 0 4px 8px rgb(0 0 0 / 0.1);
  transition: all 0.3s;
}
#game #back-btn.discovery-return-btn {
  position: absolute;
  top: 20px;
  left: 20px;
}
.discovery-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
}
.number-line-container {
  position: relative;
  margin: 30px auto;
  padding: 20px 20px 40px 20px;
  background-color: #f8f9fa;
  border-radius: 10px;
  box-shadow: inset 0 1px 3px rgb(0 0 0 / 0.1);
  max-width: 95%;
}
.number-line-container h4 {
  text-align: center;
  margin-bottom: 25px;
  color: var(--primary-dark);
}
.number-line {
  position: relative;
  width: 90%;
  margin: 50px auto 10px;
  background-color: var(--neutral-medium);
  border-radius: 2px;
  height: 4px;
}
.tick {
  position: absolute;
  bottom: -2px;
  width: 2px;
  height: 8px;
  background-color: var(--neutral-dark);
  transform: translateX(-1px);
}
.tick .label {
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--text-color);
  white-space: nowrap;
}
.arc {
  position: absolute;
  bottom: 2px;
  border: 2px solid var(--primary-color);
  border-top-left-radius: 100px;
  border-top-right-radius: 100px;
  border-bottom: none;
  box-sizing: border-box;
  transform-origin: bottom center;
}
.arc-label {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--primary-dark);
  background-color: white;
  padding: 0 3px;
  white-space: nowrap;
}
.visual-separator {
  border: none;
  border-top: 1px dashed var(--neutral-medium);
  margin: 30px 0;
}
@media (max-width: 768px) {
  .number-line {
    width: 95%;
  }
  .tick .label {
    font-size: 10px;
    bottom: -20px;
  }
  .arc-label {
    font-size: 9px;
    top: -15px;
  }
}
