* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --white-transparent: rgba(255, 255, 255, 0.2);
    --white-transparent-darker: rgba(255, 255, 255, 0.25);
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    padding: 20px;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #8f9093;
    background-image: url('../img/BG LOGIN.jpg'); 
    animation: gradientAnimation 80s ease infinite;
    background-size: 100% 100%;
    z-index: -1;
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.container {
    position: relative;
    width: 25%;
    max-width: 800px;
    height: auto;
    min-height: 500px;
    background: var(--white-transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 10;
}

.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
    transition: all 0.6s ease-in-out;
}

.sign-in-container {
    left: 0;
    width: 100%;
    z-index: 2;
}


form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 5%;
    height: 100%;
    width: 100%;
}

h1 {
    font-weight: 700;
    margin-bottom: 30px;
    color: #fff;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    font-size: clamp(24px, 5vw, 28px);
}

.form-group {
    position: relative;
    margin-bottom: 30px;
}

input {
    background: rgba(255, 255, 255, 0.15);
    padding: 15px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    transition: all 0.3s;
    color: #000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

input:focus {
    background: var(--white-transparent-darker);
    box-shadow: 0 0 0 2px rgba(118, 75, 162, 0.5);
}

label {
    position: absolute;
    left: 15px;
    top: 17px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    pointer-events: none;
    transition: all 0.3s ease;
}

input:focus + label,
input:not(:placeholder-shown) + label {
    top: -25px;
    left: 10px;
    font-size: 12px;
    color: #fff;
    background: rgba(118, 75, 162, 0.7);
    padding: 2px 8px;
    border-radius: 3px;
    z-index: 10;
}

input::placeholder {
    color: transparent;
}

button {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

button:hover::before {
    left: 100%;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 15px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.forgot-password {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.forgot-password a {
    color: #fff;
    text-decoration: none;
    position: relative;
}

.forgot-password a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: #fff;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s;
}

.forgot-password a:hover::after {
    transform-origin: bottom left;
    transform: scaleX(1);
}

.overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.6s ease-in-out;
    z-index: 10;
}

.overlay {
    position: relative;
    width: 200%;
    height: 100%;
    left: -100%;
    background: linear-gradient(to right, 
        rgba(177, 178, 182, 0.8), 
        rgba(118, 75, 162, 0.9));
    color: #fff;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.overlay-panel {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    text-align: center;
    top: 0;
    height: 100%;
    width: 50%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.overlay-right {
    right: 0;
    transform: translateX(0);
}

.overlay-left {
    transform: translateX(-20%);
}

/* Active state transitions */
.container.right-panel-active .sign-in-container {
    transform: translateX(100%);
    opacity: 0;
    z-index: 1;
}

.container.right-panel-active .sign-up-container {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
}

.container.right-panel-active .overlay-container {
    transform: translateX(-100%);
}

.container.right-panel-active .overlay {
    transform: translateX(50%);
}

.container.right-panel-active .overlay-left {
    transform: translateX(0);
}

.container.right-panel-active .overlay-right {
    transform: translateX(20%);
}

.social-container {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.social-container a {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin: 0 5px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.social-container a:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.overlay h1 {
    color: white;
    margin-bottom: 30px;
    font-weight: bold;
}

.overlay p {
    margin: 20px 0 30px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

.overlay button {
    background-color: transparent;
    border: 2px solid white;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.overlay button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    font-size: clamp(12px, 4vw, 14px);
}

/* Mobile responsiveness - improved */
@media (max-width: 768px) {
    .container {
        height: auto;
        min-height: 500px;
        width: 95%;
    }
    
    form {
        padding: 0 20px;
    }
    
    .sign-in-container, .sign-up-container {
        width: 100%;
        position: absolute;
        transition: all 0.5s ease-in-out;
    }
    
    .sign-up-container {
        opacity: 0;
        pointer-events: none;
    }
    
    .overlay-container {
        display: none;
    }
    
    .container.mobile-signup .sign-in-container {
        opacity: 0;
        pointer-events: none;
        transform: translateX(-100%);
    }
    
    .container.mobile-signup .sign-up-container {
        opacity: 1;
        pointer-events: auto;
        z-index: 5;
        transform: translateX(0);
    }
    
    .mobile-toggle-container {
        display: flex;
        margin-top: 15px;
        justify-content: center;
        color: rgba(255, 255, 255, 0.8);
    }
    
    .mobile-toggle {
        color: #fff;
        background: none;
        border: none;
        font-size: 14px;
        cursor: pointer;
        margin-left: 5px;
        text-decoration: underline;
        box-shadow: none;
    }
    
    .mobile-toggle:hover {
        transform: none;
        box-shadow: none;
    }
    
    .form-group {
        margin-bottom: 25px;
    }
    
    input {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .container {
        width: 100%;
        padding: 10px;
    }
    
    h1 {
        margin-bottom: 20px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .social-container a {
        width: 35px;
        height: 35px;
    }
}

@media (min-width: 769px) {
    .mobile-toggle-container {
        display: none;
    }
}

/* Background animation */
.light {
    position: absolute;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    filter: blur(30px);
    animation: float 8s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

.light:nth-child(1) {
    top: 10%;
    left: 20%;
    animation-delay: 0s;
    width: 180px;
    height: 180px;
    background: rgba(102, 126, 234, 0.2);
}

.light:nth-child(2) {
    top: 50%;
    right: 15%;
    animation-delay: 2s;
    width: 200px;
    height: 200px;
    background: rgba(118, 75, 162, 0.15);
}

.light:nth-child(3) {
    bottom: 10%;
    left: 30%;
    animation-delay: 4s;
    width: 220px;
    height: 220px;
    background: rgba(102, 126, 234, 0.2);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-20px) translateX(10px);
    }
    50% {
        transform: translateY(0) translateX(20px);
    }
    75% {
        transform: translateY(20px) translateX(10px);
    }
}

/* Custom CSS untuk memperkecil popup SweetAlert2 */
.swal2-popup {
    font-size: 14px; /* Ukuran font lebih kecil */
    width: 300px; /* Lebar popup */
    padding: 1rem; /* Padding lebih kecil */
}

.swal2-title {
    font-size: 18px; /* Ukuran judul lebih kecil */
}

.swal2-content {
    font-size: 14px; /* Ukuran teks konten lebih kecil */
}

.swal2-confirm {
    font-size: 14px; /* Ukuran tombol lebih kecil */
    padding: 0.5rem 1rem; /* Padding tombol lebih kecil */
}