@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");
.attractor-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #000;
  z-index: 1000;
}

#attractor-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.touch-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.3s ease;
}
.touch-overlay:hover {
  background: rgba(0, 0, 0, 0.4);
}

.touch-prompt {
  text-align: center;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  animation: pulse 2s ease-in-out infinite;
}
.touch-prompt h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  margin-top: 0;
  font-family: "Inter", sans-serif;
  letter-spacing: -0.02em;
}
.touch-prompt p {
  font-size: 1.6rem;
  margin: 0;
  opacity: 0.9;
  font-weight: 400;
  font-family: "Inter", sans-serif;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }
  100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}
html,
body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f8f9fa;
}

.hide-cursor {
  cursor: none;
}

button,
.button {
  min-height: 60px;
  font-size: 1.2rem;
  padding: 15px 30px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
button:hover,
.button:hover {
  transform: scale(1.02);
}
button:active,
.button:active {
  transform: scale(0.98);
}

.quiz-container {
  min-height: 100vh;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #0ea5e9 100%);
  color: white;
  position: relative;
}
@media (max-width: 768px) {
  .quiz-container {
    padding: 2rem 1rem;
  }
}

.quiz-header {
  text-align: center;
  margin-bottom: 3rem;
}
.quiz-header .progress-bar {
  width: 100%;
  max-width: 400px;
  height: 6px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  margin: 0 auto 1rem;
  overflow: hidden;
}
.quiz-header .progress-bar .progress-fill {
  height: 100%;
  background: #4caf50;
  border-radius: 3px;
  transition: width 0.5s ease;
}
.quiz-header .question-number {
  font-size: 1.2rem;
  font-weight: 500;
  opacity: 0.9;
  margin: 0;
}

.question-section {
  max-width: 900px;
  margin: 0 auto;
}
.question-section .question-text {
  font-size: 2.8rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1.5rem;
  line-height: 1.3;
  font-family: "Inter", sans-serif;
  letter-spacing: -0.01em;
}
@media (max-width: 768px) {
  .question-section .question-text {
    font-size: 2.2rem;
    margin-bottom: 1rem;
  }
}

.question-instruction {
  font-size: 1.4rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: 2.5rem;
  line-height: 1.4;
  font-family: "Inter", sans-serif;
  opacity: 0.9;
}
@media (max-width: 768px) {
  .question-instruction {
    font-size: 1.2rem;
    margin-bottom: 2rem;
  }
}

.drag-drop-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  margin-top: 2rem;
}
@media (min-width: 768px) {
  .drag-drop-area {
    flex-direction: row;
    justify-content: space-around;
    align-items: flex-start;
  }
}

.jar-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  transition: all 0.3s ease;
}
.jar-container.drag-over {
  transform: scale(1.05);
}
.jar-container.drag-active {
  transform: scale(1.1);
  filter: drop-shadow(0 0 20px rgba(76, 175, 80, 0.6));
}

.jar {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.jar-opening {
  width: 120px;
  height: 20px;
  background: linear-gradient(to bottom, #ddd, #bbb);
  border-radius: 60px 60px 10px 10px;
  border: 3px solid #999;
  z-index: 2;
  position: relative;
}

.jar-body {
  width: 180px;
  height: 280px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(240, 240, 240, 0.7));
  border: 4px solid #999;
  border-radius: 20px 20px 30px 30px;
  margin-top: -10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  box-sizing: border-box;
  position: relative;
  backdrop-filter: blur(10px);
  box-shadow: inset 5px 5px 15px rgba(255, 255, 255, 0.5), inset -5px -5px 15px rgba(0, 0, 0, 0.1), 0 10px 30px rgba(0, 0, 0, 0.2);
}

.jar-contents {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 200px;
  justify-content: flex-end;
}

.jar-ingredient {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 15px;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
  border: 1px solid rgba(0, 0, 0, 0.1);
}
.jar-ingredient.added {
  opacity: 1;
  transform: translateY(0);
}
.jar-ingredient .jar-ingredient-icon {
  font-size: 1.2rem;
}
.jar-ingredient .jar-ingredient-name {
  font-weight: 500;
  color: #333;
}

.jar-label {
  margin-top: 15px;
  font-weight: bold;
  font-size: 1.2rem;
  color: #333;
  text-align: center;
}

.ingredients-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 300px;
}

.ingredients-title {
  font-size: 1.3rem;
  font-weight: bold;
  color: white;
  margin: 0;
  text-align: center;
}

.ingredients-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  width: 100%;
}

.ingredient-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  padding: 1.5rem 1rem;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  cursor: grab;
  transition: all 0.3s ease;
  user-select: none;
  min-height: 110px;
  justify-content: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.ingredient-item:hover {
  background: rgb(255, 255, 255);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}
.ingredient-item:active, .ingredient-item.dragging {
  cursor: grabbing;
  transform: scale(1.1) rotate(5deg);
  opacity: 0.8;
  z-index: 1000;
}
.ingredient-item.dropped {
  opacity: 0.3;
  transform: scale(0.9);
  cursor: not-allowed;
}
.ingredient-item.dropped:hover {
  transform: scale(0.9);
  box-shadow: none;
}

.ingredient-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.ingredient-name {
  font-weight: 600;
  color: #1f2937;
  text-align: center;
  font-size: 1.1rem;
  font-family: "Inter", sans-serif;
}

.drag-progress {
  text-align: center;
  color: white;
  margin: 2rem 0;
}
.drag-progress p {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.progress-counter {
  font-size: 1.5rem;
  font-weight: bold;
  color: #4caf50;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.completion-section {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  pointer-events: none;
}

.success-feedback {
  background: white;
  color: #333;
  padding: 2rem;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  min-width: 400px;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8);
  transition: all 0.4s ease;
  pointer-events: none;
}
.success-feedback.show {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  pointer-events: auto;
}
.success-feedback .feedback-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}
.success-feedback h3 {
  margin: 0 0 1rem 0;
  font-size: 2rem;
  color: #4caf50;
}
.success-feedback p {
  margin: 0 0 2rem 0;
  font-size: 1.2rem;
  line-height: 1.4;
}

.done-btn {
  background: linear-gradient(135deg, #4caf50, #45a049);
  color: white;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}
.done-btn:hover {
  background: linear-gradient(135deg, #45a049, #3d8b40);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
.done-btn:active {
  transform: translateY(0);
}

.answers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .answers-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.answer-option {
  display: flex;
  align-items: center;
  padding: 1.8rem 2.5rem;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  color: white;
  font-size: 1.4rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  min-height: 85px;
  font-family: "Inter", sans-serif;
  backdrop-filter: blur(10px);
}
.answer-option:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.answer-option:active {
  transform: translateY(0);
}
.answer-option.selected-correct {
  background: rgba(76, 175, 80, 0.3);
  border-color: #4caf50;
  animation: correctPulse 0.6s ease-in-out;
}
.answer-option.selected-incorrect {
  background: rgba(244, 67, 54, 0.3);
  border-color: #f44336;
  animation: incorrectShake 0.6s ease-in-out;
}
.answer-option .answer-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font-weight: bold;
  margin-right: 1rem;
  flex-shrink: 0;
  pointer-events: none;
}
.answer-option .answer-text {
  flex: 1;
  pointer-events: none;
}

.feedback-section {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  pointer-events: none;
}
.feedback-section .incorrect-feedback,
.feedback-section .correct-feedback {
  background: white;
  color: #333;
  padding: 2rem;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  min-width: 300px;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8);
  transition: all 0.3s ease;
  pointer-events: none;
}
.feedback-section .incorrect-feedback.show,
.feedback-section .correct-feedback.show {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  pointer-events: auto;
}
.feedback-section .incorrect-feedback .feedback-icon,
.feedback-section .correct-feedback .feedback-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.feedback-section .incorrect-feedback h3,
.feedback-section .correct-feedback h3 {
  margin: 0 0 1rem 0;
  font-size: 1.8rem;
}
.feedback-section .incorrect-feedback p,
.feedback-section .correct-feedback p {
  margin: 0 0 1.5rem 0;
  font-size: 1.1rem;
  opacity: 0.8;
}
.feedback-section .incorrect-feedback .feedback-icon {
  animation: incorrectBounce 0.6s ease-in-out;
}
.feedback-section .correct-feedback .feedback-icon {
  animation: correctBounce 0.8s ease-in-out;
}

.next-question-btn {
  background: linear-gradient(45deg, #4caf50, #45a049);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 25px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}
.next-question-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}

@keyframes correctPulse {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}
@keyframes incorrectShake {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-10px);
  }
  60% {
    transform: translateX(-10px);
  }
  40% {
    transform: translateX(10px);
  }
  80% {
    transform: translateX(10px);
  }
}
@keyframes correctBounce {
  0% {
    transform: translateY(0);
  }
  20% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(0);
  }
  80% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}
@keyframes incorrectBounce {
  0% {
    transform: rotate(0deg);
  }
  20% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(0deg);
  }
  80% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(0deg);
  }
  40% {
    transform: rotate(-5deg);
  }
  60% {
    transform: rotate(5deg);
  }
}
.flip-tiles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2rem;
  max-width: 900px;
  width: 100%;
  margin: 2rem auto;
  padding: 0 2rem;
  height: 60vh;
}

.flip-tile {
  perspective: 1000px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 1;
}
.flip-tile:hover {
  transform: scale(1.02);
}
.flip-tile.tile-tapped {
  transform: scale(0.98);
  filter: brightness(1.1);
}
.flip-tile.active-tile {
  z-index: 10;
}

.tile-checkmark {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #28a745;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  z-index: 5;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}
.tile-checkmark.show {
  opacity: 1;
  transform: scale(1);
}

.flip-tile-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  min-height: 200px;
}
.flip-tile.flipped .flip-tile-inner {
  transform: rotateY(180deg);
}

.flip-tile-front,
.flip-tile-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.flip-tile-front {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #06b6d4 100%);
  color: white;
}
.flip-tile-front .tile-word {
  font-size: 2.2rem;
  font-weight: 600;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  padding: 1.5rem;
  text-align: center;
  line-height: 1.3;
  font-family: "Inter", sans-serif;
  letter-spacing: -0.01em;
}

.flip-tile-back {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  color: white;
  transform: rotateY(180deg);
  padding: 2rem;
  backdrop-filter: blur(10px);
}
.flip-tile-back .tile-content {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: left;
}
.flip-tile-back .tile-content h3 {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0 0 1.2rem 0;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  font-family: "Inter", sans-serif;
  letter-spacing: -0.01em;
}
.flip-tile-back .tile-content p {
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  overflow-y: auto;
  flex-grow: 1;
  font-family: "Inter", sans-serif;
}

.completion-celebration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.completion-celebration.show {
  opacity: 1;
  transform: scale(1);
}
.completion-celebration .celebration-content {
  text-align: center;
  color: white;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #06b6d4 100%);
  padding: 3.5rem 4.5rem;
  border-radius: 24px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
}
.completion-celebration .celebration-content h2 {
  font-size: 3.2rem;
  margin: 0 0 1.2rem 0;
  animation: celebration-bounce 1s ease-out;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.completion-celebration .celebration-content p {
  font-size: 1.6rem;
  margin: 0 0 2rem 0;
  opacity: 0.9;
  font-family: "Inter", sans-serif;
  font-weight: 400;
}
.completion-celebration .celebration-content .celebration-emojis {
  display: flex;
  justify-content: center;
  gap: 1rem;
}
.completion-celebration .celebration-content .celebration-emojis span {
  font-size: 3rem;
  animation: emoji-dance 2s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.2s);
}

@keyframes celebration-bounce {
  0% {
    transform: translateY(0);
  }
  20% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(0);
  }
  80% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-30px);
  }
  60% {
    transform: translateY(-15px);
  }
}
@keyframes emoji-dance {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-10px) rotate(-10deg);
  }
  50% {
    transform: translateY(-5px) rotate(0deg);
  }
  75% {
    transform: translateY(-10px) rotate(10deg);
  }
}
.done-button {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  color: white;
  border: none;
  padding: 1.5rem 3rem;
  font-size: 1.5rem;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(238, 90, 36, 0.4);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2rem;
}
.done-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 35px rgba(238, 90, 36, 0.6);
}
.done-button:active {
  transform: translateY(0) scale(0.98);
}
.done-button.completing {
  background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
  animation: completion-pulse 0.5s ease-out;
}

@keyframes completion-pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}
@media (max-width: 768px) {
  .flip-tiles-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 1.5rem;
    height: 70vh;
    padding: 0 1rem;
  }
  .flip-tile-front .tile-word {
    font-size: 1.5rem;
  }
  .flip-tile-back .tile-content {
    padding: 1rem;
  }
  .flip-tile-back .tile-content h3 {
    font-size: 1.2rem;
  }
  .flip-tile-back .tile-content p {
    font-size: 0.85rem;
  }
}
/* Secret analytics link (invisible top-right hotzone) */
.secret-analytics-link {
  position: fixed;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  display: block;
  background: transparent;
  opacity: 0;
  z-index: 10000;
  pointer-events: auto;
  user-select: none;
}

.secret-analytics-link:focus,
.secret-analytics-link:active {
  opacity: 0.15;
  background: rgba(0, 0, 0, 0.05);
}
