.thumbnail-section {
  margin-bottom: 1rem;
}
.thumbnail-strip {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.5rem 0.25rem;
}
.thumb-card {
  border: 1px solid #dee2e6;
  background: #fff;
  border-radius: 0.5rem;
  padding: 0.5rem;
  min-width: 135px;
  max-width: 180px;
  flex: 0 0 auto;
  cursor: pointer;
  box-shadow: 0 2px 6px #0000000a;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.thumb-card.is-active {
  border-color: #0d6efd;
  box-shadow: 0 4px 12px #0d6efd29;
}
.thumb-number {
  font-size: 0.75rem;
  color: #6c757d;
  margin-bottom: 0.25rem;
}
.thumb-preview {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  min-height: 40px;
  overflow: hidden;
  font-size: 0.7rem;
  line-height: 1.2;
  text-align: left;
}
.thumb-preview * {
  font-size: 0.7rem !important;
  line-height: 1.2 !important;
}
.thumb-preview img {
  width: 90px;
  height: auto;
}
.flashcard-container {
  background-color: transparent;
  width: 100%;
  height: 350px;
  perspective: 1000px;
  cursor: pointer;
  margin: 0 auto;
  max-width: 100%;
}
.flashcard-container img {
  width: 100%;
  height: auto;
}
.flashcard-container,
.flashcard-container .flashcard-front,
.flashcard-container .flashcard-back {
  padding: 0;
  border: none;
  box-shadow: none;
}
i {
  font-size: 1.4rem;
}
.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}
.flashcard-container.is-flipped .flashcard-inner {
  transform: rotateY(180deg);
}
.flashcard-front,
.flashcard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.flashcard-back {
  transform: rotateY(180deg);
}
img {
  width: 285px;
  height: auto;
}

/* Big screens: 200% bigger flashcard and images */
@media (min-width: 1200px) {
  .flashcard-container {
    height: 400px;
    width: 1200px;
  }

  img {
    width: 1200px;
  }
}
img {
  width: 100%;
  height: auto;
}
.flashcard-container {
  height: auto;
}
.flashcard-inner,
.flashcard-front {
  height: auto;
}
.flashcard-front {
  display: block;
}
/* Let the flashcard size itself so controls aren't overlapped */
.flashcard-inner {
  position: static;
  transform: none;
}
.flashcard-front {
  position: relative;
  transform: none;
}
.hotspot-wrap {
  position: relative;
  width: 100%;
}
.hotspot-wrap img {
  width: 100%;
  display: block;
  border-radius: 0.5rem;
  border: 0 !important;
  box-shadow: none !important;
}
.hotspot {
  position: absolute;
  width: 15px;
  height: 15px;
  padding: 15px;
  margin: -15px;
  border: none;
  background: transparent;
  cursor: pointer;
}
.hotspot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  transform: translate(-50%, -50%);
  border-radius: 90%;
  border: 3px solid rgb(255, 15, 15);
  background: rgba(255, 255, 255, 0.5);
  box-shadow:
    0 0 0 8px rgb(255, 255, 255),
    0 2px 10px rgba(0, 0, 0, 0.25);
  animation: pulse 1.25s infinite ease-in-out;
}
.flashcard-container,
#flashcard {
  border: 0 !important;
  box-shadow: none !important;
}
.flashcard-container::after {
  display: none !important;
}
.hotspot:focus-visible::after {
  outline: 2px solid #111;
  outline-offset: 3px;
}
@keyframes pulse {
  0% {
    transform: translate(-30%, -30%) scale(1);
    opacity: 0.5;
  }
  60% {
    transform: translate(-30%, -30%) scale(1.45);
    opacity: 0.65;
  }
  100% {
    transform: translate(-30%, -30%) scale(1);
    opacity: 0.1;
  }
}
.term-panel {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  background: #f8f9fa;
  line-height: 1.4;
}
.term-panel strong {
  min-width: 78px;
  display: inline-block;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.hotspot-tooltip {
  position: absolute;
  z-index: 30;
  min-width: 210px;
  max-width: 260px;
  padding: 14px 16px 16px 22px;
  background: #fff;
  border: none;
  border-radius: 14px;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}
.hotspot-tooltip {
  position: absolute;
  z-index: 30;
  min-width: 210px;
  max-width: 260px;

  /* REMOVED: padding: 14px 16px 16px 22px; */
  /* ADDED: Standard padding (less on left because border handles spacing) */
  padding: 14px 16px 16px 16px;

  background: #fff;

  /* CHANGED: border: none; */
  /* ADDED: This creates the orange strip that hugs the corners perfectly */
  border-left: 10px solid #e86b00;

  border-radius: 14px;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}
.hotspot-tooltip.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.hotspot-tooltip-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: #111;
  cursor: pointer;
}
.hotspot-tooltip-en {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: lowercase;
}
.hotspot-tooltip-divider {
  height: 2px;
  background: #2a55ff;
  margin-bottom: 8px;
}
.hotspot-tooltip-fr {
  font-size: 1.1rem;
  margin-bottom: 4px;
}
.hotspot-tooltip-ipa {
  font-size: 1.05rem;
  color: #111;
}
.hotspot-message {
  position: absolute;
  z-index: 20;
  min-width: 160px;
  padding: 10px 12px;
  background: #ffffff;
  color: #010101;
  border-radius: 8px;
  /* box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25); */
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
  transform: translate(-50%, -8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}
.hotspot-message.is-visible {
  opacity: 1;
}
.hotspot-word {
  border: none;
  background: transparent;
  padding: 0 2px;
  margin: 0;
  color: #111;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px dotted #e86b00;
  cursor: pointer;
}
.hotspot-word:hover,
.hotspot-word:focus {
  color: #e86b00;
}
.hotspot-word:focus {
  outline: 2px solid #e86b00;
  outline-offset: 2px;
}
