@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;
}

body{
    background-color: #212121;
    background: linear-gradient(to right, #212121, #1a1a1a);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 100vh;
    color: #f2cc0f;
}

.mobile-toggle {
    display: none;
}

.container{
    background-color: #2a2a2a;
    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;
    color: #f2cc0f;
}

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

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

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

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

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

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

.container input::placeholder {
    color: #f2cc0f;
}

.password-container {
    position: relative;
    width: 100%;
}

.password-container i {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #f2cc0f;
}

.error {
    color: #ff6b6b;
    font-size: 12px;
    margin-top: -5px;
    margin-bottom: 10px;
}

.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;
}

@keyframes move{
    0%, 49.99%{
        opacity: 0;
        z-index: 1;
    }
    50%, 100%{
        opacity: 1;
        z-index: 5;
    }
}

.social-icons{
    margin: 20px 0;
}

.social-icons a{
    border: 1px solid #ccc;
    border-radius: 20%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 3px;
    width: 40px;
    height: 40px;
}

.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-color: #f2cc0f;
    height: 100%;
    background: linear-gradient(to right, #212121, #2a2a2a);
    color: #f2cc0f;
    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%);
}

/* Mobile Responsive Styles */
@media (max-width: 768px), (orientation: portrait) {
    body {
        padding: 20px;
        height: auto;
        min-height: 100vh;
    }

    .container {
        width: 100%;
        max-width: 400px;
        min-height: auto;
        border-radius: 20px;
        padding: 30px 20px;
    }

    /* Hide the decorative toggle panel on mobile */
    .toggle-container {
        display: none;
    }

    /* Reset form containers for mobile */
    .form-container {
        position: relative;
        width: 100% !important;
        height: auto;
        transition: all 0.3s ease-in-out;
    }

    .sign-in {
        position: relative;
        left: 0;
        opacity: 1;
        z-index: 2;
        display: block;
    }

    .sign-up {
        position: relative;
        left: 0;
        opacity: 0;
        z-index: 1;
        display: none;
        height: 0;
        overflow: hidden;
    }

    /* When active, show sign-up and hide sign-in */
    .container.active .sign-in {
        opacity: 0;
        display: none;
        height: 0;
        overflow: hidden;
        transform: none;
    }

    .container.active .sign-up {
        opacity: 1;
        display: block;
        height: auto;
        transform: none;
    }

    /* Form adjustments */
    .container form {
        padding: 0 10px;
    }

    .container h1 {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .container p {
        font-size: 13px;
        margin: 15px 0;
    }

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

    .container input {
        padding: 12px 15px;
        font-size: 14px;
        margin: 6px 0;
    }

    .container button {
        padding: 12px 40px;
        font-size: 13px;
        width: 100%;
        margin-top: 15px;
    }

    .social-icons {
        margin: 15px 0;
    }

    .social-icons a {
        width: 38px;
        height: 38px;
        margin: 0 5px;
    }

    /* Mobile toggle buttons */
    .mobile-toggle {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin-bottom: 20px;
        padding: 5px;
        background-color: #3a3a3a;
        border-radius: 12px;
    }

    .mobile-toggle button {
        flex: 1;
        padding: 10px 20px;
        background-color: transparent;
        color: #f2cc0f;
        border: none;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 600;
        transition: all 0.3s ease;
        margin: 0;
        text-transform: none;
    }

    .mobile-toggle button.active {
        background-color: #f2cc0f;
        color: #212121;
    }
}

/* Extra small screens */
@media (max-width: 380px) {
    .container {
        padding: 20px 15px;
    }

    .container h1 {
        font-size: 22px;
    }

    .social-icons a {
        width: 35px;
        height: 35px;
        margin: 0 3px;
    }
}