@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

*{
    font-family:"Poppins", sans-serif ;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
}

:root{
/* coloring */

    --ctn-color:#ffff;
    --bg-color:#FAFBFC;
    --main-color: #CF221B;

/* Font Weight */

--font-light: 300;   
--font-regular: 500; 
--font-semibold: 600; 
--font-bold: 700;    
--font-extrabold: 900; 
}

body{
    height: 100%;
    background-color: var(--bg-color);
}

.login-text{
    font-weight: 600;
}

/* head contaner */

.header-logo {
    transform-origin: top center;
    animation: fallAndDangle 2s ease-out 0.5s forwards;
    opacity: 0;
}

@keyframes fallAndDangle {
    0% {
        transform: translateY(-200px) rotateZ(0); 
        opacity: 0;
    }
    40% {
        transform: translateY(0) rotateZ(0);     
        opacity: 1; /* <-- Logo muncul di sini */
    }

    50% {
        transform: translateY(0) rotateZ(15deg); 
    }
    65% {
        transform: translateY(0) rotateZ(-10deg);
    }
    80% {
        transform: translateY(0) rotateZ(5deg); 
    }
    90% {
        transform: translateY(0) rotateZ(-2deg); 
    }
    
    100% {
        transform: translateY(0) rotateZ(0);
        opacity: 1; 
    }
}

.head-container{
    position: relative;
    display: flex;
    justify-content: space-between;
}

.regis-whisp{
    position: absolute;
    margin: 10px;
    right: 10px;
    padding: 10px 0 10px 0;
    display: flex;
    flex-direction: row;
    line-height: 10px;
}
.regis-whisp p{
    margin: 15px;
}
.regis-whisp button{
    height: 37px;
    width: 100px;
    border-radius: 10px;
    outline: none;
    border-width: 1px;
    cursor: pointer;
    background-color: var(--ctn-color);
    color: var(--main-color);
    font-weight: var(--font-bold);
}
.regis-whisp button:hover{
    background-color: #CF221B;
    color: var(--ctn-color);
}


.container{
    position: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    top: 20%;
    left: 30%;
}

.form-box.login{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 412px;
    width: 605px;
    margin-top: 10px;
    height: 412px;
    width: 605px;
    border-radius: 20px;
    background-color: var(--ctn-color);   
    z-index: 2;
}
.input-box{
    margin: 30px;
}

.input-box p{
    margin-bottom: 10px;
    font-weight: var(--font-semibold);
}
.input-box input{
    padding-left: 10px;
    height: 57px;
    width: 454px;
    border-radius: 10px;
    outline: none;
    border-width: 1px;
}

.input-box input::placeholder{
    font-style: italic;
}
.forgot-link{
    margin:10px;
}

.btn{
    display: block; 
    width: 55vh;
    height: 57px;
    font-size: 30px;
    background-color: var(--main-color);
    border-radius: 10px;
    border-width: 1px;
    color: var(--ctn-color);
    font-weight:600;
    cursor: pointer;
    margin-left: auto;
    margin-right: auto;
}


.footer-image {
    position: fixed;
    bottom: 0;
    height: 40%;
    width: 100%;
    z-index: -1; 
}

.footer-image img {
    width: 100%;
    height: 100%; 
}



/* 3. Buat 'Tirai' (Overlay) */
.footer-image::before {
    content: ""; /* Wajib untuk pseudo-element */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    background-color: #ffffff; 
    
    animation: wipe-reveal-right 2s ease-out forwards;
}

/* 5. Definisikan Animasinya (Keyframes) */
@keyframes wipe-reveal-right {
    0% {
        /* Awal: Posisi 0% (Menutupi gambar) */
        transform: translateX(0%);
    }
    100% {
        /* Akhir: Bergeser 100% ke kanan (Menampilkan gambar) */
        transform: translateX(100%);
    }
}

.flash-message-custom {
    position: fixed; /* Tetap di atas layar */
    top: 20px;       /* Jarak 20px dari atas */
    left: 50%;       /* Mulai dari tengah layar */
    transform: translateX(-50%); /* Posisikan persis di tengah */
    
    background-color: var(--main-color); /* Warna hijau sukses */
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 9999; /* Pastikan di atas segalanya */
    
    display: flex;
    align-items: center;
    gap: 10px;

    /* Terapkan animasi "slideDown" */
    animation: slideDown 0.5s ease-out forwards;
}

/* Animasi untuk keluar (diterapkan oleh JS) */
.flash-message-custom.fade-out {
    /* Terapkan animasi 'fadeOut' baru, durasi 1 detik */
    animation: fadeOut 1s ease-out forwards;
}

.flash-message-custom.is-error {
    background-color: #e74c3c; /* Warna merah (error) */
}


/* Keyframes untuk animasi masuk (slide dari atas) */
@keyframes slideDown {
    from {
        top: -100px; /* Mulai dari luar layar (atas) */
        opacity: 0;
    }
    to {
        top: 20px; /* Selesai di 20px dari atas */
        opacity: 1;
    }
}

/* Keyframes untuk animasi keluar (fade dan slide ke atas) */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}



/* MOBILE */


@media (max-width: 768px) {

  /* Header */
  .head-container {
    padding: 10px 15px;
    align-items: center;
  }

  .header-logo img {
    width: 120px; 
  }

  .regis-whisp {
    /* position: static; */
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 0;
    padding: 0;
    gap: 5px;
  }

  .regis-whisp p {
    margin: 0;
    font-size: 14px;
    /* line-height; */
  }

  .regis-whisp button {
    width: 80px;
    height: 32px;
    font-size: 13px;
    display: flex;
    align-items: center;   /* center isi button */
    justify-content: center;
    padding: 0 10px;
  }

  /* Container Login */
  .container {
    position: relative;
    top: 120px;
    left: 0;
    padding: 0 20px;
    width: 100%;
  }

  .login-text {
    font-size: 24px;
  }

  .form-box.login {

    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px;
    height: auto;
    margin-top: 15px;
  }

  .input-box {
    margin: 20px 0;
    width: 100%;
  }

  .input-box input {
    width: 100% !important;
    height: 50px;
    font-size: 14px;
  }

  .btn {
    width: 100%;
    height: 55px;
    font-size: 22px;
  }

  /* Flash message */
  .flash-message-custom {
    width: 90%;
    font-size: 14px;
    padding: 10px 15px;
  }

  /* Footer image */
  .footer-image {
    height: 25%;
  }

}


@media (max-width: 480px) {

  /* Header */
  .header-logo img {
    width: 90px;
  }

  .regis-whisp p {
    font-size: 13px;
  }

  .regis-whisp button {
    width: 70px;
    height: 30px;
    font-size: 12px;
  }

  /* Form */
  .login-text {
    font-size: 20px;
    text-align: center;
  }

  .form-box.login {
    padding: 15px;
    border-radius: 12px;
  }
  .input-box{
    width: 50vw;
  }
  .input-box p {
    font-size: 10px;
  }

  .input-box input {
    width: 100%;
    height: 45px;
    font-size: 10px;
  }

  .btn {
    height: 48px;
    font-size: 20px;
  }

  /* Flash Message */
  .flash-message-custom {
    font-size: 13px;
    padding: 8px 12px;
    width: 85%;
    top: 15px;
  }

  /* Footer */
  .footer-image {
    height: 20%;
  }

  .footer-image img {
    object-fit: cover;
  }
}