/* ═══════════════════════════════════════════
   auth.css — Auth modal, Turnstile, new elements
   Add this at the end of main.css
   ═══════════════════════════════════════════ */

/* ─── Auth Modal ─── */
.auth-modal-overlay {
  backdrop-filter: blur(12px);
}

.auth-modal {
  width: 100%;
  max-width: 400px;
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 14px;
  background: none;
  border: none;
  color: var(--text3);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s, border-bottom 0.2s;
  border-bottom: 2px solid transparent;
}

.auth-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
}

.auth-logo {
  font-size: 22px;
  font-weight: 800;
  font-family: 'Syne', sans-serif;
  background: linear-gradient(135deg, #7c5cfc, #fc5c7d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
}

.auth-sub {
  text-align: center;
  color: var(--text3);
  font-size: 13px;
  margin-top: -8px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-field input {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text1);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
}

.form-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.12);
}

.auth-error {
  color: var(--red);
  font-size: 13px;
  min-height: 16px;
  text-align: center;
}

.btn-full { width: 100%; justify-content: center; }

/* Turnstile centering */
.cf-turnstile {
  display: flex;
  justify-content: center;
}

/* ─── Loading spinner ─── */
.loading-posts {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Typing indicator ─── */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  margin: 4px 0;
}

.typing-indicator span {
  width: 7px;
  height: 7px;
  background: var(--text3);
  border-radius: 50%;
  animation: bounce 1.2s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
  40%            { transform: scale(1);   opacity: 1;   }
}

/* ─── Game session code UI ─── */
.game-session-wrap {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text2);
}

.game-session-code {
  font-family: 'DM Mono', monospace;
  font-weight: 700;
  color: var(--accent);
  font-size: 15px;
  letter-spacing: 0.1em;
}

.game-join-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.game-join-row input {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text1);
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  outline: none;
}

.game-join-row input:focus { border-color: var(--accent); }