*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --fp-bg-1: #020617;
    --fp-bg-2: #0f172a;
    --fp-card: rgba(15, 23, 42, 0.78);
    --fp-border: rgba(148, 163, 184, 0.22);
    --fp-text: #f8fafc;
    --fp-muted: #94a3b8;
    --fp-input: rgba(15, 23, 42, 0.9);
    --fp-primary: #2563eb;
    --fp-purple: #7c3aed;
    --fp-cyan: #06b6d4;
}

html[data-theme="light"] {
    --fp-bg-1: #f8fbff;
    --fp-bg-2: #eef4ff;
    --fp-card: rgba(255, 255, 255, 0.86);
    --fp-border: rgba(148, 163, 184, 0.28);
    --fp-text: #0f172a;
    --fp-muted: #64748b;
    --fp-input: rgba(255, 255, 255, 0.94);
}

body.fp-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Inter", sans-serif;
    color: var(--fp-text);
    background:
        radial-gradient(
            circle at 12% 10%,
            rgba(37, 99, 235, 0.35),
            transparent 32%
        ),
        radial-gradient(
            circle at 88% 18%,
            rgba(124, 58, 237, 0.35),
            transparent 34%
        ),
        radial-gradient(
            circle at 50% 95%,
            rgba(6, 182, 212, 0.22),
            transparent 34%
        ),
        linear-gradient(135deg, var(--fp-bg-1), var(--fp-bg-2));
    overflow-x: hidden;
}

.fp-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 16px;
    position: relative;
    z-index: 2;
}

.fp-card {
    width: min(100%, 460px);
    padding: 34px;
    border-radius: 32px;
    background: var(--fp-card);
    border: 1px solid var(--fp-border);
    box-shadow: 0 34px 100px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(24px);
    animation: fpCardIn 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.fp-logo {
    width: 66px;
    height: 66px;
    margin: 0 auto 18px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 30px;
    font-weight: 950;
    background: linear-gradient(
        135deg,
        var(--fp-primary),
        var(--fp-purple),
        var(--fp-cyan)
    );
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.36);
    animation: fpPulse 3s ease-in-out infinite;
}

.fp-card h1 {
    margin: 0;
    text-align: center;
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 950;
    letter-spacing: -0.06em;
    background: linear-gradient(
        90deg,
        var(--fp-text),
        var(--fp-cyan),
        var(--fp-purple),
        var(--fp-text)
    );
    background-size: 260% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: fpTitleShine 6s linear infinite;
}

.fp-subtitle {
    margin: 10px auto 24px;
    max-width: 340px;
    text-align: center;
    color: var(--fp-muted);
    font-weight: 700;
    line-height: 1.6;
}

.fp-form {
    display: grid;
    gap: 16px;
}

.fp-group {
    position: relative;
}

.fp-group label {
    display: block;
    margin-bottom: 9px;
    color: var(--fp-muted);
    font-size: 13px;
    font-weight: 900;
}

.fp-group input {
    width: 100%;
    height: 52px;
    border: 1px solid var(--fp-border);
    border-radius: 18px;
    padding: 0 16px;
    background: var(--fp-input);
    color: var(--fp-text);
    outline: none;
    font-size: 15px;
    font-weight: 750;
    transition: 0.25s ease;
}

.fp-group input:focus {
    border-color: var(--fp-cyan);
    box-shadow: 0 0 0 6px rgba(6, 182, 212, 0.14);
    transform: translateY(-1px);
}

.fp-group input::placeholder {
    color: #94a3b8;
}

.fp-eye {
    position: absolute;
    right: 12px;
    bottom: 9px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.16);
    cursor: pointer;
}

.fp-btn {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 18px;
    color: #fff;
    font-size: 15px;
    font-weight: 950;
    cursor: pointer;
    background: linear-gradient(
        135deg,
        var(--fp-primary),
        var(--fp-purple),
        var(--fp-cyan)
    );
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.34);
    transition: 0.25s ease;
}

.fp-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 60px rgba(37, 99, 235, 0.46);
}

.fp-alert {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 850;
}

.fp-alert.success {
    color: #166534;
    background: #dcfce7;
    border: 1px solid #86efac;
}

.fp-alert.danger {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fca5a5;
}

.fp-resend {
    margin-top: 12px;
    text-align: center;
}

.fp-resend button,
.fp-back a {
    border: 0;
    background: transparent;
    color: var(--fp-cyan);
    font-weight: 900;
    cursor: pointer;
    text-decoration: none;
}

.fp-back {
    margin-top: 22px;
    text-align: center;
    color: var(--fp-muted);
    font-weight: 750;
}

.fp-theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10;
    width: 46px;
    height: 46px;
    border: 1px solid var(--fp-border);
    border-radius: 16px;
    background: var(--fp-card);
    backdrop-filter: blur(18px);
    cursor: pointer;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
}

.fp-orb {
    position: fixed;
    border-radius: 999px;
    filter: blur(4px);
    opacity: 0.75;
    animation: fpFloat 7s ease-in-out infinite;
}

.fp-orb-one {
    width: 180px;
    height: 180px;
    left: 8%;
    top: 12%;
    background: rgba(37, 99, 235, 0.28);
}

.fp-orb-two {
    width: 220px;
    height: 220px;
    right: 9%;
    top: 18%;
    background: rgba(124, 58, 237, 0.26);
    animation-delay: 1s;
}

.fp-orb-three {
    width: 160px;
    height: 160px;
    left: 44%;
    bottom: 10%;
    background: rgba(6, 182, 212, 0.22);
    animation-delay: 2s;
}

@keyframes fpCardIn {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fpTitleShine {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 260% center;
    }
}

@keyframes fpPulse {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes fpFloat {
    0%,
    100% {
        transform: translateY(0) translateX(0);
    }

    50% {
        transform: translateY(-24px) translateX(12px);
    }
}

@media (max-width: 520px) {
    .fp-card {
        padding: 26px 20px;
        border-radius: 26px;
    }

    .fp-logo {
        width: 58px;
        height: 58px;
        border-radius: 20px;
    }

    .fp-group input,
    .fp-btn {
        height: 48px;
        border-radius: 16px;
    }
}
