/* ================================================
   TPSNIPER AURORA — AUTH PAGES (shared)
   Used by: index.html (login), register.html,
            forgot-password.html, reset-password.html
   ================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-void: #0A0B14;
  --bg-surface: #11131F;
  --bg-elevated: #171A2B;
  --bg-input: rgba(255, 255, 255, 0.03);

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(139, 92, 246, 0.3);
  --border-input: rgba(255, 255, 255, 0.09);
  --border-input-focus: rgba(99, 102, 241, 0.5);

  --accent-primary: #6366F1;
  --accent-purple: #8B5CF6;
  --accent-pink: #EC4899;
  --accent-blue: #3B82F6;
  --accent-success: #10B981;
  --accent-warning: #F59E0B;
  --accent-danger: #EF4444;

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-disabled: #475569;

  --gradient-primary: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  --gradient-text: linear-gradient(135deg, #F8FAFC 0%, #C7D2FE 100%);
  --gradient-accent-text: linear-gradient(135deg, #818CF8 0%, #C084FC 100%);

  --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-primary);
  background: var(--bg-void);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  padding-bottom: 88px;
}

/* Ambient background orbs */
body::before {
  content: "";
  position: fixed;
  top: -15%;
  left: -10%;
  width: 55%;
  height: 55%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, transparent 60%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: float-orb-1 20s ease-in-out infinite;
}

body::after {
  content: "";
  position: fixed;
  bottom: -15%;
  right: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 60%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: float-orb-2 25s ease-in-out infinite;
}

@keyframes float-orb-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, 40px) scale(1.1); }
  66% { transform: translate(-30px, 60px) scale(0.95); }
}

@keyframes float-orb-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-60px, -40px) scale(1.15); }
}

/* Grid overlay */
.grid-overlay {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.5) 0%, transparent 80%);
  pointer-events: none;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ================================================
   LAYOUT
   ================================================ */

.auth-shell {
  min-height: calc(100vh - 100px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
  z-index: 2;
}

.auth-container {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* ================================================
   BRAND HEADER
   ================================================ */

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.auth-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.auth-brand-mark::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
}

.auth-brand-mark svg {
  width: 20px;
  height: 20px;
  color: white;
  position: relative;
  z-index: 1;
}

.auth-brand span {
  background: var(--gradient-accent-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-left: 2px;
}

/* ================================================
   CARD
   ================================================ */

.auth-card {
  width: 100%;
  padding: 36px 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.4), transparent);
}

.auth-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

.auth-card > * {
  position: relative;
  z-index: 1;
}

.auth-card h2 {
  font-size: 26px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.auth-card .subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ================================================
   INFO BOXES (plan, referral)
   ================================================ */

.info-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: #C7D2FE;
  margin-bottom: 14px;
}

.info-box strong {
  color: var(--text-primary);
  font-weight: 700;
}

.info-box-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #A5B4FC;
}

.info-box.referral {
  background: rgba(236, 72, 153, 0.06);
  border-color: rgba(236, 72, 153, 0.15);
  color: #FBCFE8;
}

.info-box.referral .info-box-icon {
  color: #F9A8D4;
}

.hidden {
  display: none !important;
}

/* ================================================
   FORM
   ================================================ */

form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.field input {
  width: 100%;
  padding: 13px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s var(--ease-out);
  outline: none;
}

.field input::placeholder {
  color: var(--text-muted);
}

.field input:hover {
  border-color: var(--border-default);
  background: rgba(255, 255, 255, 0.04);
}

.field input:focus {
  border-color: var(--border-input-focus);
  background: rgba(99, 102, 241, 0.04);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-primary);
  -webkit-box-shadow: 0 0 0 1000px var(--bg-elevated) inset;
  caret-color: var(--text-primary);
}

/* ================================================
   BUTTONS
   ================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s var(--ease-out);
  position: relative;
  overflow: hidden;
  width: 100%;
  margin-top: 6px;
}

.btn-primary {
  color: white;
  background: var(--gradient-primary);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4), inset 0 1px 0 rgba(255,255,255,0.25);
}

.btn-primary:hover:not(:disabled)::before {
  opacity: 1;
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ================================================
   MESSAGES
   ================================================ */

.message {
  margin-top: 14px;
  padding: 0;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  min-height: 0;
  transition: all 0.2s var(--ease-out);
}

.message:not(:empty) {
  padding: 11px 14px;
  border-radius: var(--radius-md);
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #FCA5A5;
}

.message.success {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
  color: #6EE7B7;
}

/* ================================================
   SECONDARY LINKS
   ================================================ */

.auth-links {
  margin-top: 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-links a {
  color: #A5B4FC;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s var(--ease-out);
}

.auth-links a:hover {
  color: #C7D2FE;
}

.bottom-link {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
}

.bottom-link a {
  color: #A5B4FC;
  font-weight: 600;
  margin-left: 4px;
  transition: color 0.2s var(--ease-out);
}

.bottom-link a:hover {
  color: #C7D2FE;
}

/* ================================================
   FOOTER
   ================================================ */

.auth-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 14px 20px;
  background: linear-gradient(180deg, rgba(10, 11, 20, 0.7), rgba(10, 11, 20, 0.96));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
}

.auth-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.auth-footer a {
  color: #A5B4FC;
  transition: color 0.2s var(--ease-out);
}

.auth-footer a:hover {
  color: #C7D2FE;
}

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 480px) {
  body {
    padding-bottom: 110px;
  }

  .auth-shell {
    padding: 24px 16px;
    min-height: calc(100vh - 120px);
  }

  .auth-card {
    padding: 28px 22px;
  }

  .auth-card h2 {
    font-size: 22px;
  }

  .auth-brand {
    font-size: 19px;
  }

  .auth-brand-mark {
    width: 36px;
    height: 36px;
  }

  .auth-footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .auth-footer {
    padding: 12px 16px;
  }
}
