:root {
    --bg-dark: #050505;
    --panel-bg: rgba(15, 15, 20, 0.6);
    --panel-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f1f1f1;
    --text-secondary: #8c8c9a;
    --accent-color: #00f2fe;
    --accent-gradient: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    --error-color: #ff4b4b;
    --success-color: #2ea043;
    --shadow-glow: 0 0 20px rgba(0, 242, 254, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Premium Animated Background */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-size: 40px 40px;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    z-index: -1;
    pointer-events: none;
}

.blob-c {
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: -2;
    filter: blur(80px);
}

.shape {
    position: absolute;
    border-radius: 50%;
    animation: float 20s infinite;
    opacity: 0.6;
}

.blob1 {
    width: 400px;
    height: 400px;
    background: #00f2fe;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.blob2 {
    width: 300px;
    height: 300px;
    background: #4facfe;
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
    animation-duration: 15s;
}

.blob3 {
    width: 350px;
    height: 350px;
    background: rgba(142, 45, 226, 0.4);
    top: 40%;
    left: 40%;
    animation-delay: -10s;
    animation-duration: 25s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 48px;
    border-radius: 24px;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 10;
}

.animate-on-load {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.logo-icon-wrapper {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-glow);
}

.logo h2 {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge {
    background: var(--accent-gradient);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeInForm 0.4s ease forwards;
}

@keyframes fadeInForm {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group svg {
    position: absolute;
    left: 16px;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.input-group input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--panel-border);
    color: var(--text-primary);
    padding: 16px 16px 16px 48px;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.input-group input:focus {
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(0, 242, 254, 0.1);
}

.input-group input:focus+svg,
.input-group:focus-within svg {
    color: var(--accent-color);
}

.btn {
    padding: 16px 24px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary.glow-btn {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 242, 254, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary.glow-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-20deg);
    transition: left 0.5s;
}

.btn-primary.glow-btn:hover::after {
    left: 150%;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 242, 254, 0.4);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(1px);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-icon {
    transition: transform 0.3s;
}

.btn-primary:hover .btn-icon {
    transform: translateX(4px);
}

.btn-block {
    width: 100%;
    margin-top: 12px;
}

.auth-switch {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 16px;
}

.auth-switch a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s ease;
    margin-left: 4px;
}

.auth-switch a:hover {
    color: #fff;
    text-decoration: underline;
}

.alert {
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.3s ease forwards;
}

.alert-error {
    background: rgba(255, 75, 75, 0.1);
    border: 1px solid rgba(255, 75, 75, 0.3);
    color: var(--error-color);
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

.alert-success {
    background: rgba(46, 160, 67, 0.1);
    border: 1px solid rgba(46, 160, 67, 0.3);
    color: var(--success-color);
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}