/* ============================================================
   EarnBright — Auth Pages  (Option 2: Floating Card + Mesh)
   Trending 2025/2026 — Linear / Supabase / Vercel style
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Page shell ───────────────────────────────────────────── */
.eb-auth-body {
    font-family: 'Inter', system-ui, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow: hidden;
    background: #eef2ff;
}

/* ── Animated soft light mesh ─────────────────────────────── */
.eb-auth-body::before {
    content: '';
    position: fixed;
    inset: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse 70% 60% at 15% 15%,  rgba(37,99,235,.13)  0%, transparent 65%),
        radial-gradient(ellipse 60% 55% at 85% 80%,  rgba(249,115,22,.12) 0%, transparent 60%),
        radial-gradient(ellipse 55% 65% at 60% 5%,   rgba(139,92,246,.08) 0%, transparent 55%),
        radial-gradient(ellipse 45% 55% at 5%  85%,  rgba(16,185,129,.07) 0%, transparent 50%),
        radial-gradient(ellipse 80% 40% at 50% 50%,  rgba(219,234,254,.6) 0%, transparent 70%);
    animation: meshMove 16s ease-in-out infinite alternate;
    z-index: 0;
}
@keyframes meshMove {
    0%   { transform: translate(0,    0)    scale(1);    }
    33%  { transform: translate(2%,  -3%)   scale(1.03); }
    66%  { transform: translate(-3%,  2%)   scale(.98);  }
    100% { transform: translate(1.5%, 4%)   scale(1.02); }
}

/* Dot grid overlay */
.eb-auth-body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle, rgba(37,99,235,.18) 1px, transparent 1px);
    background-size: 28px 28px;
    z-index: 1;
    pointer-events: none;
    opacity: .45;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

/* ── Floating decorative shapes ──────────────────────────── */
.eb-auth-shapes {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

/* Large soft blobs */
.eb-shape-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .18;
    animation: blobFloat 20s ease-in-out infinite;
}
.eb-shape-blob-1 {
    width: 520px; height: 520px;
    background: radial-gradient(circle, #2563eb, #6366f1);
    top: -160px; left: -140px;
    animation-duration: 22s;
}
.eb-shape-blob-2 {
    width: 420px; height: 420px;
    background: radial-gradient(circle, #f97316, #fbbf24);
    bottom: -120px; right: -100px;
    animation-duration: 18s;
    animation-delay: -6s;
}
.eb-shape-blob-3 {
    width: 280px; height: 280px;
    background: radial-gradient(circle, #8b5cf6, #ec4899);
    top: 40%; right: 5%;
    opacity: .1;
    animation-duration: 25s;
    animation-delay: -10s;
}
@keyframes blobFloat {
    0%,100% { transform: translate(0, 0)    scale(1);    }
    25%      { transform: translate(20px,-30px) scale(1.04); }
    50%      { transform: translate(-15px,20px) scale(.96); }
    75%      { transform: translate(25px,15px)  scale(1.02); }
}

/* Floating rings */
.eb-shape-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(37,99,235,.12);
    animation: ringPulse 8s ease-in-out infinite;
}
.eb-shape-ring-1 {
    width: 180px; height: 180px;
    top: 8%; right: 12%;
    animation-delay: 0s;
}
.eb-shape-ring-2 {
    width: 100px; height: 100px;
    top: 12%; right: 16%;
    border-color: rgba(249,115,22,.15);
    animation-delay: -2s;
}
.eb-shape-ring-3 {
    width: 260px; height: 260px;
    bottom: 10%; left: 8%;
    border-color: rgba(139,92,246,.1);
    animation-delay: -4s;
}
.eb-shape-ring-4 {
    width: 140px; height: 140px;
    bottom: 14%; left: 12%;
    border-color: rgba(249,115,22,.12);
    animation-delay: -1s;
}
@keyframes ringPulse {
    0%,100% { transform: scale(1);    opacity: .7; }
    50%      { transform: scale(1.08); opacity: 1;  }
}

/* Grid of dots — top-right corner */
.eb-shape-dots {
    position: absolute;
    top: 4%;
    left: 3%;
    width: 160px; height: 160px;
    background-image:
        radial-gradient(circle, rgba(37,99,235,.25) 1.5px, transparent 1.5px);
    background-size: 20px 20px;
    opacity: .6;
    animation: dotsFloat 15s ease-in-out infinite;
}
.eb-shape-dots-2 {
    position: absolute;
    bottom: 5%;
    right: 4%;
    width: 120px; height: 120px;
    background-image:
        radial-gradient(circle, rgba(249,115,22,.25) 1.5px, transparent 1.5px);
    background-size: 18px 18px;
    opacity: .55;
    animation: dotsFloat 18s ease-in-out infinite reverse;
}
@keyframes dotsFloat {
    0%,100% { transform: translateY(0);    }
    50%      { transform: translateY(-12px); }
}

/* Diagonal line stripes — subtle */
.eb-shape-lines {
    position: absolute;
    top: 0; right: 0;
    width: 280px; height: 280px;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 12px,
        rgba(37,99,235,.05) 12px,
        rgba(37,99,235,.05) 14px
    );
    opacity: 1;
    border-radius: 0 0 0 100%;
}

/* Floating sparkle squares */
.eb-shape-sq {
    position: absolute;
    border-radius: 6px;
    opacity: .12;
    animation: sqSpin 20s linear infinite;
}
.eb-shape-sq-1 {
    width: 32px; height: 32px;
    background: #2563eb;
    top: 20%; left: 6%;
    animation-duration: 24s;
}
.eb-shape-sq-2 {
    width: 20px; height: 20px;
    background: #f97316;
    top: 30%; left: 9%;
    animation-duration: 18s;
    animation-delay: -5s;
    border-radius: 50%;
}
.eb-shape-sq-3 {
    width: 24px; height: 24px;
    background: #8b5cf6;
    bottom: 22%; right: 7%;
    animation-duration: 22s;
    animation-delay: -8s;
}
.eb-shape-sq-4 {
    width: 16px; height: 16px;
    background: #fbbf24;
    bottom: 30%; right: 11%;
    animation-duration: 16s;
    animation-delay: -3s;
    border-radius: 50%;
}
@keyframes sqSpin {
    0%   { transform: rotate(0deg)   translateY(0); }
    50%  { transform: rotate(180deg) translateY(-20px); }
    100% { transform: rotate(360deg) translateY(0); }
}

/* ── Floating decorative shapes ──────────────────────────── */
.eb-auth-layout {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
/* Register card is slightly wider */
.eb-auth-layout-register {
    max-width: 560px;
}

.eb-auth-card {
    width: 100%;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 44px 44px 40px;
    box-shadow:
        0  2px   4px  rgba(37,99,235,.04),
        0  8px  24px  rgba(37,99,235,.08),
        0 24px  64px  rgba(37,99,235,.10),
        0  0     0  1px rgba(37,99,235,.08);
    transition: box-shadow .35s ease, transform .35s ease;
}
.eb-auth-card:hover {
    transform: translateY(-3px);
    box-shadow:
        0  4px   8px  rgba(37,99,235,.06),
        0 12px  32px  rgba(37,99,235,.11),
        0 32px  80px  rgba(37,99,235,.13),
        0  0     0  1px rgba(37,99,235,.14);
}

/* ── Card top: logo + brand ───────────────────────────────── */
.eb-auth-card-top {
    text-align: center;
    margin-bottom: 32px;
}
.eb-auth-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 20px;
}
.eb-auth-brand-link .earn   { color: #0f172a; }
.eb-auth-brand-link .bright { color: #f97316; }

.eb-auth-form-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
    letter-spacing: -.02em;
}
.eb-auth-form-sub {
    font-size: .875rem;
    color: #64748b;
    line-height: 1.5;
}

/* ── Error alert ──────────────────────────────────────────── */
.eb-auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fff1f2;
    border: 1.5px solid #fda4af;
    border-radius: 10px;
    padding: 12px 16px;
    color: #9f1239;
    font-size: .85rem;
    margin-bottom: 20px;
    line-height: 1.5;
}
.eb-auth-alert svg { flex-shrink: 0; color: #e11d48; margin-top: 1px; }

/* ── Two-column row (register) ────────────────────────────── */
.eb-auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ── Form fields ──────────────────────────────────────────── */
.eb-auth-field { margin-bottom: 18px; }
.eb-auth-label {
    display: block;
    font-size: .78rem;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 7px;
}
.eb-auth-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 7px;
}
.eb-auth-label-row .eb-auth-label { margin-bottom: 0; }
.eb-auth-required { color: #f97316; }
.eb-auth-optional { font-weight: 400; color: #9ca3af; font-size: .72rem; text-transform: none; letter-spacing: 0; }

.eb-auth-forgot {
    font-size: .78rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    transition: color .2s;
}
.eb-auth-forgot:hover { color: #f97316; }

/* Input wrapper */
.eb-auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.eb-auth-input-icon {
    position: absolute;
    left: 14px;
    color: #cbd5e1;
    pointer-events: none;
    flex-shrink: 0;
    transition: color .2s;
}
.eb-auth-input-wrap:focus-within .eb-auth-input-icon { color: #2563eb; }

.eb-auth-input {
    width: 100%;
    padding: 12px 44px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: .9rem;
    color: #0f172a;
    background: #f8faff;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
    font-family: 'Inter', sans-serif;
}
.eb-auth-input::placeholder { color: #94a3b8; }
.eb-auth-input:focus {
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.eb-auth-input:focus:hover { border-color: #2563eb; }
.eb-auth-input:hover:not(:focus) { border-color: #94a3b8; }

/* Eye toggle */
.eb-auth-eye {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    border-radius: 6px;
    transition: color .2s, background .2s;
}
.eb-auth-eye:hover { color: #2563eb; background: rgba(37,99,235,.07); }

/* Password strength */
.eb-auth-strength {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
.eb-auth-strength-track {
    flex: 1;
    height: 4px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}
.eb-auth-strength-fill {
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width .3s ease, background .3s ease;
}
.eb-auth-strength-label { font-size: .72rem; font-weight: 600; min-width: 58px; }

/* ── Custom checkbox ──────────────────────────────────────── */
.eb-auth-remember { margin-bottom: 22px; }
.eb-auth-check-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: .875rem;
    color: #475569;
    user-select: none;
}
.eb-auth-checkbox { display: none; }
.eb-auth-checkmark {
    width: 18px; height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .2s;
    background: #fff;
}
.eb-auth-checkbox:checked + .eb-auth-checkmark {
    background: #2563eb;
    border-color: #2563eb;
}
.eb-auth-checkbox:checked + .eb-auth-checkmark::after {
    content: '';
    width: 5px; height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
    display: block;
}

/* ── Terms text ───────────────────────────────────────────── */
.eb-auth-terms {
    font-size: .78rem;
    color: #94a3b8;
    margin-bottom: 20px;
    line-height: 1.6;
}
.eb-auth-terms a { color: #2563eb; text-decoration: none; font-weight: 600; }
.eb-auth-terms a:hover { color: #f97316; text-decoration: underline; }

/* ── Submit button ────────────────────────────────────────── */
.eb-auth-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: #fff;
    font-size: .975rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background .25s ease, transform .2s ease, box-shadow .2s ease;
    box-shadow: 0 4px 16px rgba(37,99,235,.35);
    font-family: 'Inter', sans-serif;
    letter-spacing: -.01em;
}
.eb-auth-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(249,115,22,.4);
    color: #fff;
}
.eb-auth-submit-btn:active { transform: translateY(0); }
.eb-auth-submit-btn:disabled { opacity: .65; cursor: not-allowed; transform: none; }

/* ── Divider ──────────────────────────────────────────────── */
.eb-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 16px;
    font-size: .78rem;
    color: #94a3b8;
}
.eb-auth-divider::before,
.eb-auth-divider::after { content: ''; flex: 1; height: 1px; background: #e2e8f0; }

/* ── Alt button ───────────────────────────────────────────── */
.eb-auth-alt-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 13px 24px;
    background: #fff;
    color: #1e293b;
    font-size: .9rem;
    font-weight: 700;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    transition: background .2s, border-color .2s, color .2s, transform .2s, box-shadow .2s;
    font-family: 'Inter', sans-serif;
}
.eb-auth-alt-btn:hover {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border-color: transparent;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(249,115,22,.35);
}

/* ── Below-card helper text ───────────────────────────────── */
.eb-auth-below-card {
    margin-top: 20px;
    font-size: .8rem;
    color: #64748b;
    text-align: center;
}
.eb-auth-below-card a { color: #2563eb; text-decoration: none; font-weight: 500; }
.eb-auth-below-card a:hover { color: #f97316; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
    .eb-auth-card { padding: 32px 24px 28px; border-radius: 20px; }
    .eb-auth-row  { grid-template-columns: 1fr; gap: 0; }
    .eb-auth-form-title { font-size: 1.4rem; }
    .eb-auth-body { padding: 24px 12px; align-items: flex-start; }
}

/* ── reCAPTCHA badge — keep it visible but unobtrusive ───── */
.grecaptcha-badge {
    z-index: 10 !important;
    opacity: .6;
    transition: opacity .2s;
}
.grecaptcha-badge:hover { opacity: 1; }
