@keyframes drgGateScroll {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-50%);
  }
}

#gate-overlay.drg-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
}

#gate-overlay.drg-gate.is-hidden {
  display: none;
}

.drg-gate-content.is-locked {
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}

.drg-gate__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.drg-gate__bg-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, rgba(13, 61, 53, 0.78) 0%, rgba(26, 92, 82, 0.72) 45%, rgba(10, 40, 32, 0.82) 100%);
  z-index: 2;
}

.drg-gate__bg-cards {
  position: absolute;
  inset: 0;
  z-index: 1;
  filter: blur(2px) brightness(0.8);
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-content: start;
  overflow: hidden;
}

.drg-gate__track {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-content: start;
  animation: drgGateScroll 30s linear infinite;
  will-change: transform;
}

.drg-gate__track:hover {
  animation-play-state: paused;
}

.drg-gate__content {
  position: relative;
  z-index: 10;
  max-width: 460px;
  width: 100%;
  text-align: center;
}

.drg-gate__eyebrow {
  font-family: "DM Mono", monospace;
  font-size: 0.75em;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.drg-gate__title {
  font-family: "Noto Serif TC", Georgia, serif;
  font-size: clamp(24px, 6vw, 34px);
  color: #fff;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.25;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.drg-gate__summary {
  margin: 0 0 22px;
}

.drg-gate__summary p {
  margin: 0 0 6px;
}

.drg-gate__summary-primary {
  font-size: clamp(13px, 3vw, 16px);
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  line-height: 1.5;
}

.drg-gate__summary-secondary {
  font-size: clamp(12px, 2.5vw, 14px);
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.03em;
  line-height: 1.5;
}

.drg-gate__card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  padding: 26px 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.drg-gate__steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 22px;
}

.drg-gate__dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 0.857em;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}

.drg-gate__dot.is-active {
  background: #3aa89d;
  color: #fff;
}

.drg-gate__dot:not(.is-active) {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.35);
}

.drg-gate__line {
  flex: 1;
  max-width: 48px;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
}

.drg-gate__step-title {
  font-size: clamp(15px, 3.5vw, 17px);
  color: rgba(255, 255, 255, 0.95);
  font-weight: 700;
  margin: 0 0 6px;
}

.drg-gate__step-body {
  font-size: clamp(12px, 2.8vw, 14px);
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 20px;
  line-height: 1.65;
}

.drg-gate__step-body.is-tight {
  font-size: clamp(11px, 2.5vw, 13px);
  margin-bottom: 18px;
  line-height: 1.6;
}

.drg-gate__line-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #06c755;
  color: #fff;
  text-decoration: none;
  padding: 15px 34px;
  border-radius: 30px;
  font-size: clamp(14px, 3.5vw, 16px);
  font-weight: 700;
  box-shadow: 0 8px 28px rgba(6, 199, 85, 0.4);
  letter-spacing: 0.02em;
  margin-bottom: 14px;
  border: 0;
}

.drg-gate__ghost-btn,
.drg-gate__back-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.drg-gate__ghost-btn {
  color: rgba(255, 255, 255, 0.3);
  font-size: clamp(11px, 2.5vw, 13px);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.drg-gate__back-btn {
  color: rgba(255, 255, 255, 0.25);
  font-size: clamp(11px, 2.5vw, 13px);
}

.drg-gate__input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.drg-gate__input {
  flex: 1;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: clamp(14px, 3.5vw, 16px);
  outline: none;
  letter-spacing: 0.1em;
  text-align: center;
}

.drg-gate__input:focus {
  border-color: rgba(58, 168, 157, 0.8);
}

.drg-gate__submit {
  padding: 14px 22px;
  border-radius: 12px;
  background: #3aa89d;
  color: #fff;
  border: none;
  font-size: clamp(14px, 3.5vw, 16px);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.15s;
}

.drg-gate__submit:hover {
  background: #2d8f85;
}

.drg-gate__error {
  font-size: clamp(11px, 2.5vw, 13px);
  color: #ff8080;
  margin: 0 0 12px;
  display: none;
}

.drg-gate__error.is-visible {
  display: block;
}

.drg-gate__footer {
  font-size: clamp(10px, 2vw, 12px);
  color: rgba(255, 255, 255, 0.22);
  margin: 16px 0 0;
  line-height: 1.5;
}

.drg-gate__accent {
  color: #5dd9ce;
}

.drg-gate__ghost-card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  text-align: left;
}

.drg-gate__ghost-title {
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 4px;
}

.drg-gate__ghost-subtitle {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 8px;
  font-family: monospace;
}

.drg-gate__ghost-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.drg-gate__ghost-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.55);
}

.drg-gate__ghost-tag.is-primary {
  background: rgba(58, 168, 157, 0.2);
  color: rgba(58, 168, 157, 0.95);
}

.drg-gate .en {
  display: none;
}

body.en-mode .drg-gate .zh {
  display: none;
}

body.en-mode .drg-gate .en {
  display: inline;
}

@media (max-width: 480px) {
  .drg-gate__content {
    padding: 4px 0 12px;
  }

  .drg-gate__input-row {
    flex-direction: column;
  }

  .drg-gate__submit {
    width: 100%;
    padding: 14px;
  }
}
