:root {
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 20px;
    --space-lg: 30px;
    --space-xl: 50px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 50px;
}

body {
    margin: 0;
    /* height: 80vh; */
    min-height: 100vh;
    /* YOUR SPACE BACKGROUND */
    background: url("/public/bg3.jpg") no-repeat center center/cover;
    background-attachment: fixed;
}

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

section {
    width: 100%;
    display: flex;
    justify-content: center;
}

main {
    min-height: calc(100vh - 70px);
    /* adjust navbar height */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-lg);
    width: 100%;
    padding: 15px 50px;
    box-shadow: 0 2px 10px rgba(79, 78, 78, 0.5);
}

.navbar__logo {
    font-size: 20px;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.navbar_menu {
    list-style: none;
    display: flex;
    gap: var(--space-md);
}

.navbar_menu a {
    text-decoration: none;
    color: #eee;
    transition: 0.3s;
}

.navbar_menu a:hover {
    color: #656666;
}

.hamburger {
    display: none;
    font-size: 28px;
    cursor: pointer;
    color: #eee;
}

.container {
    background: rgba(162, 161, 161, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
    width: 768px;
    max-width: 100%;
    min-height: 480px;
}

.container p {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.3px;
    margin: 20px 0;
}

.container span {
    font-size: 12px;
}

.container a {
    color: #333;
    font-size: 13px;
    text-decoration: none;
    margin: 15px 0 10px;
}

.container button {
    background-color: #404040;
    color: #fff;
    font-size: 12px;
    padding: 10px 45px;
    border: 1px solid transparent;
    border-radius: 102px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 10px;
    cursor: pointer;
}

.container button.hidden {
    background-color: transparent;
    border-color: #fff;
}

.container form {
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    height: 100%;
}

.container input {
    background-color: #eee;
    border: none;
    margin: 8px 0;
    padding: 10px 15px;
    font-size: 13px;
    border-radius: 8px;
    width: 100%;
    outline: none;
}

.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.sign-in {
    left: 0;
    width: 50%;
    z-index: 2;
}

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

.sign-up {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

.container.active .sign-up {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    animation: move 0.6s;
}

.social-icons {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.social-icons a {
    width: 45px;
    height: 45px;
    border: 1px solid #121010;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: 0.3s;
}

.social-icons a i {
    font-size: 20px;
    color: #333;
}

.social-icons a:hover {
    background: #1b1919;
    transform: scale(1.1);
}

.social-icons a:hover i {
    color: white;
}

.toggle-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: all 0.6s ease-in-out;
    border-radius: 150px 0 0 100px;
    z-index: 1000;
}

.container.active .toggle-container {
    transform: translateX(-100%);
    border-radius: 0 150px 100px 0;
}

.toggle {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05));
    color: #fff;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: all 0.6s ease-in-out;
}

.container.active .toggle {
    transform: translateX(50%);
}

.toggle-panel {
    position: absolute;
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 30px;
    text-align: center;
    top: 0;
    transform: translateX(0);
    transition: all 0.6s ease-in-out;
}

.toggle-left {
    transform: translateX(-200%);
}

.container.active .toggle-left {
    transform: translateX(0);
}

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

.container.active .toggle-right {
    transform: translateX(200%);
}

.footer {
    text-align: center;
    padding: var(--space-md);
    margin-top: var(--space-lg);
    color: #eee;
}

@media (max-width: 768px) {
    main {
        height: auto;
        padding: 20px;
    }
    .container {
        width: 100%;
        min-height: auto;
        border-radius: 20px;
        overflow: hidden;
    }
    .container {
        display: flex;
        flex-direction: column;
    }
    .form-container {
        position: relative;
        width: 100%;
    }
    /* 🔥 ONLY SHOW ONE FORM */
    .sign-in,
    .sign-up {
        width: 100%;
        position: relative;
        top: 0;
        left: 0;
    }
    /* default → show signup */
    .sign-up {
        opacity: 1 !important;
        z-index: 5 !important;
        position: relative;
    }
    .sign-in {
        opacity: 0 !important;
        z-index: 1 !important;
    }
    /* toggle behavior */
    .container.active .sign-up {
        opacity: 0;
    }
    .container.active .sign-in {
        opacity: 1;
    }
    .toggle-container {
        display: none;
    }
    /* form styling */
    .container form {
        padding: 25px;
    }
    .container button {
        width: 100%;
    }
    /* navbar fix */
    .navbar_menu {
        display: none;
    }
    .hamburger {
        display: block;
    }
}

@media (max-width: 1024px) {
    .container {
        width: 90%;
    }
    .toggle-panel h1 {
        font-size: 24px;
    }
    .toggle-panel p {
        font-size: 14px;
    }
}

#mobileMessage {
    display: none;
}

@media (max-width: 1024px) {
    #desktopPage {
        display: none !important;
    }
    #mobileMessage {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: #0f0f0f;
        justify-content: center;
        align-items: center;
        z-index: 9999;
    }
    .mobile-box {
        background: rgba(255, 255, 255, 0.05);
        padding: 30px;
        border-radius: 15px;
        text-align: center;
        color: white;
        backdrop-filter: blur(10px);
        max-width: 300px;
    }
}