* {
 margin: 0;
 padding: 0;
 box-sizing: border-box;
 font-family: sans-serif;    
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 99;
}

body {
    min-height: 100vh;
    background-image: url("../cihuy.png") !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    background-position: center !important;
}



.logo {
    font-size: 2em;
    color: #162938;
    user-select: none;
}

.navigation a {
    position: relative;
    font-size: 1.1em;
    color: aliceblue;
    text-decoration: none;
    font-weight: 500;
    margin-left: 40px;
}

.navigation a::after{
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 5px;
    transform: scaleX(0);
    transform-origin: right ;  
    transition: transform .5s;
}

.navigation a:hover::after{
    transform-origin: left;
    transform: scaleX(1);
}


.navigation .btnlogin-popup{
width: 130px;
height: 50px;
background: #162938;
border: 2px solid #162938;
outline: none;
border-radius: 6px;
cursor: pointer;
font-size: 1.1em;
color: #ffffff;
font-weight: 500;
margin-left: 40px;
transition: .5s;
}

.navigation .btnlogin-popup:hover {
    background-color: #fff;
    color: black;
}

.wrapper {
    position: relative;
    width: 400px;
    height: 440px;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, .5);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 0 30px rgba(0, 0, 0, 5);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transform: scale(0);
    transition: transform .3s ease;
}

.wrapper .form-box {
    width: 100%;
    padding: 40px;
}

.form-box h2 {
    font-size: 2em;
    color: #ffffff;
    text-align: center;
}

.input-box {
    position: relative;
    width: 100%;
    height: 50px;
    border-bottom: 2px solid #162938;
    margin: 30px 0;
}

.input-box label {
    position: absolute;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
    font-size: 1em;
    color: #ffffff;
    font-weight: 500;
    pointer-events: none;
    transition: .5s;
}

.input-box input:focus~label,
.input-box input:valid~label {
    top:-5px
}

.input-box input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1em;
    color: #162938;
    font-weight: 600;
    padding: 0 35px 0 5px;
}

.input-box .icon {
    position: absolute;
    right: 8px;
    font-size: 1.2em;
    color: #ffffff;
    line-height: 57px;
}

.btn {
    width: 100%;
    height: 45px;
    background: #162938;
    border: none;
    outline: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    color: #fff;
    font-weight: 500;
}

.wrapper .icon-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 45px;
    height: 45px;
    background: #162938;
    font-size: 2em;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom-left-radius: 20px;
    cursor: pointer;
    z-index: 1;
}

.wrapper.active-popup {
    transform: scale(1);
}








/*iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii*/

/*responsis dibawah */

  /* ===== Perbaikan centre modal + tombol fixed (tanpa ubah class/struktur) ===== */

/* --- Perubahan pada .wrapper (global, tapi aman) --- */
.wrapper {
    position: fixed;               /* supaya mudah center di viewport */
    top: 50%;
    left: 50%;
    width: 400px;
    max-width: 92%;
    height: auto;                  /* jangan paksa tinggi tetap */
    max-height: calc(100vh - 160px); /* batasi supaya tidak melewati layar */
    background: transparent;
    border: 2px solid rgba(255, 255, 255, .5);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transform: translate(-50%, -50%) scale(0); /* gabungkan translate + scale */
    transition: transform .28s ease, max-height .28s ease;
    z-index: 9999;                 /* pastikan di atas background */
    padding-bottom: 0;             /* ruang bawah diatur di mobile saja */
    box-sizing: border-box;
}

/* Ketika aktif, scale jadi 1 tetapi posisi tetap center karena translate tetap ada */
.wrapper.active-popup {
    transform: translate(-50%, -50%) scale(1);
}

/* Konten form di dalam modal */
.wrapper .form-box {
    width: 100%;
    padding: 36px;
    overflow: auto;
}

/* Batasi tinggi inner agar scroll muncul jika isinya banyak */
.wrapper .form-box > * {
    max-height: calc(100vh - 240px);
}

/* Jangan biarkan ikon close memotong area */
.wrapper .icon-close {
    right: 10px;
    top: 10px;
}

/* ===== Responsive tweaks (khusus mobile) ===== */
@media (max-width: 600px) {

  /* Header: kecilkan padding agar judul tetap center */
  header {
    padding: 10px 16px;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .logo {
    position: static !important;
    left: auto !important;
    transform: none !important;
    margin: 0 auto !important;
    text-align: center !important;
    width: auto !important;
    font-size: 28px;
    box-sizing: border-box;
    padding: 0 8px;
    line-height: 1.02;
  }

  /* Modal lebih ramping di mobile */
  .wrapper {
    width: 92%;
    max-width: 420px;
    top: 46%; /* sedikit naik dari center agar terlihat lebih natural */
    transform: translate(-50%, -46%) scale(0); /* sesuaikan transform translate Y */
    padding-bottom: 0;
    max-height: calc(100vh - 180px);
  }

  .wrapper.active-popup {
    transform: translate(-50%, -46%) scale(1);
  }

  /* Kurangi padding dalam form agar modal tidak panjang */
  .wrapper .form-box {
    padding: 20px 22px;
  }

  /* Input spacing ringkas */
  .input-box {
    margin: 16px 0;
  }

  .input-box input {
    padding-right: 38px; /* biar icon tidak menimpa */
  }

  /* Tombol Login (header) — tetap fixed bottom dan benar-benar center */
  .btnlogin-popup {
    position: fixed;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    width: 68%;
    max-width: 420px;
    min-width: 200px;
    padding: 12px 16px;
    font-size: 18px;
    border-radius: 10px;
    z-index: 10000;
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    background: rgba(22,41,56,0.95);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.6);
  }

  .navigation a, .navigation .btnlogin-popup {
    margin-left: 0px;
    margin-top: 6px;
    bottom: 45px;
  }

  /* Jika isinya melebihi tinggi modal, munculkan scroll di dalam */
  .wrapper .form-box {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.footer-text {
    position: fixed;
    left: 50%;
    bottom: 3px;
    transform: translateX(-50%);

    width: 100%;
    max-width: 420px;   /* 🔑 biar tidak kepanjangan di tablet */
    padding: 0 16px;

    font-size: 12px;
    color: rgba(255,255,255,0.85);
    text-align: center;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.4px;

    white-space: normal;   /* 🔑 izinkan teks turun baris */
    word-break: normal;    /* 🔑 jangan pecah kata */
    overflow-wrap: break-word;

    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
    z-index: 9999;
    pointer-events: none;
}
