/* Image Pair Quiz styles matching site theme */
.image-quiz-root {
  width: 100%;
  max-width: 100%;
}
.image-quiz {
  position: relative;
  margin: 0;
  padding: 1.4rem;
  background: transparent;
  border: none;
  border-radius: 28px;
}
.iq-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}
.iq-title {
  margin: 0;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: var(--space-indigo);
}
.iq-subtitle {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
}
.iq-progress {
  color: var(--accent-strong);
  font-weight: 700;
  min-width: 4rem;
  text-align: right;
}
.iq-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}
.iq-choice {
  position: relative;
  border-radius: 22px;
  border: 1px solid transparent;
  background: transparent;
  aspect-ratio: 1 / 1;
  overflow: visible;
  cursor: pointer;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    filter 0.22s ease;
  box-shadow: 0 16px 30px rgba(11, 29, 52, 0.08);
  padding: 0;
  transform: translateZ(0);
  will-change: transform;
}
.iq-choice::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 16px;
  background: radial-gradient(
    circle at top left,
    rgba(111, 156, 235, 0.14),
    transparent 42%
  );
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}
.iq-choice::after {
  content: "";
  position: absolute;
  inset: -10px;
  padding: 3px;
  border-radius: 26px;
  background: linear-gradient(
    90deg,
    var(--steel-purple),
    var(--steel-blue),
    var(--cornflower-blue),
    var(--dusk-blue),
    var(--steel-purple)
  );
  background-size: 300%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
}
.iq-choice:hover {
  transform: translateY(-2px) scale(1.007);
  box-shadow: 0 22px 40px rgba(11, 29, 52, 0.14);
}
.iq-choice:hover::before {
  opacity: 1;
}
.iq-choice:hover::after {
  opacity: 0.85;
  animation: animatedGradientBorder 4s linear infinite;
}
.iq-choice:active {
  transform: translateY(-1px) scale(0.98);
}
.iq-choice img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 22px;
  transition: transform 0.35s ease;
  backface-visibility: hidden;
  will-change: transform;
}
.iq-choice:hover img {
  transform: scale(1.02);
}
.iq-choice.correct {
  border-width: 2px;
  border-color: rgba(25, 135, 84, 0.9);
  border-radius: 23.5px;
  box-shadow: 0 0 0 5px rgba(25, 135, 84, 0.12);
}
.iq-choice.wrong {
  border-width: 2px;
  border-color: rgba(220, 53, 69, 0.9);
  border-radius: 23.5px;
  box-shadow: 0 0 0 5px rgba(220, 53, 69, 0.12);
}
.iq-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.iq-message {
  min-height: 24px;
  margin: 0;
  color: var(--text);
  font-weight: 600;
  text-align: left;
}
.iq-message.correct {
  color: rgba(25, 135, 84, 0.9);
}
.iq-message.wrong {
  color: rgba(220, 53, 69, 0.9);
}
.iq-restart {
  margin-top: 0.5rem;
}
@keyframes animatedGradientBorder {
  0% {
    background-position: 0%;
  }
  100% {
    background-position: 300%;
  }
}
@media (max-width: 840px) {
  .iq-pair {
    grid-template-columns: 1fr;
  }
  .iq-choice {
    min-height: 220px;
  }
}
@media (max-width: 560px) {
  .image-quiz {
    padding: 1.25rem;
  }
  .iq-header {
    flex-direction: column;
    align-items: stretch;
  }
  .iq-progress {
    text-align: left;
  }
}
