/* ═══════════════════════════════════════════
   AUTH MODAL — leechan AUTO
   Glass morphism + Aurora background
   ═══════════════════════════════════════════ */

/* ── Overlay ─────────────────────────────── */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.auth-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* Canvas aurora bg */
.auth-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Dim layer over canvas */
.auth-dim {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 8, 0.48);
  z-index: 1;
}

/* ── Modal glass card ─────────────────────── */
.auth-modal {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
  padding: 40px 36px 36px;
  border-radius: 24px;

  /* Glassmorphism */
  background: rgba(8, 8, 16, 0.36);
  backdrop-filter: blur(52px) saturate(2) brightness(1.14);
  -webkit-backdrop-filter: blur(52px) saturate(2) brightness(1.14);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.07) inset,
    0 2px 0 rgba(255,255,255,0.12) inset,
    0 -1px 0 rgba(255,255,255,0.04) inset,
    0 32px 80px rgba(0, 0, 0, 0.48),
    0 0 80px rgba(120, 80, 255, 0.12),
    0 0 140px rgba(60, 160, 255, 0.08);

  /* Entry animation */
  transform: translateY(16px) scale(0.96);
  transition:
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.35s ease;
  opacity: 0;
}
.auth-overlay.open .auth-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Glow ring on modal edge */
.auth-modal::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 25px;
  background: linear-gradient(135deg,
    rgba(160, 100, 255, 0.22) 0%,
    rgba(60, 160, 255, 0.12) 40%,
    rgba(0, 220, 180, 0.09) 100%
  );
  z-index: -1;
  pointer-events: none;
}

/* Inner top highlight — liquid glass shimmer */
.auth-modal::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.22) 30%,
    rgba(255,255,255,0.28) 50%,
    rgba(255,255,255,0.22) 70%,
    rgba(255,255,255,0) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* ── Close button ─────────────────────────── */
.auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  line-height: 1;
}
.auth-close:hover {
  background: rgba(255,255,255,0.14);
  color: #fff;
  transform: rotate(90deg);
}

/* ── Logo / Header ────────────────────────── */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: 6px;
}
.auth-logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
}
.auth-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.auth-logo-text span:first-child {
  font-size: 17px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
}
.auth-logo-text span:last-child {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}
.auth-title {
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
.auth-subtitle {
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.42);
  margin-bottom: 28px;
}

/* ── Form fields ──────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-field label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}
.auth-input-wrap {
  position: relative;
}
.auth-input-wrap input {
  width: 100%;
  padding: 13px 42px 13px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}
.auth-input-wrap input::placeholder {
  color: rgba(255,255,255,0.25);
}
.auth-input-wrap input:focus {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255, 219, 22, 0.45);
  box-shadow: 0 0 0 3px rgba(255,219,22,0.08);
}
.auth-input-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.28);
  pointer-events: none;
  width: 16px;
  height: 16px;
}
.auth-input-wrap .toggle-pw {
  pointer-events: all;
  cursor: pointer;
  transition: color 0.2s;
}
.auth-input-wrap .toggle-pw:hover {
  color: rgba(255,255,255,0.7);
}

/* ── Row: remember + forgot ───────────────── */
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -2px;
}
.auth-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  user-select: none;
}
.auth-check-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1.5px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.auth-check-label input[type="checkbox"]:checked {
  background: #ffdb16;
  border-color: #ffdb16;
}
.auth-check-label input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: 2px solid #000;
  border-top: none;
  border-left: none;
  transform: rotate(40deg);
}
.auth-forgot {
  font-size: 13px;
  color: rgba(255,255,255,0.42);
  text-decoration: none;
  transition: color 0.2s;
}
.auth-forgot:hover {
  color: #ffdb16;
}

/* ── Submit button ────────────────────────── */
.auth-submit {
  margin-top: 6px;
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #000;
  background: linear-gradient(135deg, #ffdb16 0%, #ffc800 100%);
  box-shadow:
    0 4px 20px rgba(255, 219, 22, 0.35),
    0 1px 0 rgba(255,255,255,0.3) inset;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.auth-submit::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, transparent 60%);
  pointer-events: none;
}
.auth-submit:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 32px rgba(255, 219, 22, 0.5),
    0 1px 0 rgba(255,255,255,0.3) inset;
}
.auth-submit:active {
  transform: translateY(0);
  box-shadow: 0 2px 12px rgba(255, 219, 22, 0.3);
}

/* ── Divider ──────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.08);
}
.auth-divider span {
  font-size: 11px;
  color: rgba(255,255,255,0.28);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Register link ────────────────────────── */
.auth-register {
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.38);
  margin-top: 4px;
}
.auth-register a {
  color: #ffdb16;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.2s;
}
.auth-register a:hover {
  opacity: 0.8;
}

/* ── Mobile ───────────────────────────────── */
@media (max-width: 480px) {
  .auth-modal {
    padding: 32px 22px 28px;
    border-radius: 20px;
  }
  .auth-title { font-size: 22px; }
}
