/* Login / Register — game_tgn_0026 */

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

.g26-auth-card {
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
  background: var(--g26-surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--g26-radius);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

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

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

.g26-auth-tab {
  flex: 1;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0.06em;
  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;
}

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

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

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

.g26-auth-alert.show { display: block; }
.g26-auth-alert.success {
  color: #1e5631;
  background: #e8f5e9;
  border-color: #27ae60;
}
.g26-auth-alert.error {
  color: #7b1e1e;
  background: #fdecea;
  border-color: #f87171;
}

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

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

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

.g26-form-input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--star-white);
  background: rgba(22, 22, 34, 0.92);
  border: 1px solid var(--line-soft);
  border-radius: var(--g26-radius-sm);
  outline: none;
  transition: border-color 0.18s ease;
}

.g26-form-input:focus {
  border-color: var(--g26-accent);
}

.g26-form-group.has-error .g26-form-input {
  border-color: #f87171;
}

.g26-form-error {
  display: none;
  margin-top: 4px;
  font-size: 0.8125rem;
  color: #f87171;
}

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

.g26-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;
}

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

.g26-btn-auth {
  width: 100%;
  height: 48px;
  margin-top: 0.5rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, var(--g26-accent), var(--comet-cyan));
  border: none;
  border-radius: var(--g26-radius-sm);
  cursor: pointer;
  position: relative;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.g26-btn-auth:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

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

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

.g26-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: g26-auth-spin 0.7s linear infinite;
}

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

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

.g26-auth-divider::before,
.g26-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line-soft);
}

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

.g26-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;
}

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

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

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

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

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

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

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

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

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

.g26-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(--star-white);
  background: var(--space-blue);
  border: 2px solid var(--star-white);
  cursor: pointer;
}

.g26-login-modal__close:hover {
  color: var(--space-blue);
  background: #f87171;
  border-color: #f87171;
}

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

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