/* ═══════════════════════════════════════════════════
   AUTH MODAL — Standalone stylesheet
   Matches wichatbotview AuthModal design
   Uses warroom CSS variables from styles.css
   ═══════════════════════════════════════════════════ */

/* ── Overlay ── */
.auth-overlay {
  position: fixed; inset: 0; z-index: 200000;
  background: rgba(8, 9, 13, .85);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  transition: opacity .2s;
}
.auth-overlay.hidden { display: none; }

/* ── Modal Box ── */
.auth-modal-box {
  background: var(--bg3, #1a283a);
  border: 1px solid var(--border2, rgba(200,164,90,.14));
  border-radius: 12px;
  max-width: 420px; width: 100%;
  padding: 0;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  max-height: 90vh;
  overflow-y: auto;
}

/* ── Close Button ── */
.auth-close {
  position: absolute; top: .8rem; right: .8rem;
  background: transparent; border: none;
  color: var(--txt3, #7a776e); font-size: 1.2rem;
  cursor: pointer; transition: color .2s;
  z-index: 2; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.auth-close:hover { color: var(--gold, #c8a45a); background: rgba(200,164,90,.08); }

/* ── Header ── */
.auth-header {
  text-align: center;
  padding: 1.5rem 1.5rem .5rem;
}
.auth-logo {
  font-family: var(--fd, 'Orbitron', sans-serif);
  font-size: 1.1rem; font-weight: 800;
  color: var(--gold, #c8a45a);
  letter-spacing: 3px;
  margin-bottom: .3rem;
}
.auth-logo sup { font-size: .6em; }
.auth-title {
  font-size: 1rem; font-weight: 600;
  color: var(--txt, #e8e4dc);
  margin-bottom: .2rem;
}
.auth-subtitle {
  font-size: .78rem;
  color: var(--txt2, #a8a49a);
  margin-bottom: .2rem;
}

/* ── Registration Benefit Card — the main CTA ── */
.auth-benefit-card {
  margin: .6rem 1.5rem .2rem;
  padding: .65rem .8rem;
  background: linear-gradient(135deg, rgba(0,229,255,.08) 0%, rgba(167,139,250,.08) 50%, rgba(255,107,53,.06) 100%);
  border: 1px solid rgba(0,229,255,.2);
  border-radius: 10px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.auth-benefit-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(0,229,255,.06) 0%, transparent 60%);
  pointer-events: none;
}
.auth-benefit-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 4px;
}
.auth-benefit-icon {
  font-size: 1.3rem;
  line-height: 1;
}
.auth-benefit-title {
  font-size: .85rem;
  font-weight: 700;
  color: #e0f7fa;
  letter-spacing: .3px;
}
.auth-benefit-sub {
  font-size: .72rem;
  color: rgba(0,229,255,.75);
  font-family: var(--fd, 'JetBrains Mono', monospace);
  letter-spacing: .5px;
}
.auth-benefit-models {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.auth-benefit-model {
  font-size: .65rem;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(230,240,255,.7);
  font-family: var(--fd, 'JetBrains Mono', monospace);
  white-space: nowrap;
}

/* ── Tabs ── */
.auth-tabs-bar {
  display: flex; gap: 0;
  margin: .8rem 1.5rem 0;
  background: var(--bg, #101824);
  border-radius: 8px;
  padding: 3px;
}
.auth-tab {
  flex: 1; padding: .5rem 0;
  background: transparent; border: none;
  color: var(--txt3, #7a776e);
  font-size: .82rem; font-weight: 500;
  cursor: pointer; border-radius: 6px;
  transition: all .2s;
  font-family: var(--fb);
}
.auth-tab.active {
  background: var(--bg3, #1a283a);
  color: var(--txt, #e8e4dc);
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.auth-tab:hover:not(.active) { color: var(--txt2, #a8a49a); }

/* ── Tab Content ── */
.auth-view { display: none; padding: 1rem 1.5rem 1.5rem; }
.auth-view.active { display: block; }

/* ── Method Chooser Buttons ── */
.auth-methods-list {
  display: flex; flex-direction: column; gap: .6rem;
}
.auth-method-choose-btn {
  width: 100%; padding: .75rem 1rem;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border2, rgba(200,164,90,.14));
  color: var(--txt, #e8e4dc);
  font-size: .88rem; cursor: pointer;
  border-radius: 8px; font-family: var(--fb);
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  transition: all .2s;
}
.auth-method-choose-btn:hover {
  background: rgba(200,164,90,.06);
  border-color: var(--gold, #c8a45a);
  transform: translateY(-1px);
}
.auth-method-choose-btn svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ── Form Fields ── */
.auth-field {
  width: 100%; padding: .6rem .8rem;
  background: var(--bg, #101824);
  border: 1px solid var(--border, rgba(200,164,90,.07));
  color: var(--txt, #e8e4dc);
  font-size: .82rem; border-radius: 8px;
  font-family: var(--fb);
  transition: border-color .2s;
  outline: none;
}
.auth-field::placeholder { color: var(--txt3, #7a776e); }
.auth-field:focus { border-color: var(--gold, #c8a45a); }
.auth-field.error { border-color: var(--red, #c43c3c); }

.auth-field-group { margin-bottom: .6rem; }
.auth-field-error {
  font-size: .7rem; color: var(--red, #c43c3c);
  margin-top: .2rem; min-height: .9rem;
}

/* ── Primary Button ── */
.auth-btn-primary {
  width: 100%; padding: .65rem;
  background: linear-gradient(135deg, var(--gold, #c8a45a), var(--gold2, #dbb96e));
  border: none; color: var(--bg, #101824);
  font-weight: 700; font-size: .82rem;
  cursor: pointer; border-radius: 8px;
  font-family: var(--fb);
  transition: all .2s;
}
.auth-btn-primary:hover { opacity: .9; transform: translateY(-1px); }
.auth-btn-primary:disabled {
  opacity: .5; cursor: not-allowed; transform: none;
}

/* ── Divider ── */
.auth-divider {
  display: flex; align-items: center;
  margin: .8rem 0; gap: .8rem;
}
.auth-divider-line {
  flex: 1; height: 1px;
  background: var(--border, rgba(200,164,90,.07));
}
.auth-divider-text {
  font-size: .75rem;
  color: var(--txt3, #7a776e);
}

/* ── Google Button ── */
.auth-btn-google {
  width: 100%; padding: .6rem;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border2, rgba(200,164,90,.14));
  color: var(--txt, #e8e4dc);
  font-size: .82rem; cursor: pointer;
  border-radius: 8px; font-family: var(--fb);
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  transition: all .2s;
}
.auth-btn-google:hover {
  background: rgba(255,255,255,.08);
  border-color: var(--gold, #c8a45a);
}
.auth-btn-google svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Forgot Password Link ── */
.auth-forgot-link {
  display: block; text-align: center;
  margin-top: .5rem; padding: .3rem;
  font-size: .78rem;
  color: var(--gold, #c8a45a);
  cursor: pointer; text-decoration: none;
  transition: opacity .2s;
}
.auth-forgot-link:hover { opacity: .8; text-decoration: underline; }

/* ── Verification Code Row ── */
.auth-code-row {
  display: flex; gap: .5rem; align-items: flex-start;
}
.auth-code-row .auth-field { flex: 1; }
.auth-code-btn {
  padding: .6rem .8rem;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border2, rgba(200,164,90,.14));
  color: var(--txt, #e8e4dc);
  font-size: .75rem; cursor: pointer;
  border-radius: 8px; font-family: var(--fb);
  white-space: nowrap; transition: all .2s;
  min-width: 90px; text-align: center;
}
.auth-code-btn:hover { border-color: var(--gold, #c8a45a); }
.auth-code-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Password Hint ── */
.auth-pwd-hint {
  font-size: .7rem;
  color: var(--txt3, #7a776e);
  margin-top: .15rem; margin-bottom: .4rem;
}
.auth-pwd-hint.valid { color: var(--green, #6a9a4a); }
.auth-pwd-hint.invalid { color: var(--red, #c43c3c); }

/* ── Banner ── */
.auth-banner {
  background: linear-gradient(135deg, rgba(0,200,83,.08), rgba(0,229,255,.06));
  border: 1px solid rgba(0,200,83,.2);
  border-radius: 8px;
  padding: .5rem .8rem;
  margin-bottom: .8rem;
  text-align: center;
}
.auth-banner-text {
  font-size: .78rem;
  font-weight: 600;
  color: #66ffb2;
}

/* ── Back Button (forgot password) ── */
.auth-back-btn {
  display: flex; align-items: center; gap: .3rem;
  background: transparent; border: none;
  color: var(--txt, #e8e4dc);
  font-size: .85rem; cursor: pointer;
  padding: .2rem 0; margin-bottom: .8rem;
  font-family: var(--fb);
  transition: color .2s;
}
.auth-back-btn:hover { color: var(--gold, #c8a45a); }

/* ── Toast ── */
.auth-toast {
  position: fixed; top: 20px; left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--bg3, #1a283a);
  border: 1px solid var(--border2, rgba(200,164,90,.14));
  color: var(--txt, #e8e4dc);
  padding: .6rem 1.2rem;
  border-radius: 8px;
  font-size: .8rem;
  z-index: 200001;
  opacity: 0; transition: all .3s;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
}
.auth-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.auth-toast.error { border-color: var(--red, #c43c3c); }
.auth-toast.success { border-color: var(--green, #6a9a4a); }

/* ── Terms text ── */
.auth-terms {
  font-size: .7rem;
  color: var(--txt3, #7a776e);
  text-align: center;
  margin: .5rem 0;
  line-height: 1.5;
}
.auth-terms a {
  color: var(--gold, #c8a45a);
  text-decoration: underline;
  cursor: pointer;
}

/* ── Loading spinner on buttons ── */
.auth-btn-primary.loading,
.auth-btn-google.loading,
.auth-code-btn.loading {
  pointer-events: none; opacity: .7;
}

/* ── Logout Dropdown ── */
.auth-logout-dropdown {
  position: absolute; top: 100%; right: 0;
  margin-top: 4px;
  background: var(--bg3, #1a283a);
  border: 1px solid var(--border2, rgba(200,164,90,.14));
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  z-index: 500;
  min-width: 120px;
  padding: 4px;
}
.auth-logout-dropdown.hidden { display: none; }
.auth-logout-dropdown button {
  width: 100%; padding: .5rem .8rem;
  background: transparent; border: none;
  color: var(--txt, #e8e4dc);
  font-size: .78rem; cursor: pointer;
  border-radius: 6px; font-family: var(--fb);
  text-align: left; white-space: nowrap;
  transition: background .2s;
}
.auth-logout-dropdown button:hover {
  background: rgba(200,164,90,.1);
  color: var(--gold, #c8a45a);
}

/* ═══════════════════════════════════════════════════════════
   OBSERVER PROFILE — War Room Identity Setup
   ═══════════════════════════════════════════════════════════ */

/* ── Badge Area ── */
.obs-badge-area {
  display: flex; flex-direction: column; align-items: center;
  padding: 1.4rem 0 .4rem;
}

.obs-badge-frame {
  position: relative; cursor: pointer;
  width: 100px; height: 100px;
  display: flex; align-items: center; justify-content: center;
  transition: transform .25s;
}
.obs-badge-frame:hover { transform: scale(1.04); }

.obs-badge-ring {
  position: absolute; inset: 0;
  border: 2px solid var(--gold, #c8a45a);
  border-radius: 50%;
  box-shadow:
    0 0 18px rgba(200,164,90,.25),
    0 0 40px rgba(200,164,90,.08),
    inset 0 0 12px rgba(200,164,90,.08);
  animation: obs-ring-pulse 2.8s ease-in-out infinite;
}
.obs-badge-ring::before {
  content: '';
  position: absolute; inset: -6px;
  border: 1px solid rgba(200,164,90,.15);
  border-radius: 50%;
}
.obs-badge-ring::after {
  content: '';
  position: absolute; inset: -12px;
  border: 1px dashed rgba(200,164,90,.08);
  border-radius: 50%;
  animation: obs-ring-rotate 20s linear infinite;
}
@keyframes obs-ring-pulse {
  0%, 100% { box-shadow: 0 0 18px rgba(200,164,90,.25), 0 0 40px rgba(200,164,90,.08), inset 0 0 12px rgba(200,164,90,.08); }
  50%      { box-shadow: 0 0 28px rgba(200,164,90,.45), 0 0 50px rgba(200,164,90,.12), inset 0 0 18px rgba(200,164,90,.15); }
}
@keyframes obs-ring-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.obs-avatar-display {
  width: 82px; height: 82px;
  border-radius: 50%;
  background: rgba(200,164,90,.05);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  position: relative; z-index: 1;
}
.obs-avatar-display img {
  width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%;
  display: block;
}
.obs-avatar-icon {
  font-size: 2.4rem;
  filter: drop-shadow(0 0 8px rgba(200,164,90,.3));
}

.obs-upload-hint {
  position: absolute; bottom: -20px;
  left: 50%; transform: translateX(-50%);
  font-size: .6rem;
  color: var(--txt3, #7a776e);
  white-space: nowrap;
  opacity: .6; transition: all .25s;
  font-family: var(--fb);
}
.obs-badge-frame:hover .obs-upload-hint {
  opacity: 1;
  color: var(--gold, #c8a45a);
}

/* ── Rank Tags ── */
.obs-rank-tag {
  margin-top: 1.4rem;
  font-family: var(--fd, 'Orbitron', monospace);
  font-size: .52rem;
  letter-spacing: .35em;
  color: var(--gold, #c8a45a);
  opacity: .5;
  text-transform: uppercase;
}
.obs-rank-title {
  font-family: var(--fd, 'Orbitron', monospace);
  font-size: 1.1rem;
  letter-spacing: .15em;
  color: var(--gold, #c8a45a);
  margin-top: .1rem;
  font-weight: 700;
  text-shadow: 0 0 20px rgba(200,164,90,.2);
}

/* ── Codename Field ── */
.obs-field-wrap {
  padding: 0 1.5rem;
  margin-top: 1.2rem;
}
.obs-label {
  display: block;
  font-size: .62rem;
  color: var(--txt3, #7a776e);
  margin-bottom: .4rem;
  font-family: var(--fm, 'JetBrains Mono', monospace);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.obs-input {
  width: 100%; padding: .65rem .8rem;
  background: var(--bg, #101824);
  border: 1px solid var(--border2, rgba(200,164,90,.14));
  color: var(--gold, #c8a45a);
  font-size: .88rem;
  border-radius: 8px;
  font-family: var(--fd, 'Orbitron', monospace);
  text-align: center;
  letter-spacing: .1em;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.obs-input::placeholder {
  color: var(--txt3, #7a776e);
  font-family: var(--fb);
  font-size: .76rem;
  letter-spacing: normal;
}
.obs-input:focus {
  border-color: var(--gold, #c8a45a);
  box-shadow: 0 0 12px rgba(200,164,90,.15);
}

/* ── Enter Button ── */
.obs-enter-btn {
  display: block;
  width: calc(100% - 3rem);
  margin: 1.4rem auto 1.6rem;
  padding: .72rem;
  background: linear-gradient(135deg, rgba(200,164,90,.12), rgba(200,164,90,.04));
  border: 1.5px solid var(--gold, #c8a45a);
  color: var(--gold, #c8a45a);
  font-family: var(--fd, 'Orbitron', monospace);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  border-radius: 8px;
  cursor: pointer;
  transition: all .3s;
  position: relative;
  overflow: hidden;
}
.obs-enter-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(200,164,90,.12) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform .6s ease;
}
.obs-enter-btn:hover::before { transform: translateX(100%); }
.obs-enter-btn:hover {
  background: linear-gradient(135deg, rgba(200,164,90,.22), rgba(200,164,90,.08));
  box-shadow: 0 0 24px rgba(200,164,90,.2), inset 0 0 12px rgba(200,164,90,.05);
}

/* ── Auth Button Avatar ── */
.auth-btn-avatar {
  width: 20px; height: 20px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--gold, #c8a45a);
  vertical-align: middle;
}

/* ── Observer Comment Avatar in social ── */
.obs-comment-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--gold, #c8a45a);
}

/* ═══ Responsive ═══ */
@media (max-width: 480px) {
  .auth-overlay { padding: .5rem; }
  .auth-modal-box {
    max-width: 100%; border-radius: 10px;
    max-height: 95vh;
  }
  .auth-header { padding: 1.2rem 1rem .4rem; }
  .auth-benefit-card { margin: .5rem 1rem .2rem; padding: .5rem .6rem; }
  .auth-benefit-title { font-size: .78rem; }
  .auth-benefit-sub { font-size: .65rem; }
  .auth-benefit-model { font-size: .6rem; padding: 2px 6px; }
  .auth-view { padding: .8rem 1rem 1.2rem; }
  .auth-tabs-bar { margin: .6rem 1rem 0; }
  .obs-badge-frame { width: 88px; height: 88px; }
  .obs-avatar-display { width: 72px; height: 72px; }
  .obs-field-wrap { padding: 0 1rem; }
  .obs-enter-btn { width: calc(100% - 2rem); }
}
