:root {
    --bg-color: #050510;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --primary: #ffffff;
    --secondary: #8888aa;
    --accent: #2997ff;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --easing: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
}

body {
    background-color: var(--bg-color);
    color: var(--primary);
    font-family: var(--font-body);
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

#warpCanvas {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    opacity: 1;
    background: var(--bg-color);
}

.split-layout {
    position: relative;
    z-index: 10;
    display: flex;
    width: 100%;
    height: 100vh;
    max-width: 1600px;
    margin: 0 auto;
    justify-content: space-between;
}

.brand-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 6rem 6rem 15rem;
    position: relative;
    min-width: 0;
}

.logo-mark {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--primary);
    background: linear-gradient(135deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    background-size: 200% auto;
    animation: textShimmer 3s linear infinite;
}

@keyframes textShimmer {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 5.5rem;
    font-weight: 700;
    line-height: 1.15;
    padding-bottom: 0.1em;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, #ffffff 0%, #777777 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    animation: fadeUp 1s var(--easing) 0.2s forwards;
}

.hero-text {
    font-size: 1.35rem;
    color: var(--secondary);
    max-width: 450px;
    line-height: 1.6;
    opacity: 0;
    animation: fadeUp 1s var(--easing) 0.4s forwards;
}

.brand-footer {
    position: absolute;
    bottom: 3rem;
    left: 15rem;
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
}

.login-section {
    flex: 0 0 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 10rem 2rem 2rem;
    background: transparent;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 3rem;
    border-radius: 24px;
    background: rgba(10, 10, 20, 0.6);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.8);
    opacity: 0;
    animation: fadeUp 1s var(--easing) 0.6s forwards;
}

.card-header {
    text-align: center;
}

.card-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #fff;
}

.card-header p {
    color: var(--secondary);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

.input-group {
    position: relative;
    margin-bottom: 2rem;
}

.toggle-password {
    position: absolute;
    right: 0;
    top: 0.8rem;
    color: var(--secondary);
    cursor: pointer;
    z-index: 5;
    transition: color 0.3s;
    font-size: 1.1rem;
}

.toggle-password:hover {
    color: #fff;
}

.input-group input {
    width: 100%;
    background: transparent !important;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.8rem 0;
    color: #fff !important;
    font-size: 1.25rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
    border-radius: 0;
}

/* Autofill override */
.input-group input:-webkit-autofill,
.input-group input:-webkit-autofill:hover,
.input-group input:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    -webkit-box-shadow: 0 0 0px 1000px #000 inset;
    transition: background-color 5000s ease-in-out 0s;
}

.input-group label {
    position: absolute;
    top: 0.8rem;
    left: 0;
    color: var(--secondary);
    pointer-events: none;
    transition: all 0.3s var(--easing);
    font-size: 1.25rem;
}

.input-group .line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 1px;
    background: var(--accent);
    transition: width 0.4s var(--easing);
}

.input-group input:focus~label,
.input-group input:not(:placeholder-shown)~label {
    top: -1.2rem;
    font-size: 0.85rem;
    color: var(--accent);
}

.input-group input:focus~.line {
    width: 100%;
}

.actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--secondary);
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    position: relative;
}

.checkbox-container input:checked~.checkmark {
    background: var(--accent);
    border-color: var(--accent);
}

.checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked~.checkmark::after {
    display: block;
}

.forgot-link {
    color: var(--secondary);
    text-decoration: none;
}

.forgot-link:hover {
    color: #fff;
}

.magnetic-btn {
    width: 100%;
    padding: 1.2rem;
    border: none;
    background: #fff;
    color: #000;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: var(--font-heading);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-fill {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0%;
    height: 0%;
    background: var(--accent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: 0;
}

.magnetic-btn:hover .btn-fill {
    width: 350%;
    height: 350%;
}

.btn-text {
    position: relative;
    z-index: 1;
    transition: color 0.3s;
}

.magnetic-btn:hover .btn-text {
    color: #fff;
}

.magnetic-btn.loading .btn-text {
    visibility: hidden;
}

.magnetic-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1024px) {
    .split-layout {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .brand-section {
        padding: 4rem 2rem;
        align-items: center;
        text-align: center;
        height: auto;
        flex: 0 0 auto;
    }

    .brand-footer {
        display: none;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .login-section {
        flex: 1;
        background: transparent;
        padding: 2rem 2rem 4rem;
        border-left: none;
    }
}