/**
 * lobby-auth.css (v3) — 운영 app_v1_web auth gate · 회원가입 모달
 */

/* ── 회원가입 모달 ── */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 9600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
}

.auth-overlay.is-open {
  display: flex;
}

.auth-modal {
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px 24px 20px;
  border-radius: 14px;
  border: 1px solid rgba(201, 169, 110, 0.22);
  background: #161310;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  position: relative;
}

.auth-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(201, 169, 110, 0.4);
  background: rgba(0, 0, 0, 0.4);
  color: #ffd76a;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.auth-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-right: 36px;
  margin-bottom: 8px;
}

.auth-modal__login-link {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: #d4b87a;
  font-size: 11px;
  text-decoration: underline;
  cursor: pointer;
  padding: 2px 0;
}

.auth-modal__subtitle {
  margin: 0 0 12px;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(245, 239, 224, 0.45);
}

.auth-modal__notice {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(123, 186, 255, 0.28);
  background: rgba(123, 186, 255, 0.08);
  line-height: 1.55;
}

.auth-modal__notice-title {
  font-size: 11px;
  color: #9ec8ff;
  font-weight: 700;
}

.auth-modal__notice-sub {
  margin-top: 4px;
  font-size: 10.5px;
  color: #7ba9d8;
}

.auth-modal__section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(201, 169, 110, 0.2);
}

.auth-modal__section-title {
  margin-bottom: 8px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(201, 169, 110, 0.55);
  font-weight: 700;
}

.auth-modal__hint {
  margin: 4px 0 0;
  font-size: 10px;
  line-height: 1.45;
  color: rgba(245, 239, 224, 0.35);
}

.auth-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.auth-captcha__renew {
  padding: 8px 10px !important;
  font-size: 11px !important;
  min-width: 0;
}

.auth-modal__skip {
  display: none;
  background: transparent !important;
  border: 1px solid rgba(201, 169, 110, 0.35) !important;
}

.auth-modal__skip-hint {
  margin: 10px 0 0;
  font-size: 10px;
  text-align: center;
  color: rgba(245, 239, 224, 0.3);
}

@media (max-width: 480px) {
  .auth-field-row {
    grid-template-columns: 1fr;
  }

  .auth-modal__head {
    flex-direction: column;
    align-items: stretch;
  }
}

.auth-modal--wide {
  max-width: 480px;
}

.auth-modal__title {
  margin: 0 0 16px;
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #d4b87a;
}

.auth-field {
  margin-bottom: 12px;
}

.auth-field label {
  display: block;
  margin-bottom: 5px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(201, 169, 110, 0.55);
  font-weight: 700;
}

.auth-field input,
.auth-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid rgba(201, 169, 110, 0.22);
  background: rgba(0, 0, 0, 0.4);
  color: #f5efe0;
  font-size: 13px;
}

.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 11px;
  color: rgba(245, 239, 224, 0.65);
  line-height: 1.4;
}

.auth-error {
  min-height: 16px;
  font-size: 11px;
  color: #ff7a7a;
}

.auth-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.auth-captcha {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.auth-captcha__q {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  color: #ffd76a;
}

.auth-captcha input {
  width: 72px;
  text-align: center;
}

.wallet-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 9800;
  padding: 10px 18px;
  border-radius: 8px;
  background: rgba(14, 11, 8, 0.92);
  border: 1px solid rgba(201, 169, 110, 0.35);
  color: #f5efe0;
  font-size: 13px;
  transition: transform 0.25s ease;
  pointer-events: none;
}

.wallet-toast.is-visible {
  transform: translateX(-50%) translateY(0);
}

/* ── 운영 auth gate (view-authgate) ── */
body.auth-gate-page {
  margin: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0805, #15110a);
}

#view-authgate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: linear-gradient(135deg, #0a0805, #15110a);
  overflow: hidden;
}

#view-authgate.is-open {
  display: block;
}

.authgate-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  background: #0a0805;
  pointer-events: none;
}

.authgate-bg-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at center, #1a1408 0%, #0a0805 70%);
  pointer-events: none;
}

.authgate-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.55) 0%, rgba(20, 15, 8, 0.78) 100%);
  pointer-events: none;
}

.authgate-lang-wrap {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 4;
}

.authgate-lang {
  background: rgba(0, 0, 0, 0.55);
  color: #ffd76a;
  border: 1px solid rgba(201, 169, 110, 0.45);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  letter-spacing: 0.06em;
  cursor: pointer;
  backdrop-filter: blur(4px);
  outline: none;
}

.authgate-center {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
}

.authgate-box {
  width: 100%;
  max-width: 400px;
  pointer-events: auto;
  text-align: center;
}

.authgate-logo {
  display: block;
  width: 100%;
  max-width: 380px;
  height: auto;
  margin: 0 auto 14px;
  filter: drop-shadow(0 4px 18px rgba(255, 215, 106, 0.35)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.85));
}

.authgate-logo-fallback {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #ffd76a;
  text-shadow: 0 4px 18px rgba(255, 215, 106, 0.5), 0 2px 6px rgba(0, 0, 0, 0.85);
  line-height: 1.15;
  margin-bottom: 18px;
}

.authgate-card {
  background: rgba(14, 11, 8, 0.82);
  border: 2px solid rgba(201, 169, 110, 0.7);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 0 24px rgba(201, 169, 110, 0.22), 0 18px 50px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  text-align: left;
}

.authgate-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.authgate-form input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(201, 169, 110, 0.3);
  color: #f5efe0;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 14px;
  font-family: monospace;
  letter-spacing: 0.04em;
  outline: none;
}

.authgate-error {
  min-height: 16px;
  font-size: 11px;
  color: #ff7a7a;
  text-align: center;
  margin-top: 2px;
}

.authgate-btn {
  padding: 12px 22px;
  font-size: 14px;
  letter-spacing: 0.06em;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
  width: 100%;
}

.authgate-signup {
  border-top: 1px dashed rgba(201, 169, 110, 0.22);
  margin-top: 18px;
  padding-top: 14px;
  text-align: center;
}

.authgate-signup__hint {
  font-size: 11px;
  color: rgba(245, 239, 224, 0.55);
  margin-bottom: 8px;
}

.authgate-tg-btn {
  margin-top: 10px;
  background: transparent;
  border: none;
  color: rgba(201, 169, 110, 0.78);
  font-size: 12px;
  cursor: pointer;
  letter-spacing: 0.04em;
  padding: 6px 4px;
  width: 100%;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.authgate-tg-btn span {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.authgate-subtitle {
  margin-top: 14px;
  color: rgba(245, 239, 224, 0.55);
  font-size: 11px;
  letter-spacing: 0.08em;
}

body[data-auth-guard="gate"]:not(.auth-passed) .lobby-wrap {
  visibility: hidden;
}

body.auth-gate-active {
  overflow: hidden;
}
