﻿
:root {
    --bg: #08090d;
    --bg2: #0d0f18;
    --bg3: #111420;
    --card-border: rgba(255,255,255,0.07);
    --accent: #4f6ef7;
    --accent2: #7c3aed;
    --accent3: #06b6d4;
    --grad: linear-gradient(135deg, #4f6ef7, #7c3aed);
    --text: #f0f2ff;
    --muted: #8892b0;
    --muted2: #5a6480;
    --font: 'Outfit', sans-serif;
    --font2: 'Plus Jakarta Sans', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font2);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-16px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(79,110,247,0.4);
    }

    50% {
        box-shadow: 0 0 0 12px rgba(79,110,247,0);
    }
}

@keyframes rotateBorder {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes inputGlow {
    from {
        box-shadow: 0 0 0 0 rgba(79,110,247,0);
    }

    to {
        box-shadow: 0 0 18px 2px rgba(79,110,247,0.18);
    }
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes labelFloat {
    from {
        top: 50%;
        font-size: 14px;
        color: var(--muted);
    }

    to {
        top: 6px;
        font-size: 11px;
        color: #a5b4ff;
    }
}

/* Mesh BG */
.mesh-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.mesh-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.18;
}

.orb1 {
    width: 600px;
    height: 600px;
    background: #4f6ef7;
    top: -200px;
    left: -100px;
    animation: float 9s ease-in-out infinite;
}

.orb2 {
    width: 500px;
    height: 500px;
    background: #7c3aed;
    top: 0;
    right: -150px;
    animation: float 11s ease-in-out infinite reverse;
}

.orb3 {
    width: 350px;
    height: 350px;
    background: #06b6d4;
    bottom: 0;
    left: 35%;
    animation: float 13s ease-in-out infinite;
}

/* Page layout */
.auth-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 40px;
}

/* Card */
.auth-card {
    background: rgba(13,15,24,0.85);
    border: 1px solid rgba(79,110,247,0.18);
    border-radius: 28px;
    /*padding: 44px 40px;*/
    padding: 44px 40px;
    width: 100%;
    max-width: 480px;
    backdrop-filter: blur(24px);
    position: relative;
    animation: cardIn 0.7s cubic-bezier(.25,.46,.45,.94) both;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 0.5px rgba(79,110,247,0.12);
}

    /* Rotating border accent */
    .auth-card::before {
        content: '';
        position: absolute;
        inset: -1.5px;
        border-radius: 29px;
        padding: 1.5px;
        background: conic-gradient(from 0deg, #4f6ef7, #7c3aed, #06b6d4, #4f6ef7);
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        /*animation: rotateBorder 4s linear infinite;*/
        opacity: 0.5;
    }

/* Logo */
.auth-logo {
    font-family: var(--font);
    font-size: 22px;
    font-weight: 800;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 6px;
    display: block;
}

.auth-logo-sub {
    text-align: center;
    font-size: 12px;
    color: var(--muted2);
    margin-bottom: 28px;
    letter-spacing: 0.4px;
}

/* Heading */
.auth-title {
    font-family: var(--font);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
    text-align: center;
}

.grad-text {
    background: linear-gradient(135deg, #4f6ef7 0%, #a78bfa 40%, #06b6d4 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

.auth-sub {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 30px;
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.field-group {
    position: relative;
    animation: fadeUp 0.5s ease both;
}

    .field-group:nth-child(1) {
        animation-delay: 0.1s;
    }

    .field-group:nth-child(2) {
        animation-delay: 0.18s;
    }

    .field-group:nth-child(3) {
        animation-delay: 0.26s;
    }

    .field-group:nth-child(4) {
        animation-delay: 0.34s;
    }

.field-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #a5b4ff;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.field-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.field-icon {
    position: absolute;
    left: 14px;
    font-size: 16px;
    pointer-events: none;
    z-index: 1;
    color: var(--muted);
    transition: color 0.3s;
}

.auth-input {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 12px;
    max-width: 650px;
    padding: 14px 14px 14px 42px;
    font-size: 14px;
    font-family: var(--font2);
    color: var(--text);
    outline: none;
    transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}

    .auth-input::placeholder {
        color: var(--muted2);
    }

    .auth-input:focus {
        border-color: rgba(79,110,247,0.6);
        background: rgba(79,110,247,0.06);
        box-shadow: 0 0 0 3px rgba(79,110,247,0.12);
        animation: inputGlow 0.4s ease forwards;
    }

        .auth-input:focus + .field-icon,
        .field-wrap:focus-within .field-icon {
            color: #a5b4ff;
        }

/* Password toggle */
.pwd-toggle {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    font-size: 16px;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
    z-index: 1;
}

    .pwd-toggle:hover {
        color: var(--text);
    }

/* Strength bar */
.strength-wrap {
    margin-top: 8px;
}

.strength-bar-bg {
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    border-radius: 10px;
    transition: width 0.4s ease, background 0.4s ease;
}

.strength-label {
    font-size: 11px;
    margin-top: 4px;
    color: var(--muted2);
    transition: color 0.3s;
}

/* Submit btn */
.btn-submit {
    background: var(--grad);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 15px;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 700;
    width: 100%;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    box-shadow: 0 8px 30px rgba(79,110,247,0.4);
    animation: fadeUp 0.5s ease 0.42s both, pulse 2.5s 1s infinite;
    margin-top: 4px;
    letter-spacing: 0.2px;
}

    .btn-submit:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 40px rgba(79,110,247,0.55);
    }

    .btn-submit:active {
        transform: scale(0.98);
    }

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0;
}

    .auth-divider::before, .auth-divider::after {
        content: '';
        flex: 1;
        height: 0.5px;
        background: rgba(255,255,255,0.08);
    }

    .auth-divider span {
        color: var(--muted2);
        font-size: 12px;
        white-space: nowrap;
    }

/* Footer link */
.auth-footer {
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    animation: fadeUp 0.5s ease 0.55s both;
}

    .auth-footer a {
        color: #a5b4ff;
        text-decoration: none;
        font-weight: 600;
        transition: color 0.2s;
    }

        .auth-footer a:hover {
            color: var(--text);
        }

/* Terms */
.terms-text {
    text-align: center;
    font-size: 11px;
    color: var(--muted2);
    animation: fadeUp 0.5s ease 0.5s both;
    line-height: 1.6;
}

    .terms-text a {
        color: #a5b4ff;
        text-decoration: none;
    }

/* Input valid/invalid states */
.auth-input.valid {
    border-color: rgba(16,185,129,0.5);
}

.auth-input.invalid {
    border-color: rgba(239,68,68,0.5);
}

.field-msg {
    font-size: 11px;
    margin-top: 5px;
    display: none;
}

    .field-msg.show {
        display: block;
    }

    .field-msg.err {
        color: #f87171;
    }

    .field-msg.ok {
        color: #34d399;
    }

.signup-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 6px;
}

    .signup-logo img {
        height: 36px;
        width: auto;
    }

        .signup-logo img:first-child {
            height: 30px; /* icon smaller */
        }

/*@media (max-width: 520px) {
    .auth-card {
        padding: 32px 22px;
        border-radius: 20px;
    }

    .auth-title {
        font-size: 22px;
    }
}*/

/* =========================
   TABLET (≤1024px)
========================= */
@media (max-width: 1024px) {

    .auth-card {
        max-width: 420px;
        padding: 32px 24px;
    }

    .auth-title {
        font-size: 28px;
    }

    .auth-sub {
        font-size: 14px;
    }
}

/* =========================
   MOBILE (≤768px)
========================= */
@media (max-width: 768px) {

    .auth-page {
        padding: 20px 12px;
        align-items: flex-start;
    }

    .auth-card {
        padding: 28px 20px;
        border-radius: 14px;
    }

    .signup-logo img {
        height: 26px;
    }

    .auth-title {
        font-size: 24px;
        text-align: center;
    }

    .auth-logo-sub,
    .auth-sub {
        text-align: center;
        font-size: 13px;
    }

    .field-label {
        font-size: 13px;
    }

    .auth-input {
        font-size: 14px;
        padding: 11px 12px 11px 38px;
    }

    .btn-submit {
        font-size: 14px;
        padding: 13px;
    }

    .terms-text {
        font-size: 12px;
        text-align: center;
    }

    .auth-footer {
        text-align: center;
    }

    .auth-divider span {
        font-size: 12px;
    }
}

/* =========================
   SMALL MOBILE (≤480px)
========================= */
@media (max-width: 480px) {

    .auth-card {
        padding: 22px 16px;
    }

    .auth-title {
        font-size: 20px;
    }

    .signup-logo {
        gap: 6px;
    }

        .signup-logo img {
            height: 22px;
        }

    .auth-input {
        font-size: 13px;
    }

    .field-icon {
        font-size: 12px;
        left: 10px;
    }

    .pwd-toggle {
        right: 8px;
        font-size: 14px;
    }

    .btn-submit {
        padding: 12px;
        font-size: 13px;
    }
}

/* =========================
   EXTRA SMALL (≤360px)
========================= */
@media (max-width: 360px) {

    .auth-title {
        font-size: 18px;
    }

    .auth-card {
        padding: 18px 12px;
    }
}