@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

::-webkit-scrollbar { display: none; }
html { scrollbar-width: none; }

:root {
    --bg: #0d0d1a;
    --surface: #12102a;
    --accent: #7b2fff;
    --accent-glow: #a855f7;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f0eef6;
    --text-secondary: rgba(255, 255, 255, 0.55);
    --input-bg: rgba(255, 255, 255, 0.06);
    --radius: 16px;
    --transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.bg-orbs {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #7b2fff 0%, transparent 70%);
    top: -10%;
    left: -10%;
    animation: blobFloat1 18s ease-in-out infinite;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #a855f7 0%, transparent 70%);
    bottom: -10%;
    right: -5%;
    animation: blobFloat2 22s ease-in-out infinite;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #6d28d9 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: blobFloat3 15s ease-in-out infinite;
}

@keyframes blobFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(80px, 60px) scale(1.15); }
    66% { transform: translate(-40px, 80px) scale(0.9); }
}

@keyframes blobFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-60px, -80px) scale(1.1); }
    66% { transform: translate(40px, -40px) scale(0.95); }
}

@keyframes blobFloat3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-40%, -60%) scale(1.2); }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
}

.outer_div {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
    z-index: 1;
    padding: 20px;
    animation: fadeIn 0.6s ease-out;
}

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

.container {
    position: relative;
    width: 850px;
    max-width: 100%;
    min-height: 520px;
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.4s ease;
}

.sign-in-container {
    left: 0;
    width: 50%;
    z-index: 2;
    background: var(--surface);
}

.container.right-panel-active .sign-in-container {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
}

.sign-up-container {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
    background: var(--surface);
    pointer-events: none;
}

.container.right-panel-active .sign-up-container {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    pointer-events: all;
}

/* Panel transitions handled by opacity + transition on .form-container */

form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 48px;
    height: 100%;
    background: transparent;
    gap: 6px;
}

.title_h1 {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 2.5rem;
    letter-spacing: -1px;
    margin: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-glow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0;
    -webkit-text-fill-color: var(--text-secondary);
    background: none;
    margin-bottom: 10px;
}

#email_span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

input {
    width: 100%;
    padding: 14px 16px;
    background: var(--input-bg);
    border: 1px solid transparent;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

input::placeholder {
    color: var(--text-secondary);
}

input:focus {
    border-bottom-color: var(--accent);
    background: rgba(123, 47, 255, 0.06);
    box-shadow: 0 2px 16px rgba(123, 47, 255, 0.15);
}

button {
    padding: 13px 44px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-glow));
    color: #fff;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}

button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255,255,255,0.25), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

button:hover {
    box-shadow: 0 4px 24px rgba(123, 47, 255, 0.45);
    transform: translateY(-1px);
}

button:hover::after {
    opacity: 1;
}

button:active {
    transform: scale(0.97);
}

button.ghost {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
}

button.ghost:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
    z-index: 100;
}

.container.right-panel-active .overlay-container {
    transform: translateX(-100%);
}

.overlay {
    background: linear-gradient(135deg, #1a0a2e 0%, #3b1667 50%, #7b2fff 100%);
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

.container.right-panel-active .overlay {
    transform: translateX(50%);
}

.overlay-panel {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 48px;
    text-align: center;
    top: 0;
    height: 100%;
    width: 50%;
    transform: translateX(0);
    transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

.overlay-panel .title_h1 {
    background: none;
    -webkit-text-fill-color: #fff;
    font-size: 1.8rem;
}

.overlay-left {
    transform: translateX(-20%);
}

.container.right-panel-active .overlay-left {
    transform: translateX(0);
}

.overlay-right {
    right: 0;
    transform: translateX(0);
}

.container.right-panel-active .overlay-right {
    transform: translateX(20%);
}

.p_tag {
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
    margin: 16px 0 28px;
}

.mobile-tabs {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: rgba(13, 13, 26, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

.mobile-tab {
    flex: 1;
    padding: 14px;
    background: transparent;
    border: none;
    border-radius: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    margin: 0;
}

.mobile-tab.active {
    color: var(--accent-glow);
}

.mobile-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.swal2-popup {
    background: var(--surface) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius) !important;
}

.swal2-title {
    color: var(--text-primary) !important;
}

.swal2-html-container {
    color: var(--text-secondary) !important;
}

.swal2-confirm {
    background: linear-gradient(135deg, var(--accent), var(--accent-glow)) !important;
    border: none !important;
    border-radius: 10px !important;
}

/* ========== RESPONSIVE ========== */

/* Tablet */
@media (max-width: 850px) {
    .container {
        width: 95vw;
        min-height: 480px;
    }
    form {
        padding: 36px 28px;
    }
    .overlay-panel {
        padding: 0 28px;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .overlay-container {
        display: none;
    }

    .mobile-tabs {
        display: flex;
    }

    .container {
        width: 100%;
        min-height: 100vh;
        border-radius: 0;
        border: none;
    }

    .sign-in-container,
    .sign-up-container {
        width: 100%;
    }

    .container.right-panel-active .sign-in-container {
        transform: translateX(100%);
        opacity: 0;
    }

    .container.right-panel-active .sign-up-container {
        transform: translateX(0);
    }

    .sign-up-container {
        transform: translateX(-100%);
    }

    form {
        padding: 70px 28px 40px;
        justify-content: flex-start;
        padding-top: 80px;
    }

    .outer_div {
        padding: 0;
    }
}
