@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    height: 100vh;
    overflow: hidden;
    background: #050816;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* ANIMATED BACKGROUND */
.background-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 20%, #ff00cc55, transparent 25%),
        radial-gradient(circle at 80% 30%, #3333ff55, transparent 25%),
        radial-gradient(circle at 50% 80%, #00ccff55, transparent 25%),
        radial-gradient(circle at 70% 70%, #ff339955, transparent 25%);
    animation: floatBackground 10s infinite alternate ease-in-out;
    filter: blur(40px);
}

@keyframes floatBackground {
    0% {
        transform: scale(1) translateY(0px);
    }

    100% {
        transform: scale(1.2) translateY(-30px);
    }
}

/* MAIN CONTAINER */
.main-container {
    width: 90%;
    max-width: 1250px;
    height: 90vh;
    background: white;
    border-radius: 30px;
    overflow: hidden;
    display: flex;
    position: relative;
    z-index: 2;
    box-shadow: 0px 0px 40px rgba(0, 0, 0, 0.5);
}

/* LEFT PANEL */
.left-panel {
    width: 45%;
    background:
        linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)),
        url('https://images.unsplash.com/photo-1519681393784-d120267933ba?q=80&w=1200&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px;
    color: white;
}

.quote-top {
    font-size: 12px;
    letter-spacing: 4px;
    font-weight: 500;
}

.left-content h1 {
    font-size: 70px;
    line-height: 1;
    margin-bottom: 20px;
    font-weight: 600;
}

.left-content p {
    font-size: 15px;
    width: 80%;
    line-height: 1.7;
}

/* RIGHT PANEL */
.right-panel {
    width: 55%;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 80px;
    position: relative;
}

.logo {
    position: absolute;
    top: 40px;
    left: 80px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 600;
}

.logo-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff, #ffffff);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0px 0px 15px rgba(108, 60, 255, 0.4);
}

h2 {
    font-size: 55px;
    margin-bottom: 10px;
    color: #111;
}

.subtitle {
    color: #777;
    margin-bottom: 35px;
}

/* SWITCH BUTTONS */
.switch-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.switch-buttons button {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding-bottom: 8px;
    border-bottom: 2px solid transparent;
}

.active-btn {
    color: #6c3cff;
    border-bottom: 2px solid #6c3cff !important;
    font-weight: 600;
}

/* FORM */
form {
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 8px;
    font-size: 14px;
    color: #444;
}

input {
    padding: 16px;
    border: none;
    background: #f3f3f3;
    border-radius: 10px;
    margin-bottom: 22px;
    font-size: 15px;
}

input:focus {
    outline: none;
    border: 2px solid #6c3cff;
}

.password-box {
    position: relative;
    margin-bottom: 22px;
}

.password-box input {
    width: 100%;
    margin-bottom: 0;
    padding-right: 55px;
}

.toggle-password {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    color: #777;
    user-select: none;
    transition: 0.3s;
}

.toggle-password:hover {
    color: #6c3cff;
}

/* BUTTON */
.submit-btn {
    padding: 16px;
    border: none;
    background: black;
    color: white;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

.submit-btn:hover {
    background: #6c3cff;
}

/* BOTTOM TEXT */
.bottom-text {
    margin-top: 25px;
    text-align: center;
    font-size: 14px;
}

.bottom-text span {
    color: #6c3cff;
    font-weight: 600;
    cursor: pointer;
}

.hidden {
    display: none;
}

/* MOBILE RESPONSIVE – FIXED: visible margins all around */
@media(max-width:950px) {
    body {
        overflow: auto;
        padding-top: env(safe-area-inset-top, 10px);
        min-height: 100dvh;
        height: auto;
        align-items: flex-start;
    }

    .main-container {
        flex-direction: column;
        width: auto;
        /* allows margins to work */
        margin: 15px 12px 12px 12px;
        /* visible top, left, right, bottom gaps */
        height: auto;
        border-radius: 30px;
        box-shadow: 0px 0px 25px rgba(0, 0, 0, 0.4);
    }

    .left-panel {
        width: 100%;
        min-height: 280px;
        border-radius: 30px 30px 0 0;
    }

    .left-content h1 {
        font-size: 45px;
    }

    .left-content p {
        width: 100%;
    }

    .right-panel {
        width: 100%;
        padding: 40px 30px;
        border-radius: 0 0 30px 30px;
    }

    .logo {
        position: relative;
        top: 0;
        left: 0;
        margin-bottom: 25px;
    }

    h2 {
        font-size: 38px;
    }
}

@media(max-width:600px) {
    .left-panel {
        padding: 25px;
        min-height: 260px;
    }

    .left-content h1 {
        font-size: 36px;
    }

    .right-panel {
        padding: 30px 20px;
    }

    input {
        padding: 14px;
    }

    .submit-btn {
        padding: 14px;
    }

    .main-container {
        margin: 12px 10px 10px 10px;
    }
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 600;
}

.success-message {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 600;
}