/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(-45deg, #6e45e2, #88d3ce, #ff758c, #ff7eb3);
    background-size: 400% 400%;
    animation: gradientBG 12s ease infinite;
}

/* Gradient background animation */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating background shapes */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
    animation: float 10s infinite ease-in-out alternate;
}
.shape1 {
    width: 200px; height: 200px;
    background: #ff758c;
    top: 10%; left: 15%;
}
.shape2 {
    width: 250px; height: 250px;
    background: #6e45e2;
    bottom: 15%; right: 10%;
}
.shape3 {
    width: 150px; height: 150px;
    background: #88d3ce;
    top: 60%; left: 5%;
}

@keyframes float {
    0% { transform: translateY(0px) translateX(0px); }
    100% { transform: translateY(-30px) translateX(20px); }
}

/* Main container */
.container {
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

/* Glass form box */
.form-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 35px;
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    color: rgb(0, 0, 0);
    transform: scale(0.95);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.form-box:hover {
    transform: scale(1);
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.4);
}

.form-box.animate {
    animation: fadeSlide 0.6s ease;
}

@keyframes fadeSlide {
    0% { transform: translateY(-30px) scale(0.9); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* Title */
h2 {
    margin-bottom: 20px;
    font-size: 26px;
    letter-spacing: 1px;
}

/* Inputs */
.form input {
    width: 100%;
    padding: 12px;
    margin: 12px 0;
    border: none;
    border-radius: 8px;
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    color: rgb(0, 0, 0);
    transition: 0.3s;
}
.form input:focus {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 12px #ffeb3b;
}
.form input::placeholder {
    color: rgba(0, 0, 0, 0.7);
}

/* Password icon */
.password-container {
    position: relative;
}
.password-container input {
    padding-right: 40px;
}
.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgb(0, 0, 0);
    cursor: pointer;
    font-size: 16px;
}

/* Button */
.btn {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    background: linear-gradient(135deg, #ff758c, #ff7eb3);
    border: none;
    border-radius: 8px;
    color: rgb(255, 255, 255);
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 15px #ff7eb3;
}

/* Switch link */
.switch {
    margin-top: 15px;
}
.switch a {
    color: #ffeb3b;
    font-weight: bold;
    text-decoration: none;
}
.switch a:hover {
    text-decoration: underline;
}

/* Form display control */
.form {
    display: none;
    animation: fadeSlide 0.6s ease;
}
.form.active {
    display: block;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .form-box {
        padding: 25px;
    }
    h2 {
        font-size: 22px;
    }
    .bg-shape {
        display: none; /* hides shapes for small devices to avoid clutter */
    }
}
