/* ── Shake animation for wrong password ──────────────────────────────────── */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  15% {
    transform: translateX(-8px);
  }
  30% {
    transform: translateX(7px);
  }
  45% {
    transform: translateX(-5px);
  }
  60% {
    transform: translateX(4px);
  }
  75% {
    transform: translateX(-2px);
  }
  90% {
    transform: translateX(1px);
  }
}

.shake {
  animation: shake 0.55s ease-in-out;
}

/* ── Scrollbar styling ───────────────────────────────────────────────────── */
#chapter-list::-webkit-scrollbar {
  width: 4px;
}
#chapter-list::-webkit-scrollbar-track {
  background: transparent;
}
#chapter-list::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 2px;
}
#chapter-list::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Hide scrollbar on lang tabs row */
.scrollbar-none::-webkit-scrollbar {
  display: none;
}
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ── Chapter arrow transition ────────────────────────────────────────────── */
.chapter-arrow {
  transition: transform 0.18s ease;
}

/* ── Lesson card hover lift ───────────────────────────────────────────────── */
.lesson-card {
  position: relative;
  transition:
    box-shadow 0.15s ease,
    transform 0.1s ease;
}
.lesson-card:hover:not([class*="bg-indigo-6"]) {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

/* ── PDF iframe fills available vertical space ───────────────────────────── */
#pdf-frame {
  display: block;
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
}

/* The main PDF area is a flex column; ensure proper sizing */
main {
  display: flex;
  flex-direction: column;
}

/* ── Gate input focus ring override ──────────────────────────────────────── */
#gate-input {
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

/* ── Smooth spinner ──────────────────────────────────────────────────────── */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.animate-spin {
  animation: spin 0.8s linear infinite;
}
