/* ════════════════════════════════════════
   AUTH MODAL — Dreadmark Online
════════════════════════════════════════ */

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}
.auth-overlay.active {
  display: flex;
}

/* ── Box ── */
.auth-box {
  background: linear-gradient(160deg, rgba(18,12,5,0.99) 0%, rgba(8,5,2,0.99) 100%);
  border: 1px solid rgba(200,160,40,0.35);
  border-radius: 10px;
  padding: 32px 28px 24px;
  width: 360px;
  max-width: 92vw;
  box-shadow:
    0 0 0 1px rgba(200,160,40,0.08),
    0 0 40px rgba(200,160,40,0.12),
    0 24px 64px rgba(0,0,0,0.7);
  position: relative;
  animation: auth-appear 0.35s ease;
}
@keyframes auth-appear {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* ── Logo ── */
.auth-logo {
  text-align: center;
  margin-bottom: 24px;
}
.auth-logo img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 12px rgba(200,160,40,0.35));
}
.auth-logo h2 {
  font-family: var(--font-title);
  font-size: 20px;
  color: var(--text-gold);
  letter-spacing: 4px;
  margin: 0 0 4px;
}
.auth-logo span {
  font-family: var(--font-ui);
  font-size: 10px;
  color: rgba(160,130,70,0.6);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ── Tabs ── */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid rgba(107,74,26,0.3);
  margin-bottom: 22px;
}
.auth-tab {
  flex: 1;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-dim);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 0;
  cursor: pointer;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color 0.2s, border-color 0.2s;
  margin-bottom: -1px;
}
.auth-tab:hover  { color: rgba(200,170,90,0.7); }
.auth-tab.active { color: var(--text-gold); border-bottom-color: var(--border-gold); }

/* ── Form ── */
.auth-form { display: flex; flex-direction: column; }
.auth-form.hidden { display: none; }

.auth-field { margin-bottom: 14px; }
.auth-field label {
  display: block;
  font-family: var(--font-ui);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.auth-field input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(107,74,26,0.4);
  border-radius: 5px;
  color: var(--text-light);
  font-family: var(--font-ui);
  font-size: 12px;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.auth-field input:focus {
  border-color: rgba(200,160,40,0.6);
  box-shadow: 0 0 0 3px rgba(200,160,40,0.08);
}

/* ── Error ── */
.auth-error {
  font-family: var(--font-ui);
  font-size: 10px;
  color: #e05050;
  letter-spacing: 0.5px;
  min-height: 14px;
  margin-bottom: 10px;
  text-align: center;
}

/* ── Submit button ── */
.auth-submit-btn { width: 100%; margin-top: 2px; }

/* ── Loading state ── */
.auth-loading {
  display: none;
  text-align: center;
  padding: 16px 0 8px;
}
.auth-loading.visible { display: block; }
.auth-loading span {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 1px;
  animation: auth-pulse 1.4s ease infinite;
}
@keyframes auth-pulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1;   }
}

/* ── Footer ── */
.auth-footer {
  text-align: center;
  font-family: var(--font-ui);
  font-size: 9px;
  color: rgba(120,100,60,0.4);
  letter-spacing: 1px;
  margin-top: 20px;
}

/* ── Divider ── */
.auth-divider {
  height: 1px;
  background: rgba(107,74,26,0.2);
  margin: 18px 0;
}

/* ── Forgot password link (below login submit) ── */
.auth-forgot-link {
  background: none;
  border: none;
  color: rgba(160,130,70,0.55);
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.5px;
  cursor: pointer;
  margin-top: 10px;
  padding: 0;
  text-align: center;
  transition: color 0.2s;
}
.auth-forgot-link:hover { color: rgba(200,160,60,0.85); }

/* ── Back to Sign In link (in verify / forgot panels) ── */
.auth-back-link {
  background: none;
  border: none;
  color: rgba(160,130,70,0.6);
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.5px;
  cursor: pointer;
  margin-top: 14px;
  padding: 0;
  text-align: center;
  display: block;
  width: 100%;
  transition: color 0.2s;
}
.auth-back-link:hover { color: var(--text-gold); }

/* ── Verify email panel & Forgot password panel shared styles ── */
#auth-verify-panel,
#auth-forgot-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.auth-verify-icon {
  font-size: 36px;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 10px rgba(200,160,40,0.4));
}

.auth-verify-title {
  font-family: var(--font-title);
  font-size: 15px;
  color: var(--text-gold);
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.auth-verify-desc {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 4px;
}
.auth-verify-desc strong {
  color: rgba(200,170,90,0.85);
  word-break: break-all;
}

/* ── Success message (green) ── */
.auth-success {
  font-family: var(--font-ui);
  font-size: 10px;
  color: #6abf69;
  letter-spacing: 0.5px;
  text-align: center;
  margin-bottom: 10px;
}

/* Forgot panel: align field to full width */
#auth-forgot-panel .auth-field { width: 100%; text-align: left; }
