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

:root {
    --bg-1: #0a0a0f;
    --bg-2: #141420;
    --card: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --accent-a: #ff6b35;
    --accent-b: #f72585;
    --accent-c: #7209b7;
    --accent-d: #3a86ff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-1);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 107, 53, 0.15), transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(247, 37, 133, 0.15), transparent 40%),
        radial-gradient(circle at 40% 80%, rgba(58, 134, 255, 0.12), transparent 40%);
    animation: bgFlow 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes bgFlow {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1) rotate(5deg);
    }
}

.particles {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: linear-gradient(135deg, var(--accent-a), var(--accent-c));
    border-radius: 50%;
    opacity: 0.3;
    animation: float 15s infinite;
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    left: 25%;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    left: 40%;
    animation-delay: 4s;
}

.particle:nth-child(4) {
    left: 60%;
    animation-delay: 1s;
}

.particle:nth-child(5) {
    left: 75%;
    animation-delay: 3s;
}

.particle:nth-child(6) {
    left: 90%;
    animation-delay: 5s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 0.3;
    }

    90% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(-100px) scale(1);
    }
}

.auth-container {
    max-width: 480px;
    width: 100%;
    position: relative;
    z-index: 2;
    animation: containerFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes containerFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

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

.auth-card {
    padding: 50px 40px;
    border-radius: 32px;
    background: var(--card);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    box-shadow: 0 0 0 1px var(--card-border),
        0 40px 100px rgba(0, 0, 0, 0.4),
        inset 0 0 80px rgba(255, 255, 255, 0.02);
    position: relative;
    overflow: hidden;
}

.auth-card::before,
.auth-card::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.2;
    animation: pulse 8s ease-in-out infinite;
    pointer-events: none;
}

.auth-card::before {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-a), var(--accent-b));
    top: -150px;
    right: -150px;
}

.auth-card::after {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, var(--accent-c), var(--accent-d));
    bottom: -100px;
    left: -100px;
    animation-delay: 4s;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.2;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.15;
    }
}

.auth-card h2 {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-a), var(--accent-b), var(--accent-c));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1.5px;
    margin-bottom: 12px;
    animation: gradientShift 6s ease infinite;
    position: relative;
    z-index: 5;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 35px;
    font-size: 1rem;
    position: relative;
    z-index: 5;
}

form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    z-index: 5;
}

label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: -12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input {
    padding: 16px 20px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

input:focus {
    border-color: var(--accent-a);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1),
        0 10px 30px rgba(255, 107, 53, 0.1);
    transform: translateY(-2px);
}

.btn-primary {
    padding: 18px 40px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
    color: #fff;
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.3),
        inset 0 -2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.btn-primary::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 107, 53, 0.4),
        inset 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.message {
    font-size: 0.9rem;
    text-align: center;
    padding: 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -5px;
}

.message:empty {
    display: none;
}

.redirect {
    text-align: center;
    margin-top: 30px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    position: relative;
    z-index: 5;
}

.redirect a {
    color: var(--accent-a);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.redirect a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-a), var(--accent-b));
    transition: width 0.3s ease;
}

.redirect a:hover::after {
    width: 100%;
}

.redirect a:hover {
    color: var(--accent-b);
}

@media (max-width: 480px) {
    .auth-card {
        padding: 40px 30px;
        border-radius: 24px;
    }

    .auth-card h2 {
        font-size: 2rem;
    }

    input,
    .btn-primary {
        padding: 15px 18px;
    }
}