/**
 * DEBILEX Auth & Error pages — gold/black theme.
 * Self-contained: mirrors the landing design tokens (home.css) so login,
 * registration, password flows and error pages share one visual language.
 */

:root {
    --bg: #050507;
    --bg-2: #0a0a0d;
    --panel: #0e0f13;
    --panel-2: #121319;
    --panel-3: #16171d;
    --line: #20222b;
    --line-2: #2a2d38;

    --gold: #FFC107;
    --gold-2: #F5A623;
    --gold-soft: rgba(255, 193, 7, 0.12);
    --gold-glow: rgba(255, 193, 7, 0.35);
    --gold-line: rgba(255, 193, 7, 0.16);
    --gold-line-strong: rgba(255, 193, 7, 0.30);

    --text: #f3f4f6;
    --muted: #9aa0ad;
    --muted-2: #6b7280;

    --green: #22c55e;
    --red: #ef4444;

    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 20px;

    --font: 'Inter', 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Bebas Neue', 'Inter', sans-serif;

    /* Legacy token aliases — keep older inline styles on-brand. */
    --primary-black: var(--bg);
    --secondary-black: var(--panel-2);
    --text-light: var(--text);
    --text-gray: var(--muted);
    --border-color: var(--line);
    --primary-yellow: var(--gold);
    --secondary-yellow: var(--gold-2);
    --primary-purple: var(--gold);
    --secondary-purple: var(--gold-2);
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------------------------------------------------------------- */
/* Page shell (auth + error)                                         */
/* ---------------------------------------------------------------- */
.auth-shell {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    overflow: hidden;
}
/* Ambient gold glow behind the card */
.auth-shell::before {
    content: "";
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 760px;
    height: 760px;
    max-width: 120vw;
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 60%);
    opacity: 0.10;
    pointer-events: none;
    z-index: 0;
}

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: var(--panel);
    border: 1px solid var(--gold-line);
    border-radius: var(--radius-lg);
    padding: 32px 30px;
    box-shadow: 0 0 0 1px var(--gold-line), 0 24px 60px rgba(0, 0, 0, 0.5);
}

/* ---------------------------------------------------------------- */
/* Headings                                                          */
/* ---------------------------------------------------------------- */
.auth-head { text-align: center; margin-bottom: 26px; }
.auth-head__logo { display: inline-block; margin-bottom: 18px; transition: transform .2s ease; }
.auth-head__logo:hover { transform: translateY(-2px); }
.auth-head__logo img { height: 38px; width: auto; }
.auth-title {
    font-family: var(--font-display);
    font-size: 34px;
    letter-spacing: 2px;
    line-height: 1.05;
    color: var(--text);
    text-transform: uppercase;
}
.auth-subtitle { font-size: 14px; color: var(--muted); margin-top: 8px; }

/* ---------------------------------------------------------------- */
/* Form fields                                                       */
/* ---------------------------------------------------------------- */
.auth-field { margin-bottom: 18px; }
.auth-field + .auth-field { margin-top: 0; }

.auth-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.auth-input {
    width: 100%;
    background: var(--panel-2);
    border: 1px solid var(--line-2);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-input::placeholder { color: var(--muted-2); }
.auth-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-soft);
}

.auth-error { list-style: none; margin-top: 8px; font-size: 13px; color: #ff8a8a; }
.auth-error li + li { margin-top: 2px; }

.auth-status {
    font-size: 14px;
    font-weight: 500;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    background: rgba(34, 197, 94, 0.10);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #7ee2a4;
}

/* ---------------------------------------------------------------- */
/* Checkbox (remember me)                                            */
/* ---------------------------------------------------------------- */
.auth-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.auth-check input {
    width: 18px; height: 18px;
    accent-color: var(--gold);
    cursor: pointer;
}
.auth-check span { font-size: 14px; color: var(--muted); }

/* ---------------------------------------------------------------- */
/* Buttons                                                           */
/* ---------------------------------------------------------------- */
.auth-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    font-weight: 700; font-size: 14px; padding: 13px 26px;
    border-radius: var(--radius-sm); border: 1px solid transparent;
    cursor: pointer; font-family: inherit;
    text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.auth-btn:hover { transform: translateY(-2px); }
.auth-btn--gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-2));
    color: #161200;
    box-shadow: 0 8px 24px rgba(255, 193, 7, 0.25);
}
.auth-btn--gold:hover { box-shadow: 0 12px 30px rgba(255, 193, 7, 0.4); }
.auth-btn--ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.auth-btn--ghost:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.auth-btn--block { width: 100%; }

/* ---------------------------------------------------------------- */
/* Links & rows                                                      */
/* ---------------------------------------------------------------- */
.auth-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 24px; }
.auth-actions--end { justify-content: flex-end; }
.auth-actions--center { justify-content: center; }

.auth-link {
    font-size: 14px; font-weight: 600; color: var(--gold);
    transition: color .15s ease, opacity .15s ease;
}
.auth-link:hover { opacity: 0.8; }
.auth-link--muted { color: var(--muted); font-weight: 500; }
.auth-link--muted:hover { color: var(--gold); opacity: 1; }

.auth-foot {
    text-align: center;
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    font-size: 14px;
    color: var(--muted);
}
.auth-foot--xs { font-size: 12px; }
.auth-help { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 18px; }
.auth-hint { font-size: 12px; color: var(--muted-2); margin-top: 8px; }

/* Referral / highlight notice */
.auth-notice {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px; margin-bottom: 22px;
    background: var(--gold-soft);
    border: 1px solid var(--gold-line-strong);
    border-radius: var(--radius-sm);
}
.auth-notice__icon { font-size: 28px; line-height: 1; }
.auth-notice__title { font-weight: 700; color: var(--gold); font-size: 14px; }
.auth-notice__text { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ---------------------------------------------------------------- */
/* Error pages — full-screen "wow" hero                              */
/* ---------------------------------------------------------------- */
.err {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    overflow: hidden;
}
/* Ambient gold blooms */
.err::before,
.err::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(10px);
}
.err::before {
    width: 720px; height: 720px; max-width: 110vw;
    top: -16%; right: -10%;
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 62%);
    opacity: 0.16;
}
.err::after {
    width: 560px; height: 560px; max-width: 100vw;
    bottom: -22%; left: -12%;
    background: radial-gradient(circle, rgba(245, 166, 35, 0.6) 0%, transparent 62%);
    opacity: 0.10;
}

/* Giant watermark number behind everything */
.err__ghost {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    font-family: var(--font-display);
    font-size: min(58vw, 760px);
    line-height: 1;
    letter-spacing: 2px;
    color: var(--gold);
    opacity: 0.04;
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
    white-space: nowrap;
}

.err__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1080px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 40px;
}

/* Text column */
.err__content { max-width: 520px; }
.err__eyebrow {
    display: inline-flex; align-items: center; gap: 9px;
    font-size: 13px; font-weight: 700; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--gold); margin-bottom: 18px;
}
.err__eyebrow .dot {
    width: 9px; height: 9px; border-radius: 50%; background: var(--gold);
    box-shadow: 0 0 0 0 var(--gold-glow); animation: err-pulse 2s infinite;
}
@keyframes err-pulse {
    0% { box-shadow: 0 0 0 0 var(--gold-glow); }
    70% { box-shadow: 0 0 0 10px rgba(255, 193, 7, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0); }
}
.err__code {
    font-family: var(--font-display);
    font-size: clamp(96px, 17vw, 184px);
    line-height: 0.92;
    letter-spacing: 3px;
    background: linear-gradient(135deg, #fff3cf 0%, var(--gold) 38%, var(--gold-2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--gold);
    filter: drop-shadow(0 8px 34px var(--gold-glow));
}
.err__title {
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 800; letter-spacing: 0.01em;
    text-transform: uppercase; color: var(--text);
    margin-top: 6px;
}
.err__text { font-size: 16px; color: var(--muted); margin-top: 14px; line-height: 1.65; }
.err__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }

/* Character column */
.err__art {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
/* Glow halo behind the mascot */
.err__art::before {
    content: "";
    position: absolute;
    top: 46%; left: 50%;
    width: 78%; aspect-ratio: 1;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 68%);
    opacity: 0.30;
    filter: blur(20px);
    z-index: 0;
}
.err__art img {
    position: relative;
    z-index: 1;
    width: auto;
    max-height: 74vh;
    max-width: 100%;
    filter: drop-shadow(0 26px 40px rgba(0, 0, 0, 0.55));
    animation: err-float 6s ease-in-out infinite;
}
@keyframes err-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-16px); }
}

@media (prefers-reduced-motion: reduce) {
    .err__art img { animation: none; }
    .err__eyebrow .dot { animation: none; }
}

/* ---------------------------------------------------------------- */
/* Responsive — error pages                                          */
/* ---------------------------------------------------------------- */
@media (max-width: 860px) {
    .err__inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 8px;
        max-width: 480px;
    }
    .err__art { order: -1; }
    .err__art img { max-height: 42vh; }
    .err__content { max-width: 100%; }
    .err__eyebrow, .err__actions { justify-content: center; }
    .err__ghost { font-size: 95vw; opacity: 0.05; }
}
@media (max-width: 420px) {
    .err__actions { flex-direction: column; }
    .err__actions .auth-btn { width: 100%; }
}

/* ---------------------------------------------------------------- */
/* Responsive                                                        */
/* ---------------------------------------------------------------- */
@media (max-width: 480px) {
    .auth-card { padding: 26px 20px; }
    .auth-title { font-size: 28px; }
    .auth-actions { flex-direction: column-reverse; align-items: stretch; gap: 12px; }
    .auth-actions .auth-btn { width: 100%; }
    .auth-actions .auth-link { text-align: center; }
}

/* ---------------------------------------------------------------- */
/* Sign-In with Wallet                                               */
/* ---------------------------------------------------------------- */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0 18px;
    color: var(--muted-2);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.wallet-connect__buttons { display: flex; flex-direction: column; gap: 10px; }

.wallet-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-2);
    background: var(--panel-2);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, transform .15s ease;
}
.wallet-btn:hover { border-color: var(--gold); background: var(--panel-3); transform: translateY(-1px); }
.wallet-btn:disabled { cursor: default; opacity: .6; transform: none; }
.wallet-btn img { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; }
.wallet-btn span { display: flex; align-items: baseline; gap: 7px; }
.wallet-btn small { color: var(--muted); font-weight: 600; font-size: 12px; }
.wallet-btn.is-busy { position: relative; color: transparent; }
.wallet-btn.is-busy img { opacity: .3; }
.wallet-btn.is-busy::after {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    width: 18px; height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid var(--gold-line);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: wallet-spin .7s linear infinite;
}
@keyframes wallet-spin { to { transform: rotate(360deg); } }

.wallet-connect__error {
    display: none;
    margin-top: 12px;
    padding: 10px 13px;
    border-radius: var(--radius-sm);
    background: rgba(239, 68, 68, .10);
    border: 1px solid var(--red);
    color: #fca5a5;
    font-size: 13px;
}

/* Social login (Google …) — resources/views/auth/partials/social-login.blade.php */
.social-login { margin-bottom: 20px; }
.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-2);
    background: var(--panel-2);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, transform .15s ease;
}
.social-btn:hover { border-color: var(--gold); background: var(--panel-3); color: var(--text); transform: translateY(-1px); }
.social-btn svg { flex-shrink: 0; }
.social-btn + .social-btn { margin-top: 10px; }
.social-login__divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    color: var(--muted-2);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.social-login__divider::before,
.social-login__divider::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
