* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Floating particles background */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 15s infinite linear;
}

@keyframes float {
    0% { transform: translateY(0) translateX(0) rotate(0deg); }
    100% { transform: translateY(-100vh) translateX(100px) rotate(360deg); }
}

.logo {
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: 10;
    transition: all 0.3s ease;
}

.logo img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(255, 235, 167, 0.5));
}

.logo:hover {
    transform: scale(1.1);
}

.container {
    position: relative;
    z-index: 5;
    width: 100%;
    max-width: 500px;
    perspective: 1000px;
}

.card-3d-wrap {
    position: relative;
    width: 100%;
    height: 500px;
    transform-style: preserve-3d;
}

.card-3d-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-front{
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    background: rgba(42, 43, 56, 0.5);
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    padding: 40px 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.card-back {
    position: absolute;
    width: 100%;
    height: 120%;
    backface-visibility: hidden;
    border-radius: 20px;
    background: rgba(42, 43, 56, 0.5);
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    padding: 30px 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}



.toggle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    position: relative;
}

.toggle-btn {
    display: flex;
    background: rgba(31, 32, 41, 0.7);
    border-radius: 30px;
    padding: 5px;
    position: relative;
    z-index: 1;
}

.toggle-btn label {
    padding: 10px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    color: #c4c3ca;
    z-index: 2;
    transition: all 0.3s ease;
}

.toggle-btn input[type="checkbox"] {
    display: none;
}

.toggle-btn .slider {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 120px;
    height: 40px;
    background: linear-gradient(45deg, #ffeba7, #ff6b6b);
    border-radius: 25px;
    z-index: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#reg-log:checked ~ .toggle-btn .slider {
    transform: translateX(125px);
}

#reg-log:checked ~ .card-3d-wrapper {
    transform: rotateY(180deg);
}

h4 {
    text-align: center;
    margin-bottom: 30px;
    color: #fff;
    font-weight: 600;
    font-size: 24px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.form-group {
    position: relative;
    margin-bottom: 25px;
}

.form-style {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(31, 32, 41, 0.3);
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.form-style:focus {
    border-color: #E43f5a;
    box-shadow: 0 0 15px rgba(228, 63, 90, 0.3);
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #E43f5a;
    font-size: 18px;
}

.btn {
    background: linear-gradient(45deg, #E43f5a, #ff6b6b);
    border: none;
    color: white;
    padding: 15px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
    width: 100%;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.6);
}

.btn:active {
    transform: translateY(1px);
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: all 0.5s ease;
}

.btn:hover::after {
    transform: translateX(100%);
}

.forgot-password {
    text-align: center;
    margin-top: 20px;
    color: #c4c3ca;
    font-size: 14px;
}

.forgot-password a {
    color: #c4c3ca;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.forgot-password a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #E43f5a;
    transition: all 0.3s ease;
}

.forgot-password a:hover::after {
    width: 100%;
}

.social-login {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.social-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 18px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-btn:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.facebook:hover {
    background: #3b5998;
}

.twitter:hover {
    background: #1da1f2;
}

.google:hover {
    background: #dd4b39;
}

/* Responsive design */
@media (max-width: 480px) {
    .card-front, .card-back {
        padding: 30px 20px;
    }
    
    .toggle-btn label {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .toggle-btn .slider {
        width: 90px;
        height: 35px;
    }
    
    #reg-log:checked ~ .toggle-btn .slider {
        transform: translateX(95px);
    }
    
    h4 {
        font-size: 22px;
    }
}