/* Trade Club — premium register / login */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

.trade-auth-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.trade-auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.55;
  animation: tradeOrbFloat 14s ease-in-out infinite;
}

.trade-auth-orb--1 {
  width: min(420px, 55vw);
  height: min(420px, 55vw);
  top: -8%;
  left: -6%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.85) 0%, transparent 70%);
}

.trade-auth-orb--2 {
  width: min(380px, 50vw);
  height: min(380px, 50vw);
  top: 10%;
  right: -10%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.75) 0%, transparent 70%);
  animation-delay: -4s;
}

.trade-auth-orb--3 {
  width: min(320px, 45vw);
  height: min(320px, 45vw);
  bottom: -12%;
  left: 30%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.45) 0%, transparent 70%);
  animation-delay: -8s;
}

@keyframes tradeOrbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(12px, -18px) scale(1.05); }
  66% { transform: translate(-10px, 14px) scale(0.98); }
}

body.auth-trade-page {
  position: relative;
  background-color: #020617 !important;
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -30%, rgba(99, 102, 241, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 50%, rgba(168, 85, 247, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 40% at 0% 80%, rgba(34, 211, 238, 0.08), transparent 45%),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%) !important;
}

body.auth-trade-page::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, black 20%, transparent 100%);
}

body.auth-trade-page {
  display: flex !important;
  flex-direction: column;
  align-items: stretch !important;
  justify-content: center !important;
}

.trade-auth-layout {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  flex: 1 1 auto;
  max-height: 100%;
  padding: 0 4px;
}

@media (min-width: 641px) {
  body.auth-trade-page {
    padding: 24px 32px !important;
  }
}

/* Mobile register — compact + scroll inside card only when needed */
@media (max-width: 640px) {
  body.auth-trade-register .trade-auth-layout {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-height: 100%;
    align-self: stretch;
  }

  body.auth-trade-register .auth-wrapper {
    max-height: calc(100dvh - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
  }

  body.auth-trade-register .auth-card {
    max-height: calc(100dvh - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }

  body.auth-trade-register .trade-brand-logo {
    width: 52px;
    height: 52px;
    margin-bottom: 8px;
  }

  body.auth-trade-register .game-title {
    font-size: 1.35rem !important;
  }

  body.auth-trade-register .trade-auth-tagline {
    font-size: 8px;
    letter-spacing: 0.22em;
    margin-top: 4px;
  }

  body.auth-trade-register .trade-auth-subtitle {
    font-size: 11px;
    margin-top: 6px;
  }

  body.auth-trade-register .trade-auth-pills {
    display: none;
  }

  body.auth-trade-register .trade-auth-hero {
    margin-bottom: 0.65rem;
  }

  body.auth-trade-register .input-group {
    margin-bottom: 8px !important;
  }

  body.auth-trade-register .input-field {
    min-height: 42px !important;
    padding: 10px 12px 10px 40px !important;
    font-size: 14px !important;
  }

  body.auth-trade-register .terms-row {
    margin-bottom: 0.65rem !important;
  }

  body.auth-trade-register .terms-text {
    font-size: 10px;
    line-height: 1.35;
  }

  body.auth-trade-register .btn-primary {
    min-height: 44px;
    padding: 11px 16px;
    font-size: 13px;
  }

  body.auth-trade-register .trade-auth-footer {
    margin-top: 0.75rem;
    padding-top: 0.65rem;
  }
}

@media (max-width: 640px) and (max-height: 740px) {
  body.auth-trade-register .trade-auth-subtitle {
    display: none;
  }
}

@keyframes tradeFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

body.auth-trade-page .auth-wrapper {
  animation: tradeFadeUp 0.55s ease 0.05s both;
}

body.auth-trade-page .auth-card {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  border-radius: 22px !important;
  border: 1px solid rgba(129, 140, 248, 0.22) !important;
  background: linear-gradient(
    165deg,
    rgba(15, 23, 42, 0.82) 0%,
    rgba(15, 23, 42, 0.65) 100%
  ) !important;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 32px 64px -16px rgba(0, 0, 0, 0.65),
    0 0 48px rgba(99, 102, 241, 0.12) !important;
}

body.auth-trade-page .auth-card::before {
  height: 3px !important;
  background: linear-gradient(
    90deg,
    transparent,
    #6366f1 20%,
    #22d3ee 50%,
    #a855f7 80%,
    transparent
  ) !important;
  animation: tradeShimmer 4s ease-in-out infinite;
}

@keyframes tradeShimmer {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

.trade-auth-hero {
  text-align: center;
  margin-bottom: 1.15rem;
}

.trade-brand-logo {
  position: relative;
  width: 76px;
  height: 76px;
  margin: 0 auto 16px;
  padding: 3px;
  border-radius: 20px;
  background: linear-gradient(135deg, #6366f1, #22d3ee, #a855f7);
  background-size: 200% 200%;
  animation: tradeLogoGlow 5s ease infinite;
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.35);
}

@keyframes tradeLogoGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.trade-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  background: #020617;
  display: block;
}

.trade-brand-logo::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 22px;
  border: 1px solid rgba(129, 140, 248, 0.35);
  pointer-events: none;
  opacity: 0.6;
}

body.auth-trade-page .game-title {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-weight: 800 !important;
  font-size: 1.75rem !important;
  letter-spacing: -0.03em !important;
  background: linear-gradient(135deg, #ffffff 0%, #c7d2fe 45%, #67e8f9 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
}

.trade-auth-tagline {
  margin: 8px 0 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #818cf8;
}

.trade-auth-subtitle {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
}

.trade-auth-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.trade-auth-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.trade-auth-pill i {
  color: #34d399;
  margin-right: 4px;
  font-size: 9px;
}

body.auth-trade-page .input-field {
  border-radius: 12px !important;
  background: rgba(2, 6, 23, 0.55) !important;
  border-color: rgba(148, 163, 184, 0.15) !important;
}

body.auth-trade-page .input-field:focus {
  border-color: rgba(99, 102, 241, 0.65) !important;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.25),
    0 0 0 3px rgba(99, 102, 241, 0.2),
    0 0 20px rgba(99, 102, 241, 0.15) !important;
}

body.auth-trade-page .btn-primary:not(:disabled) {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 35%, #8b5cf6 70%, #a855f7 100%) !important;
  background-size: 200% 100%;
  border-radius: 12px !important;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  box-shadow:
    0 8px 24px rgba(99, 102, 241, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-position 0.4s ease !important;
}

body.auth-trade-page .btn-primary:not(:disabled):hover {
  background-position: 100% 0 !important;
  box-shadow:
    0 12px 32px rgba(139, 92, 246, 0.45),
    0 0 24px rgba(34, 211, 238, 0.15) !important;
}

.trade-auth-footer {
  text-align: center;
  margin-top: 1.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.trade-auth-footer p {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
}

.trade-auth-footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #a5b4fc;
  text-decoration: none;
  transition: color 0.2s ease, gap 0.2s ease;
}

.trade-auth-footer a:hover {
  color: #67e8f9;
  gap: 10px;
}

@media (prefers-reduced-motion: reduce) {
  .trade-auth-orb,
  body.auth-trade-page .auth-card::before,
  .trade-brand-logo {
    animation: none !important;
  }
}
