

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
}

body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    background: hsl(222, 47%, 8%);
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
    color: hsl(210, 40%, 98%);
}

:root {
    --background: hsl(222, 47%, 8%);
    --foreground: hsl(210, 40%, 98%);
    --card: hsl(222, 47%, 11%);
    --muted: hsl(219, 36%, 22%);
    --muted-foreground: hsl(215, 20%, 65%);
    --border: hsl(181, 39%, 33%);
    --primary: hsl(270, 91%, 65%);
    --lamp-purple: hsl(270, 91%, 65%);
    --lamp-blue: hsl(217, 91%, 60%);
    --lamp-dark: hsl(222, 47%, 8%);
}

/* ── Full-screen container ── */
.container {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: row;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* ── Auth side (LEFT) ── */
.auth-side {
    width: 480px;
    min-width: 380px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    background: hsl(222, 47%, 8%);
    border-right: 1px solid var(--border);
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
    z-index: 1;
}

.auth-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 16rem;
    height: 16rem;
    background: hsla(270, 91%, 65%, 0.05);
    border-radius: 50%;
    filter: blur(48px);
}

.auth-side::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12rem;
    height: 12rem;
    background: hsla(217, 91%, 60%, 0.05);
    border-radius: 50%;
    filter: blur(48px);
}

.form-wrapper {
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 10;
}

/* Logo */
.logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 8px 32px rgba(189, 36, 223, 0.20);
}

.logo svg {
    width: 40px;
    height: 40px;
    fill: var(--foreground);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-15px); }
}

.logo-container h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #c8d8ff 55%, #9ab3ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.06em;
}

.logo-container p {
    display: inline-block;
    color: var(--muted-foreground);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    padding: 5px 16px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0.25rem;
    background: hsla(217, 33%, 17%, 0.3);
    border-radius: 0.75rem;
    margin-bottom: 2rem;
}

.tab-btn {
    flex: 1;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--muted-foreground);
    background: transparent;
}

.tab-btn:hover {
    color: var(--foreground);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--lamp-purple), var(--lamp-blue));
    color: var(--foreground);
    box-shadow: 0 4px 15px hsla(270, 91%, 65%, 0.3);
}

.message-list {
    margin-bottom: 1rem;
}

.message-item {
    border-radius: 0.75rem;
    padding: 0.7rem 0.9rem;
    font-size: 0.82rem;
    border: 1px solid transparent;
    margin-bottom: 0.5rem;
}

.message-item.success {
    background: hsla(140, 55%, 40%, 0.2);
    border-color: hsla(140, 55%, 40%, 0.45);
    color: hsl(140, 85%, 82%);
}

.message-item.error {
    background: hsla(0, 75%, 52%, 0.18);
    border-color: hsla(0, 75%, 52%, 0.42);
    color: hsl(0, 90%, 85%);
}

/* Form */
.form {
    display: none;
}

.form.active {
    display: block;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
}

.auth-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    background: hsla(255, 255%, 255%, 0.05);
    border: 1px solid hsla(255, 255%, 255%, 0.1);
    color: var(--foreground);
    font-size: 0.875rem;
    outline: none;
    transition: all 0.3s;
}

.auth-input::placeholder {
    color: var(--muted-foreground);
}

.auth-input:focus {
    border-color: var(--primary);
    background: hsla(255, 255%, 255%, 0.1);
    box-shadow: 0 0 20px hsla(270, 91%, 65%, 0.2);
}

.forgot-link {
    display: block;
    text-align: right;
    font-size: 1.0rem;
    color: var(--primary);
    text-decoration: none;
    margin-bottom: 1.25rem;
    transition: opacity 0.3s;
}

.forgot-link:hover {
    opacity: 0.8;
}

.btn-gradient {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border-radius: 0.75rem;
    border: none;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--foreground);
    background: linear-gradient(135deg, var(--lamp-purple), var(--lamp-blue));
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px hsla(270, 91%, 65%, 0.4);
}

.btn-gradient svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s;
}

.btn-gradient:hover svg {
    transform: translateX(4px);
}


/* ── Video side (RIGHT) ── */
.video-side {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    overflow: hidden;
    background: hsl(222, 47%, 8%);
    height: 100%;
}

.video-side .background-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    display: block;
}


.video-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center,
    hsla(222, 47%, 8%, 0.4) 0%,
    hsla(222, 47%, 8%, 0.95) 100%);
}

/* Floating Particles */
.particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--lamp-purple);
    border-radius: 50%;
    opacity: 0.4;
    animation: particleFloat 8s ease-in-out infinite;
}

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

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

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

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

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

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    animation: pulse 4s ease-in-out infinite;
}

.back-button {
    position: fixed;
    top: 18px;
    left: 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.04em;
    padding: 8px 16px 8px 12px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    z-index: 100;
    transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.2s;
}

.back-button svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.back-button:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.22);
    transform: translateX(-2px);
}

.back-button:hover svg {
    transform: translateX(-3px);
}


.glow-orb.purple {
    width: 200px;
    height: 200px;
    background: var(--lamp-purple);
    top: 20%;
    right: 64%;
}

.glow-orb.blue {
    width: 150px;
    height: 150px;
    background: var(--lamp-blue);
    bottom: 30%;
    left: 30%;
    animation-delay: 2s;
}

@keyframes particleFloat {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0.4;
    }
    50% {
        transform: translateY(-30px) translateX(20px);
        opacity: 0.8;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.2;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.1);
    }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    body {
        overflow-y: auto;
    }

    .container {
        position: relative;
        flex-direction: column;
        width: 100%;
        height: auto;
        min-height: 100vh;
    }

    .video-side {
        display: none;
    }

    .auth-side {
        width: 100%;
        min-width: unset;
        flex-shrink: unset;
        min-height: 100vh;
        height: auto;
        border-right: none;
    }
}
