/* Login / Register — game_tgn_0052 CONTAINER YARD */

.g52-auth-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 48px;
  min-height: 60vh;
}

.g52-auth-card {
  width: 100%;
  max-width: 420px;
  padding: 28px 24px 30px;
  background: #e4ebf1;
  color: #121820;
  border: 1px solid rgba(18,24,32,0.16);
  border-radius: 3px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  position: relative;
}

.g52-auth-kicker {
  margin: 0 0 6px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f59e0b;
}

.g52-auth-head {
  margin: 0 0 18px;
  font-family: var(--g52-font, system-ui, sans-serif);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  color: #121820;
}

.g52-auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(18,24,32,0.16);
}

.g52-auth-tab {
  flex: 1;
  padding: 10px 12px;
  font: inherit;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5a6570;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}

.g52-auth-tab:hover { color: #121820; }

.g52-auth-tab.active {
  color: #121820;
  border-bottom-color: #f59e0b;
  background: color-mix(in srgb, #f59e0b 12%, transparent);
}

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

.g52-auth-alert {
  display: none;
  padding: 10px 12px;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  border: 1px solid transparent;
  border-radius: 3px;
}
.g52-auth-alert.show { display: block; }
.g52-auth-alert.success {
  color: #14532d;
  background: #ecfdf3;
  border-color: #86efac;
}
.g52-auth-alert.error {
  color: #7f1d1d;
  background: #fef2f2;
  border-color: #fca5a5;
}

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

.g52-form-group label {
  display: block;
  margin-bottom: 6px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5a6570;
}

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

.g52-form-input {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  font: inherit;
  font-size: 0.9375rem;
  color: #121820;
  background: #ffffff;
  border: 2px solid rgba(18,24,32,0.18);
  border-radius: 3px;
  outline: none;
  box-sizing: border-box;
}

.g52-form-input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px color-mix(in srgb, #f59e0b 25%, transparent);
}

.g52-form-group.has-error .g52-form-input {
  border-color: #dc2626;
  box-shadow: none;
}

.g52-form-error {
  display: none;
  margin-top: 4px;
  font-size: 0.8125rem;
  color: #b91c1c;
}
.g52-form-group.has-error .g52-form-error { display: block; }

.g52-pwd-toggle {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 44px;
  height: auto;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #5a6570;
  cursor: pointer;
  transform: none;
}
.g52-pwd-toggle:hover { color: #f59e0b; }

.g52-pwd-icon {
  display: block;
  width: 18px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  position: relative;
}
.g52-pwd-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: currentColor;
}

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

.g52-auth-forgot {
  margin: -4px 0 12px;
  text-align: right;
  font-size: 0.8rem;
}
.g52-auth-forgot a { color: #5a6570; text-decoration: none; }
.g52-auth-forgot a:hover { color: #f59e0b; }

.g52-btn-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  margin-top: 0.5rem;
  padding: 0 14px;
  font: inherit;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #121820;
  background: #f59e0b;
  border: 2px solid #f59e0b;
  border-radius: 3px;
  cursor: pointer;
  position: relative;
}
.g52-btn-auth:hover { filter: brightness(1.06); }
.g52-btn-auth.loading {
  pointer-events: none;
  opacity: 0.75;
}
.g52-btn-auth.loading .g52-btn-auth-text { visibility: hidden; }
.g52-btn-auth.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border: 2px solid color-mix(in srgb, #121820 25%, transparent);
  border-top-color: #121820;
  border-radius: 50%;
  animation: g52-auth-spin 0.7s linear infinite;
}
@keyframes g52-auth-spin { to { transform: rotate(360deg); } }

.g52-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1.35rem 0;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5a6570;
}
.g52-auth-divider::before,
.g52-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(18,24,32,0.16);
}

.g52-social-btns { display: flex; flex-direction: column; gap: 8px; }
.g52-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 42px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}
.g52-social-btn--fb { background: #1877f2; }
.g52-social-btn--google { background: #ea4335; }
.g52-social-btn--twitter { background: #1da1f2; }
.g52-social-btn--steam { background: #171a21; }

@media (max-width: 480px) {
  .g52-auth-card { padding: 22px 16px 24px; }
  .g52-auth-head { font-size: 1.28rem; }
}

/* Login modal */
.g52-login-modal {
  position: fixed;
  inset: 0;
  z-index: 25000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.g52-login-modal.is-open { display: flex; }
.g52-login-modal[hidden] { display: none !important; }
.g52-login-modal.is-open[hidden] { display: flex !important; }

.g52-login-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14,22,32,0.78);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.g52-login-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  animation: g52-modal-in 0.22s ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .g52-login-modal__panel { animation: none; }
}
@keyframes g52-modal-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.g52-login-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
  color: #121820;
  background: #e4ebf1;
  border: 1px solid rgba(18,24,32,0.16);
  border-radius: 3px;
  cursor: pointer;
}
.g52-login-modal__close:hover {
  color: #121820;
  background: #f59e0b;
  border-color: #f59e0b;
}

.g52-auth-card--modal {
  margin: 0;
  max-width: none;
  padding-top: 32px;
  padding-right: 28px;
}
.g52-auth-card--modal .g52-auth-head { padding-right: 28px; }

body.g52-login-open { overflow: hidden; }
body.g52-login-open .back-to-top,
body.g52-login-open .g52-back-top {
  visibility: hidden !important;
  pointer-events: none;
}