/* ── PAGE WRAPPER ── */
.auth-wrapper {
    height: 100vh;
    min-height: 100dvh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── VIDEO BACKGROUND ── */
.bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.5);
}

/* ── GLASS CARD ── */
.auth-card {
    position: relative;
    z-index: 2;
    width: 950px;
    max-width: 95%;
    height: 550px;
    display: flex;
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    background: rgba(var(--white-color-rgb), 0.08);
    box-shadow: var(--box-shadow);
}

/* ── SLIDER (desktop panel) ── */
.slider {
    position: absolute;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    transition: all 0.6s cubic-bezier(.77, 0, .18, 1);
    z-index: 3;
    left: 0;
}

/* Slide panel to the right when in register mode */
.auth-card.register-mode .slider {
    transform: translateX(100%);
}

/* ── FORM SIDES (desktop) ── */
.form-side {
    width: 50%;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
}

/* ── INPUT ── */
.form-control {
    background: rgba(var(--white-color-rgb), 0.2);
    color: var(--white-color);
    border-radius: var(--border-radius);
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 14px;
    width: 100%;
    box-sizing: border-box;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(var(--white-color-rgb), 0.25);
}

/* ── SWITCH LINK ── */
.switch {
    cursor: pointer;
    margin-top: 15px;
    text-decoration: underline;
}

/* ── TITLES ── */
h2 {
    font-weight: 700;
}

/* ── MOBILE TAB BAR (hidden on desktop) ── */
.auth-mobile-tabs {
    display: none;
}

/* ══════════════════════════════
   RESPONSIVE — tablet & mobile
══════════════════════════════ */
@media (max-width: 768px) {

    /* Wrapper: allow vertical scroll on very small viewports */
    .auth-wrapper {
        align-items: flex-start;
        overflow-y: auto;
        padding: 16px 0 32px;
    }

    /* Card becomes a stacked column, centered horizontally */
    .auth-card {
        flex-direction: column;
        width: 92%;
        max-width: 440px;
        height: auto;
        min-height: unset;
        border-radius: 16px;
        margin: auto;
        overflow: visible; /* allow tab bar to sit outside card cleanly */
    }

    /* Hide the desktop sliding panel entirely */
    .slider {
        display: none;
    }

    /* Show mobile tab bar */
    .auth-mobile-tabs {
        display: flex;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.18);
        background: rgba(255, 255, 255, 0.04);
        border-radius: 16px 16px 0 0;
        overflow: hidden;
    }

    .auth-mobile-tabs button {
        flex: 1;
        padding: 14px 0;
        border: none;
        background: transparent;
        color: rgba(255, 255, 255, 0.45);
        font-size: 0.95rem;
        font-weight: 600;
        cursor: pointer;
        letter-spacing: 0.4px;
        border-bottom: 3px solid transparent;
        transition: color 0.25s, border-color 0.25s;
    }

    .auth-mobile-tabs button.active {
        color: #fff;
        border-bottom: 3px solid var(--primary-color, #7c3aed);
    }

    /* Forms: hidden by default on mobile; JS adds .active to show one */
    .form-side {
        width: 100%;
        padding: 28px 24px 32px;
        display: none;
        box-sizing: border-box;
    }

    .form-side.active {
        display: flex;
    }

    /* Make submit buttons full-width with a bit more breathing room */
    .form-side .btn {
        margin-top: 4px;
    }
}

@media (max-width: 400px) {
    .form-side {
        padding: 22px 16px 28px;
    }

    .auth-mobile-tabs button {
        font-size: 0.88rem;
        padding: 12px 0;
    }
}
