/* ── TPF Auth Overlay ──
   Premium glassmorphic login/signup modal.
*/

/* Overlay backdrop */
.auth-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16,1,0.3,1);
  overflow: hidden;
}
.auth-overlay.open { opacity: 1; pointer-events: all; }

/* Modal */
.auth-modal {
  width: 100%; max-width: 400px; margin: 24px;
  background: #000;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  padding: 44px 36px 36px;
  position: relative; z-index: 10;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.45s cubic-bezier(0.16,1,0.3,1), opacity 0.4s ease;
  opacity: 0;
  box-shadow: 0 40px 80px rgba(0,0,0,0.9);
  overflow: hidden;
}
/* 3D ribbon canvases inside each panel */
.auth-panel-canvas {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none; opacity: 0.5;
}
.auth-modal::before {
  content: ''; position: absolute; inset: 0;
  background: none;
  pointer-events: none; z-index: 0;
}
.auth-modal > * { position: relative; z-index: 1; }
.auth-overlay.open .auth-modal { transform: translateY(0) scale(1); opacity: 1; }

/* Top bar: back + close */
.auth-topbar {
  position: absolute; top: 16px; left: 16px; right: 16px;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 5;
}
.auth-back, .auth-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: transparent; border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.2s, border-color 0.2s;
  color: rgba(255,255,255,0.4);
  padding: 0;
}
.auth-back:hover, .auth-close:hover {
  background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8);
}
.auth-back svg, .auth-close svg { width: 14px; height: 14px; }
.auth-back.hidden { opacity: 0; pointer-events: none; }

/* Brand mark */
.auth-brand {
  text-align: center; margin-bottom: 32px;
}
.auth-brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.15);
  margin-bottom: 0;
  box-shadow: 0 8px 32px rgba(255,255,255,0.05), inset 0 2px 4px rgba(255,255,255,0.2);
  overflow: hidden;
}
.auth-brand-mark canvas { width: 100%; height: 100%; object-fit: contain; }

/* Header */
.auth-header { text-align: center; margin-bottom: 28px; }
.auth-header h2 {
  font-family: 'Manrope', sans-serif; font-weight: 700;
  font-size: 28px; color: #fff; letter-spacing: -0.03em; margin-bottom: 6px;
}
.auth-header p { font-size: 15px; color: rgba(255,255,255,0.4); line-height: 1.5; }

/* Social buttons */
.auth-socials { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 32px; }
.auth-social {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 18px 12px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff; font-size: 14px; font-weight: 600; text-align: center;
  cursor: pointer; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Inter', sans-serif; text-decoration: none; position: relative; overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2), inset 0 1px 1px rgba(255,255,255,0.05);
}
.auth-social::before {
  content: ''; position: absolute; inset: 0; background: radial-gradient(circle at center, rgba(255,255,255,0.08) 0%, transparent 70%);
  opacity: 0; transition: opacity 0.4s ease; pointer-events: none;
}
.auth-social:hover { 
  transform: translateY(-4px); 
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
}
.auth-social:hover::before { opacity: 1; }
.auth-social.google:hover { border-color: rgba(66, 133, 244, 0.6); box-shadow: 0 12px 24px rgba(66, 133, 244, 0.2), inset 0 1px 1px rgba(255,255,255,0.2); }
.auth-social.discord:hover { border-color: rgba(88, 101, 242, 0.6); box-shadow: 0 12px 24px rgba(88, 101, 242, 0.2), inset 0 1px 1px rgba(255,255,255,0.2); }
.auth-social.apple:hover { border-color: rgba(255, 255, 255, 0.6); box-shadow: 0 12px 24px rgba(255, 255, 255, 0.1), inset 0 1px 1px rgba(255,255,255,0.2); }
.auth-social.winr:hover { border-color: rgba(252, 163, 17, 0.6); box-shadow: 0 12px 24px rgba(252, 163, 17, 0.2), inset 0 1px 1px rgba(255,255,255,0.2); }

.auth-social svg { width: 28px; height: 28px; flex-shrink: 0; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3)); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.auth-social:hover svg { transform: scale(1.15) translateY(-2px); }
.auth-social span { display: block; line-height: 1.2; z-index: 2; transition: transform 0.4s ease; }
.auth-social:hover span { transform: translateY(1px); }


/* Divider */
.auth-divider {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px; color: rgba(255,255,255,0.2); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.12em; font-weight: 500;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.06);
}

/* Inputs */
.auth-field { margin-bottom: 16px; }
.auth-field label {
  display: block; font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.4);
  margin-bottom: 6px; letter-spacing: 0.02em;
}
.auth-field input {
  width: 100%; background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 10px;
  padding: 12px 14px; color: #fff; font-size: 14px;
  font-family: 'Inter', sans-serif; transition: border-color 0.2s, background 0.2s; outline: none;
}
.auth-field input:focus {
  border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.05);
}
.auth-field input::placeholder { color: rgba(255,255,255,0.15); }

/* Submit */
.auth-submit {
  width: 100%; padding: 13px; border: none; border-radius: 10px;
  background: #fff; color: #000; font-size: 14px; font-weight: 600;
  font-family: 'Inter', sans-serif; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  margin-top: 4px;
}
.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(255,255,255,0.1); }

/* Footer link */
.auth-footer {
  text-align: center; margin-top: 20px;
  font-size: 13px; color: rgba(255,255,255,0.3);
}
.auth-footer a {
  color: rgba(255,255,255,0.7); font-weight: 500; cursor: pointer;
  transition: color 0.2s;
}
.auth-footer a:hover { color: #fff; text-decoration: none; }

/* Terms checkbox */
.auth-terms {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 16px; font-size: 12px; color: rgba(255,255,255,0.4); line-height: 1.5;
}
.auth-terms input[type="checkbox"] {
  width: 16px; height: 16px; margin-top: 1px;
  accent-color: #fff; flex-shrink: 0;
  border-radius: 4px;
}
.auth-terms a { color: rgba(255,255,255,0.6); text-decoration: underline; text-underline-offset: 2px; }
.auth-terms a:hover { color: #fff; }

/* Panels */
.auth-panel { display: none; }
.auth-panel.active { display: block; }

/* Name row */
.auth-name-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Forgot password link */
.auth-forgot {
  display: block; text-align: right; margin-top: -8px; margin-bottom: 16px;
  font-size: 12px; color: rgba(255,255,255,0.3); cursor: pointer;
  transition: color 0.2s;
}
.auth-forgot:hover { color: rgba(255,255,255,0.6); }

/* Membership Card */
.membership-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  margin-bottom: 24px;
  position: relative; overflow: hidden;
}
.membership-card::before {
  content: ''; position: absolute; inset: 0; background: radial-gradient(circle at top, rgba(255,255,255,0.05) 0%, transparent 60%);
  pointer-events: none;
}
.mc-icon {
  margin: 0 auto 16px; width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.02));
  border-radius: 12px; border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4), inset 0 2px 4px rgba(255,255,255,0.1);
  overflow: hidden;
}
.mc-logo-3d { width: 100%; height: 100%; }
.mc-logo-3d canvas { width: 100%; height: 100%; object-fit: contain; }
.membership-card h3 {
  font-family: 'Manrope', sans-serif; font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 8px;
}
.membership-card p {
  font-size: 14px; color: rgba(255,255,255,0.5); line-height: 1.5; margin-bottom: 24px;
}
.mc-btn {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; width: 100%;
}
