/* Login / Register — game_tgn_0030 */

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

.g30-auth-card {
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
  background: var(--g30-card);
  border: 1px solid var(--g30-border);
  box-shadow: 6px 6px 0 rgba(30, 58, 138, 0.12);
}

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

.g30-auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--g30-ink);
}

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

.g30-auth-tab.active {
  color: var(--g30-sage-dark);
  border-bottom-color: var(--g30-sage-dark);
}

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

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

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

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

.g30-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);
}

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

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

.g30-form-input:focus {
  border-color: var(--g30-sage-dark);
}

.g30-form-group.has-error .g30-form-input {
  border-color: var(--g30-sage-dark);
}

.g30-form-error {
  display: none;
  margin-top: 4px;
  font-size: 0.8125rem;
  color: var(--g30-sage-dark);
}

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

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

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

.g30-btn-auth {
  width: 100%;
  height: 48px;
  margin-top: 0.5rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0.08em;
  color: #fff;
  background: var(--g30-sage);
  border: 2px solid var(--g30-ink);
  cursor: pointer;
  position: relative;
  transition: background 0.18s ease, color 0.18s ease;
}

.g30-btn-auth:hover {
  background: var(--g30-ink);
  border-color: var(--g30-ink);
}

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

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

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

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

.g30-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);
}

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

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

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

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

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

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

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

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

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

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

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

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

.g30-login-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--g30-ink);
  background: var(--g30-card);
  border: 2px solid var(--g30-ink);
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.g30-login-modal__close:hover {
  color: #fff;
  background: var(--g30-sage-dark);
  border-color: var(--g30-sage-dark);
}

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

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