/* ===== Auth Image Carousel (层叠轮播) ===== */
.auth-section__docs {
  padding-top: 16px;
  overflow: visible;
}

.auth-carousel {
  width: min(100%, 860px);
  margin: 0 auto;
}

.auth-carousel__stack {
  position: relative;
  height: 490px;
  overflow: visible;
  isolation: isolate;
}

.auth-carousel__card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(72%, 580px);
  height: auto;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  cursor: pointer;
  overflow: visible;
  box-shadow: none;
  transform-origin: center center;
  transition:
    transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.45s ease;
  will-change: transform, opacity;
}

.auth-carousel__card img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 490px;
  margin: 0 auto;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

/* 上一张 / 下一张：70% 大小，叠在当前图后方，仅左右露出 */
.auth-carousel__card--prev,
.auth-carousel__card--next {
  z-index: 1;
  opacity: 0.88;
}

.auth-carousel__card--prev {
  transform: translate(-50%, -50%) translateX(-46%) scale(0.7);
}

.auth-carousel__card--next {
  transform: translate(-50%, -50%) translateX(46%) scale(0.7);
}

.auth-carousel__card--prev img,
.auth-carousel__card--next img {
  filter: drop-shadow(0 4px 10px rgba(0, 63, 116, 0.1));
}

.auth-carousel__card--prev:hover {
  transform: translate(-50%, -50%) translateX(-44%) scale(0.72);
  opacity: 0.95;
}

.auth-carousel__card--next:hover {
  transform: translate(-50%, -50%) translateX(44%) scale(0.72);
  opacity: 0.95;
}

/* 当前图：490px 高，完整显示，置于最上层 */
.auth-carousel__card--active {
  z-index: 3;
  transform: translate(-50%, -50%);
  opacity: 1;
}

.auth-carousel__card--active img {
  filter: drop-shadow(0 10px 24px rgba(0, 63, 116, 0.16));
}

.auth-carousel__card--active:hover {
  transform: translate(-50%, -50%) scale(1.01);
}

.auth-carousel__card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
}

.auth-carousel__stack.is-animating .auth-carousel__card {
  pointer-events: none;
}

.auth-carousel__indicator {
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
  line-height: 20px;
  color: var(--color-text-secondary);
}

/* ===== Auth Image Viewer ===== */
.auth-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.auth-image-viewer.is-open {
  display: block;
}

.auth-image-viewer__mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.auth-image-viewer__panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 72px;
  pointer-events: none;
}

.auth-image-viewer__img {
  display: block;
  max-width: min(92vw, 1200px);
  max-height: 86vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
  user-select: none;
}

.auth-image-viewer__close,
.auth-image-viewer__prev,
.auth-image-viewer__next {
  position: absolute;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  cursor: pointer;
  pointer-events: auto;
  transition: background-color 0.2s ease;
}

.auth-image-viewer__close:hover,
.auth-image-viewer__prev:hover,
.auth-image-viewer__next:hover {
  background: rgba(255, 255, 255, 0.24);
}

.auth-image-viewer__prev:disabled,
.auth-image-viewer__next:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.auth-image-viewer__close {
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

.auth-image-viewer__prev,
.auth-image-viewer__next {
  top: 50%;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  transform: translateY(-50%);
}

.auth-image-viewer__prev {
  left: 24px;
}

.auth-image-viewer__next {
  right: 24px;
}

.auth-image-viewer__prev span,
.auth-image-viewer__next span {
  display: block;
  width: 12px;
  height: 12px;
  border-top: 2px solid #ffffff;
  border-right: 2px solid #ffffff;
}

.auth-image-viewer__prev span {
  transform: rotate(-135deg);
  margin-left: 4px;
}

.auth-image-viewer__next span {
  transform: rotate(45deg);
  margin-right: 4px;
}

.auth-image-viewer__counter {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  font-size: 14px;
  line-height: 20px;
  pointer-events: none;
}

@media (width <= 768px) {
  .auth-carousel {
    width: 96%;
  }

  .auth-carousel__card {
    width: min(88%, 320px);
  }

  .auth-carousel__card--prev {
    transform: translate(-50%, -50%) translateX(-40%) scale(0.7);
  }

  .auth-carousel__card--next {
    transform: translate(-50%, -50%) translateX(40%) scale(0.7);
  }
}
