/* Login / Register — game_tgn_0043 INSTANT ARCADE */

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

.g43-auth-card {
  width: 100%;
  max-width: 420px;
  padding: 28px 24px 30px;
  background: var(--g43-panel, #141a24);
  border: 1px solid var(--g43-line, rgba(255, 255, 255, 0.1));
  border-radius: 10px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
}

.g43-auth-kicker {
  margin: 0 0 8px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--g43-hot, #ffb020);
  text-align: center;
}

.g43-auth-head {
  margin: 0 0 1.25rem;
  font-family: var(--g43-font);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  color: var(--g43-ink, #f4f7fb);
}

.g43-auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--g43-line, rgba(255, 255, 255, 0.1));
}

body.g43-body .g43-auth-tab {
  flex: 1;
  margin: 0 0 -1px;
  padding: 11px 12px;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--g43-muted, #94a3b8);
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

body.g43-body .g43-auth-tab:hover {
  color: var(--g43-ink, #f4f7fb);
}

body.g43-body .g43-auth-tab.active {
  color: var(--g43-play, #c8f542);
  border-bottom-color: var(--g43-play, #c8f542);
  background: rgba(200, 245, 66, 0.08);
}

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

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

.g43-auth-alert.show { display: block; }
.g43-auth-alert.success {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.35);
}
.g43-auth-alert.error {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.35);
}

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

.g43-form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--g43-muted, #94a3b8);
}

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

.g43-form-input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--g43-ink, #f4f7fb);
  background: var(--g43-elev, #1c2433);
  border: 1px solid var(--g43-line, rgba(255, 255, 255, 0.1));
  border-radius: 6px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  -webkit-appearance: none;
  appearance: none;
}

.g43-form-input::placeholder {
  color: #64748b;
}

.g43-form-input:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.g43-form-input:focus {
  border-color: var(--g43-play, #c8f542);
  box-shadow: 0 0 0 3px rgba(200, 245, 66, 0.18);
}

/* Chrome autofill 默认浅底，强制贴合暗色主题 */
.g43-form-input:-webkit-autofill,
.g43-form-input:-webkit-autofill:hover,
.g43-form-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--g43-ink, #f4f7fb);
  caret-color: var(--g43-ink, #f4f7fb);
  box-shadow: 0 0 0 1000px var(--g43-elev, #1c2433) inset;
  transition: background-color 99999s ease-out;
}

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

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

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

body.g43-body .g43-pwd-toggle {
  position: absolute;
  right: 0;
  top: 0;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--g43-muted, #94a3b8);
  cursor: pointer;
}

body.g43-body .g43-pwd-toggle:hover {
  color: var(--g43-play, #c8f542);
}

.g43-pwd-icon {
  display: block;
  width: 18px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  position: relative;
}

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

body.g43-body .g43-pwd-toggle.is-shown .g43-pwd-icon,
body.g43-body .g43-pwd-toggle[aria-pressed="true"] .g43-pwd-icon {
  opacity: 0.55;
}

.g43-form-input.has-toggle {
  padding-right: 46px;
}

.g43-auth-forgot {
  margin: -2px 0 14px;
  text-align: right;
  font-size: 0.8rem;
}

.g43-auth-forgot a {
  color: var(--g43-muted, #94a3b8);
  text-decoration: none;
  font-weight: 600;
}

.g43-auth-forgot a:hover {
  color: var(--g43-play, #c8f542);
}

/* 提交 CTA：提高优先级，避免被全局 button 规则盖掉 */
body.g43-body .g43-btn-auth,
body.g43-body button.g43-btn-auth {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  margin-top: 0.25rem;
  padding: 0 16px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--g43-play-ink, #0b0e13);
  background: var(--g43-play, #c8f542);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  transition: filter 0.18s ease, transform 0.15s ease;
}

body.g43-body .g43-btn-auth:hover,
body.g43-body button.g43-btn-auth:hover {
  color: var(--g43-play-ink, #0b0e13);
  filter: brightness(1.08);
  transform: translateY(-1px);
}

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

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

body.g43-body .g43-btn-auth.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(11, 14, 19, 0.25);
  border-top-color: var(--g43-play-ink, #0b0e13);
  border-radius: 50%;
  animation: g43-auth-spin 0.7s linear infinite;
}

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

.g43-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1.5rem 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--g43-muted, #94a3b8);
}

.g43-auth-divider::before,
.g43-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--g43-line, rgba(255, 255, 255, 0.1));
}

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

body.g43-body .g43-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: 0;
  border-radius: 6px;
  cursor: pointer;
}

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

@media (max-width: 480px) {
  .g43-auth-card {
    padding: 22px 18px 24px;
  }

  .g43-auth-head {
    font-size: 1.28rem;
  }
}

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

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

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

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

.g43-login-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 12, 0.72);
  backdrop-filter: blur(4px);
}

.g43-login-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  border-radius: 10px;
}

body.g43-body .g43-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: var(--g43-muted, #94a3b8);
  background: var(--g43-elev, #1c2433);
  border: 1px solid var(--g43-line, rgba(255, 255, 255, 0.1));
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

body.g43-body .g43-login-modal__close:hover {
  color: var(--g43-play-ink, #0b0e13);
  background: var(--g43-play, #c8f542);
  border-color: var(--g43-play, #c8f542);
}

.g43-auth-card--modal {
  margin: 0;
  max-width: none;
  padding-top: 32px;
}

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