/* Login / Register — game_tgn_0029 */

.g29-auth-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 48px;
}

.g29-auth-card {
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
  background: var(--space-blue);
  border: 1px solid var(--g29-border-mid);
  border-radius: var(--g29-radius-lg);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.g29-auth-head {
  margin: 0 0 1.5rem;
  font-family: var(--g29-font);
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  color: var(--g29-ink);
}

.g29-auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--g29-border-mid);
}

.g29-auth-tab {
  flex: 1;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.g29-auth-tab.active {
  color: var(--comet-cyan);
  border-bottom-color: var(--nebula-pink);
}

.g29-auth-panel { display: none; }
.g29-auth-panel.active { display: block; }

.g29-auth-alert {
  display: none;
  padding: 12px 14px;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  border: 2px solid transparent;
}

.g29-auth-alert.show { display: block; }
.g29-auth-alert.success {
  color: #1e5631;
  background: #e8f5e9;
  border-color: #27ae60;
}
.g29-auth-alert.error {
  color: #7b1e1e;
  background: #fdecea;
  border-color: var(--g29-accent-text);
}

.g29-form-group {
  margin-bottom: 1rem;
}

.g29-form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
}

.g29-form-input-wrap {
  position: relative;
}

.g29-form-input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--g29-ink);
  background: var(--g29-surface);
  border: 1px solid var(--g29-border-mid);
  border-radius: var(--g29-radius);
  outline: none;
  transition: border-color 0.18s ease;
}

.g29-form-input:focus {
  border-color: var(--nebula-pink);
}

.g29-form-group.has-error .g29-form-input {
  border-color: #e74c3c;
}

.g29-form-error {
  display: none;
  margin-top: 4px;
  font-size: 0.8125rem;
  color: var(--g29-accent-text);
}

.g29-form-group.has-error .g29-form-error { display: block; }

.g29-pwd-toggle {
  position: absolute;
  right: 0;
  top: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--ink-muted);
  cursor: pointer;
}

.g29-form-input.has-toggle {
  padding-right: 44px;
}

.g29-btn-auth {
  width: 100%;
  height: 48px;
  margin-top: 0.5rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--star-white);
  background: linear-gradient(135deg, var(--nebula-pink), var(--comet-cyan));
  border: none;
  border-radius: var(--g29-radius);
  cursor: pointer;
  position: relative;
  transition: background 0.18s ease, color 0.18s ease;
}

.g29-btn-auth:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.g29-btn-auth.loading {
  pointer-events: none;
  opacity: 0.75;
}

.g29-btn-auth.loading .g29-btn-auth-text { visibility: hidden; }

.g29-btn-auth.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: g29-auth-spin 0.7s linear infinite;
}

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

.g29-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1.5rem 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
}

.g29-auth-divider::before,
.g29-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--g29-paper-deep);
}

.g29-social-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.g29-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 44px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.g29-social-btn--fb { background: #1877f2; }
.g29-social-btn--google { background: #ea4335; }
.g29-social-btn--twitter { background: #1da1f2; }
.g29-social-btn--steam { background: #171a21; }

@media (max-width: 480px) {
  .g29-auth-card {
    padding: 1.5rem;
    border-width: 3px;
  }

  .g29-auth-head {
    font-size: 1.5rem;
  }
}

/* Login modal */
.g29-login-modal {
  position: fixed;
  inset: 0;
  z-index: 25000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.g29-login-modal.is-open {
  display: flex;
}

.g29-login-modal[hidden] {
  display: none !important;
}

.g29-login-modal.is-open[hidden] {
  display: flex !important;
}

.g29-login-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.6);
}

.g29-login-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.g29-login-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--g29-ink);
  background: var(--space-blue);
  border: 1px solid var(--g29-border-mid);
  border-radius: var(--g29-radius);
  cursor: pointer;
}

.g29-login-modal__close:hover {
  color: var(--space-dark);
  background: var(--comet-cyan);
  border-color: var(--comet-cyan);
}

.g29-auth-card--modal {
  margin: 0;
  max-width: none;
}

body.g29-login-open {
  overflow: hidden;
}
