/* ============================================================
   auth.css — Sign up / Login page styles (Apple design system)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
  --primary: #0066cc;
  --primary-focus: #0071e3;
  --primary-on-dark: #2997ff;
  --ink: #1d1d1f;
  --ink-muted-80: #333333;
  --ink-muted-48: #7a7a7a;
  --hairline: #e0e0e0;
  --divider-soft: #f0f0f0;
  --canvas: #ffffff;
  --canvas-parchment: #f5f5f7;
  --surface-black: #000000;
  --surface-tile-1: #272729;
  --on-dark: #ffffff;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --rounded-sm: 8px;
  --rounded-md: 11px;
  --rounded-lg: 18px;
  --rounded-pill: 9999px;
  --ag-ease: cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 17px;
  color: var(--ink);
  background: var(--surface-black);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 40px 10px;
}

/* ── Background orbs ── */
.auth-bg {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
}
.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
}
.auth-orb--1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,102,204,0.2) 0%, transparent 70%);
  top: -100px; left: -100px;
  animation: orb-float 10s ease-in-out infinite;
}
.auth-orb--2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(41,151,255,0.15) 0%, transparent 70%);
  bottom: -80px; right: -80px;
  animation: orb-float 12s ease-in-out infinite reverse;
}
@keyframes orb-float {
  0%,100% { transform: translate(0,0); }
  50%      { transform: translate(30px,-30px); }
}

/* ── Card ── */
.auth-card {
  position: relative; z-index: 10;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--rounded-lg);
  padding: 48px 40px;
  width: 460px;
  max-width: calc(100vw - 40px);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: card-in 0.6s var(--ag-ease) both;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(32px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Logo ── */
.auth-logo {
  display: block;
  text-align: center;
  margin-bottom: 32px;
}
.auth-logo img {
  height: 168px;
  filter: drop-shadow(0 0 12px rgba(212,175,55,0.4));
}
@keyframes logo-float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* ── Heading ── */
.auth-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.28px;
  color: var(--on-dark);
  text-align: center;
  margin-bottom: 6px;
  line-height: 1.1;
}
.auth-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  text-align: center;
  margin-bottom: 32px;
  line-height: 1.5;
}

/* ── Fields ── */
.field-group {
  margin-bottom: 16px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 6px;
  text-transform: uppercase;
}
.field-input {
  width: 100%;
  height: 50px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--rounded-sm);
  padding: 0 16px;
  font-family: var(--font);
  font-size: 15px;
  color: var(--on-dark);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  -webkit-appearance: none;
}
.field-input:focus {
  border-color: var(--primary-on-dark);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 0 3px rgba(41,151,255,0.15);
}
.field-input::placeholder { color: rgba(255,255,255,0.25); }
.field-error {
  display: block;
  font-size: 12px;
  color: #ff6b6b;
  margin-top: 5px;
  min-height: 16px;
}
.required-star { color: #ff6b6b; margin-left: 2px; }

/* ── Submit button ── */
.btn-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 22px;
  margin-top: 8px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  border-radius: var(--rounded-pill);
  border: none;
  cursor: pointer;
  transition: transform 0.25s var(--ag-ease), box-shadow 0.25s var(--ag-ease);
  position: relative;
  overflow: hidden;
}
.btn-auth::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 120%, rgba(255,255,255,0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.btn-auth:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,102,204,0.4); }
.btn-auth:hover::before { opacity: 1; }
.btn-auth:active { transform: scale(0.97); }
.btn-auth:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Divider & links ── */
.auth-divider {
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  margin: 20px 0 0;
}
.auth-divider a {
  color: var(--primary-on-dark);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}
.auth-divider a:hover { opacity: 0.75; }

/* ── Global alert ── */
.auth-alert {
  background: rgba(255,59,48,0.12);
  border: 1px solid rgba(255,59,48,0.25);
  border-radius: var(--rounded-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: #ff6b6b;
  margin-bottom: 16px;
  display: none;
}
.auth-alert.visible { display: block; }
.auth-success {
  background: rgba(52,199,89,0.1);
  border: 1px solid rgba(52,199,89,0.2);
  color: #3de680;
}

@media (max-width: 480px) {
  .auth-card { padding: 36px 24px; }
  .field-row { grid-template-columns: 1fr; }
}
