* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0d1b0d 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Interactive Background */
.interactive-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.floating-particles::before,
.floating-particles::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: #0088ff;
    border-radius: 50%;
    animation: float-particle 8s infinite linear;
}

.floating-particles::before {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-particles::after {
    top: 60%;
    right: 15%;
    animation-delay: 4s;
}

@keyframes float-particle {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) scale(0);
        opacity: 0;
    }
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.2;
    animation: orb-float 12s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #0088ff, transparent);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #0066cc, transparent);
    bottom: -150px;
    left: -150px;
    animation-delay: 4s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, #0088ff, transparent);
    top: 30%;
    left: 20%;
    animation-delay: 8s;
}

@keyframes orb-float {
    0%, 100% {
        transform: translateY(0px) scale(1) rotate(0deg);
    }
    33% {
        transform: translateY(-30px) scale(1.1) rotate(120deg);
    }
    66% {
        transform: translateY(20px) scale(0.9) rotate(240deg);
    }
}

/* Animation for form elements */
.animate-in {
    animation: field-enter 0.4s ease-out var(--delay) both;
}

@keyframes field-enter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qualek-link {
    display: inline-block;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(0, 136, 255, 0.3);
    border-radius: 25px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.qualek-link:hover {
    transform: translateY(-2px) scale(1.05);
    border-color: #0088ff;
    box-shadow: 0 10px 25px rgba(0, 136, 255, 0.3);
}

.qualek-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 136, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.qualek-link:hover .qualek-glow {
    left: 100%;
}

.container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.auth-card {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 136, 255, 0.1);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow:
            0 25px 50px rgba(0, 0, 0, 0.5),
            0 0 0 1px rgba(0, 136, 255, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #0088ff, transparent);
    animation: scanline 3s ease-in-out infinite;
}

@keyframes scanline {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.auth-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 30px;
    position: relative;
    border: 1px solid rgba(0, 136, 255, 0.1);
}

.toggle-btn {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: #888;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    position: relative;
    z-index: 2;
    font-family: inherit;
}

.toggle-btn.active {
    color: #000;
    font-weight: 600;
}

.toggle-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: linear-gradient(45deg, #0088ff, #0066cc);
    border-radius: 8px;
    transition: transform 0.3s ease;
    z-index: 1;
}

.toggle-btn[data-form="signup"].active ~ .toggle-slider {
    transform: translateX(100%);
}

/* Form Containers */
.form-container {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.form-container.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.card-header {
    text-align: center;
    margin-bottom: 30px;
}

.card-header h1 {
    color: #ffffff;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    background: linear-gradient(45deg, #ffffff, #0088ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-header p {
    color: #888;
    font-size: 14px;
    font-weight: 400;
}

.auth-form {
    margin-bottom: 25px;
}

.input-row {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.input-row .input-group {
    flex: 1;
    margin-bottom: 0;
}

.input-group {
    position: relative;
    margin-bottom: 25px;
}

.input-group input {
    width: 100%;
    padding: 15px 0;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 16px;
    font-family: inherit;
}

.input-group label {
    position: absolute;
    top: 15px;
    left: 0;
    color: #888;
    font-size: 16px;
    transition: all 0.3s ease;
    pointer-events: none;
}

.input-group input:focus + label,
.input-group input:valid + label {
    top: -5px;
    font-size: 12px;
    color: #0088ff;
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: #333;
}

.input-line::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #0088ff, #0066cc);
    transition: width 0.3s ease;
}

.input-group input:focus ~ .input-line::after {
    width: 100%;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    color: #888;
    cursor: pointer;
    flex-wrap: wrap;
    gap: 5px;
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #333;
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-container input:checked + .checkmark {
    background: #0088ff;
    border-color: #0088ff;
}

.checkbox-container input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 12px;
    font-weight: bold;
}

.terms-link {
    color: #0088ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.terms-link:hover {
    color: #0066cc;
}

.forgot-password {
    color: #0088ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #0066cc;
}

.auth-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #0088ff, #0066cc);
    border: none;
    border-radius: 10px;
    color: #000;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    font-family: inherit;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 136, 255, 0.3);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.auth-btn:hover .btn-glow {
    left: 100%;
}

.divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #333;
}

.divider span {
    background: rgba(0, 0, 0, 0.8);
    padding: 0 15px;
    color: #888;
    font-size: 14px;
}

.social-login {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.social-btn {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #333;
    border-radius: 8px;
    color: #888;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    min-width: 140px;
}

.social-btn:hover {
    background: rgba(0, 136, 255, 0.1);
    border-color: #0088ff;
    color: #0088ff;
}

.social-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Responsive Design */
@media (max-width: 480px) {
    .container {
        padding: 15px;
        max-width: 100%;
    }

    .auth-card {
        padding: 30px 20px;
    }

    .card-header h1 {
        font-size: 24px;
    }

    .form-options {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .input-row {
        flex-direction: column;
        gap: 0;
    }

    .auth-toggle {
        margin-bottom: 25px;
    }

    .toggle-btn {
        padding: 10px 15px;
        font-size: 13px;
    }

    .social-btn {
        min-width: 120px;
        padding: 10px 20px;
    }

    .made-by {
        top: 15px;
        left: 15px;
    }

    .qualek-link {
        padding: 8px 16px;
    }

    .qualek-text {
        font-size: 12px;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #0088ff;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0066cc;
}
