/* Auth shell — register & login (AI × YouTube) */

.auth-page {
  min-height: calc(100vh - 56px);
  padding: 24px 0 48px;
  position: relative;
  overflow: hidden;
}

/* Index: allow full vertical layout; avoid clipping long headlines (register keeps overflow:hidden) */
.auth-page--index {
  overflow-x: hidden;
  overflow-y: visible;
}

.auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 50% at 20% -20%, rgba(99, 102, 241, 0.35), transparent 55%),
    radial-gradient(ellipse 60% 40% at 85% 10%, rgba(239, 68, 68, 0.22), transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(34, 211, 238, 0.12), transparent 45%),
    #050810;
}

.auth-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  pointer-events: none;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 420px);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
  max-width: 1120px;
  margin: 0 auto;
  width: min(1120px, 92%);
}

.auth-hero {
  padding-top: 8px;
}

.auth-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.auth-badge--ai {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(168, 85, 247, 0.2));
  color: #e0e7ff;
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.25);
}

.auth-badge--yt {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35), rgba(220, 38, 38, 0.15));
  color: #fecaca;
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.2);
}

.auth-badge--pay {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.35), rgba(16, 185, 129, 0.2));
  color: #bbf7d0;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.22);
}

.auth-hero h1 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.45rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 16px;
  background: linear-gradient(105deg, #fff 0%, #c7d2fe 45%, #fca5a5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-hero .auth-lead {
  font-size: 1.05rem;
  color: #94a3b8;
  max-width: 36ch;
  margin: 0 0 28px;
  line-height: 1.6;
}

.auth-visual {
  position: relative;
  min-height: 220px;
  margin-top: 8px;
}

.auth-orbit {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 1px dashed rgba(148, 163, 184, 0.25);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  animation: auth-spin 28s linear infinite;
}

.auth-orbit::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #22d3ee;
  top: -6px;
  left: 50%;
  margin-left: -6px;
  box-shadow: 0 0 16px #22d3ee;
}

@keyframes auth-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.auth-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 88px;
  height: 88px;
  border-radius: 22px;
  background: linear-gradient(145deg, #1e1b4b, #0f172a);
  border: 1px solid rgba(129, 140, 248, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 20px 50px rgba(0, 0, 0, 0.45),
    0 0 40px rgba(99, 102, 241, 0.35);
}

.auth-card-float {
  position: absolute;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  max-width: 200px;
  line-height: 1.4;
}

.auth-card-float--yt {
  left: 0;
  top: 12%;
  background: rgba(127, 29, 29, 0.35);
  color: #fecaca;
  animation: auth-float 5s ease-in-out infinite;
}

.auth-card-float--ai {
  right: 0;
  bottom: 8%;
  background: rgba(49, 46, 129, 0.45);
  color: #e0e7ff;
  animation: auth-float 5.5s ease-in-out infinite 0.5s;
}

@keyframes auth-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.auth-features {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  color: #cbd5e1;
}

.auth-features li span.icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(129, 140, 248, 0.35);
}

.auth-panel {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  padding: clamp(22px, 4vw, 32px);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  backdrop-filter: blur(16px);
}

.auth-panel-header {
  margin-bottom: 22px;
}

.auth-panel-header h2 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 800;
  color: #f8fafc;
}

.auth-panel-header p {
  margin: 0;
  font-size: 0.9rem;
  color: #94a3b8;
}

.auth-form .form-row {
  margin-bottom: 16px;
}

.auth-form label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 8px;
}

.auth-form input {
  background: rgba(2, 6, 23, 0.65);
  border-color: rgba(71, 85, 105, 0.8);
  padding: 14px 16px;
}

.auth-form input:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.auth-password-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.auth-password-row input {
  flex: 1;
}

.auth-password-row button[type="button"] {
  width: auto;
  min-width: 100px;
  padding: 0 16px;
  background: rgba(51, 65, 85, 0.6);
  color: #e2e8f0;
  border: 1px solid rgba(100, 116, 139, 0.5);
  font-size: 0.82rem;
  font-weight: 700;
}

.auth-password-row button[type="button"]:hover {
  filter: brightness(1.12);
  background: rgba(71, 85, 105, 0.75);
}

.auth-form button[type="submit"] {
  margin-top: 8px;
  padding: 16px;
  border-radius: 12px;
  font-size: 1rem;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #6366f1, #a855f7 50%, #ec4899);
  color: #fff;
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.35);
}

.auth-form button[type="submit"]:hover {
  filter: brightness(1.08);
}

.auth-footer-note {
  margin-top: 20px;
  text-align: center;
  font-size: 0.88rem;
  color: #64748b;
}

.auth-footer-note a {
  color: #a5b4fc;
  font-weight: 600;
}

.auth-page .alert {
  border-radius: 12px;
}

@media (max-width: 900px) {
  .auth-grid {
    grid-template-columns: 1fr;
    width: min(1120px, 94%);
  }

  .auth-visual {
    min-height: 200px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }

  .auth-hero .auth-lead {
    max-width: none;
  }

  .auth-hero h1 {
    text-align: center;
  }

  .auth-badges {
    justify-content: center;
  }

  .auth-features {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 520px) {
  .auth-password-row {
    flex-direction: column;
  }

  .auth-password-row button[type="button"] {
    width: 100%;
  }
}

/* Index — same grid + auth-panel pattern as register.php */

.auth-grid--index {
  margin: 0 auto;
  width: 100%;
  gap: 22px;
  align-items: stretch;
  box-sizing: border-box;
}

/* Must override .auth-grid two-column layout on desktop (register/login) */
.auth-page--index .auth-grid.auth-grid--index {
  display: flex;
  flex-direction: column;
  grid-template-columns: none;
}

.auth-page--index .index-panel {
  width: 100%;
}

.index-hero-centered {
  text-align: center;
}

.index-hero-centered .auth-badges {
  justify-content: center;
}

.index-hero-centered .auth-lead {
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
}

.index-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin-top: 8px;
}

.index-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid transparent;
  transition: filter 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.index-cta-btn--primary {
  background: linear-gradient(90deg, #6366f1, #a855f7 50%, #ec4899);
  color: #fff;
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.35);
}

.index-cta-btn--primary:hover {
  filter: brightness(1.08);
}

.index-cta-btn--ghost {
  background: rgba(30, 41, 59, 0.65);
  color: #e2e8f0;
  border-color: rgba(100, 116, 139, 0.45);
}

.index-cta-btn--ghost:hover {
  background: rgba(51, 65, 85, 0.75);
  border-color: rgba(129, 140, 248, 0.4);
  color: #fff;
}

.auth-page--index .auth-panel-header h2 {
  font-size: 1.2rem;
}

.index-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.index-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(71, 85, 105, 0.5);
  border-radius: 12px;
  padding: 14px 14px;
}

.index-step-num {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.index-step-body {
  min-width: 0;
}

.index-step-title {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 6px;
  line-height: 1.3;
}

.index-step-text {
  margin: 0;
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.5;
}

.index-trust-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.index-trust-item {
  padding: 12px 12px;
  border-radius: 10px;
  border: 1px solid rgba(51, 65, 85, 0.55);
  background: rgba(2, 6, 23, 0.35);
  text-align: left;
}

.index-trust-item-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #cbd5e1;
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.index-trust-item-text {
  margin: 0;
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.45;
}

@media (max-width: 768px) {
  .index-hero-cta {
    flex-direction: column;
  }

  .index-cta-btn {
    width: 100%;
  }
}
