body {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-position: center top;
    background-size: 700px;
    background-image: url(img/bgkuning.png);
    touch-action: none;
}

@media screen and (max-width: 480px) {
    body {
        flex-direction: column;
    }
}

.container div {
    font-size: 2rem;
}

@media screen and (min-width: 481px) and (max-width: 768px) {
    .container div {
        font-size: 1rem;
    }
}

.kata {
    display: none;
    white-space: nowrap;
    filter: drop-shadow(0px 10px 2px rgba(0, 0, 0, 0.237));
    color: #f4ae31;
    position: absolute;
    animation-name: ucapan;
    animation-duration: 10s;
    animation-iteration-count: infinite;
    text-align: center;
    font-size: 50px;
    top: -40px;
    font-family: text_card;
  

}



.ucapan {
    filter: drop-shadow(0px 10px 2px rgba(0, 0, 0, 0.237));
    background-image: url(img/pngtree-yellow-islamic-background-eid-mubarak-ramadan-kareem-picture-image_1418582.jpg);
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    
    position: absolute;
    animation-name: ucapan;
    animation-duration: 10s;
    animation-iteration-count: infinite;
    text-align: center;
    font-size: 50px;
    top: 130px;
    font-family: tulisan_keren;
    font-family: tulisan_keren
    

}

@keyframes ucapan {
    0% {
      background-position: 0 0;
    }
    50% {
      background-position: 200px;
    }
      100% {
      background-position: 0 0;
    }
  }
.container {
    position: relative;
    filter: drop-shadow(20px 20px 2px rgba(0, 0, 0, 0.237));
    flex-direction: column;
}

.valentines {
    position: relative;
    top: 117px;
    animation:up 3s linear infinite;
}

@keyframes up {
    0%, 100% {
        transform: translatey(0);
    }
    50% {
        transform: translateY(-30px);
    }
}

.envelope {
    position: relative;
    border-radius: 8%;
    left: 30px;
    width: 200px;
    height: 300px;
    background-color: #f4e2cb;

}

.open-envelope {
    transform: translatey(500px);
    transition: transform 0.4s  ease, z-index 0.6s;
    z-index: 2;
}

.open-front {
    transform: translatey(500px);
    transition: transform 0.4s  ease, z-index 0.6s;
    z-index: 2;
}

.close-front {
    transform: translatey(0px);
    transition: transform 0.4s ease, z-index 1s;
    z-index: 1;
}

.close-envelope {
    transform: translatey(0px);
    transition: transform 0.4s ease, z-index 1s;
    z-index: 1;
}


.open-reset {
    transform: translatey(500px);
    transition: transform 0.4s  ease, z-index 0.6s;
    z-index: 2;
}
.close-reset {
    transform: translatey(0px);
    transition: transform 0.4s ease, z-index 1s;
    z-index: 1;
}

.open-moons {
    transform: translatey(500px);
    transition: transform 0.4s  ease, z-index 0.6s;
    z-index: 2;
}
.close-moons {
    transform: translatey(0px);
    transition: transform 0.4s ease, z-index 1s;
    z-index: 1;
}


.bedug {
    position: absolute;
    background-image: url(img/bulan.png);
    background-position: center;
    top: -65px;
    left: -70px;
    background-size: 200px;
    width: 140px;
    height: 150px;
    z-index: 10;
    
}
.flap {
    display: inline-block;
    border-radius:9%;
    position:absolute;
    top: 1px;
    left: 30px;
    border-left: 100px  solid transparent;
    border-right: 100px solid transparent;
    border-bottom: 155px solid transparent;
    border-top: 65px solid #e5a22e;
    transform-origin: top;
    z-index: 5;
}




.close-flap {
    transform: rotatex(0deg);
    transition: transform 0.4s 0.6s  ease, z-index 1s;
    z-index: 5;
}

.open-flap {
    transform: rotatex(180deg);
    transition: transform 0.4s ease, z-index 0.6s;
    z-index: 1;
}

.close-flap {
    transform: rotatex(0deg);
    transition: transform 0.4s 0.6s  ease, z-index 1s;
    z-index: 5;
}

.tarik {
    text-align: center;
    cursor: pointer;
    position: relative;
    z-index: 2;
    top: -100px;
}

.tarik button {
    font-weight: 850;
    font-style: normal;
    transition: all 0.1s linear;
    -webkit-appearance: text;
    background-color: transparent;
    border: solid 1px  #000000;
    border-radius: 4px;
    color: #ffffff; ;
    display: inline-block;
    font-size: 11px;
    text-transform:uppercase;
    margin: 5px;
    line-height: 1em;
    text-decoration:  none;
    min-width: 60px;
    outline: none;
}

.tarik button:hover {
    background-color: #f4e2cb;
    color: #fff;
}
.betot {
    text-align: center;
    cursor: pointer;
    position: relative;
    z-index: 2;
    top: 120px;
}

.betot button {
    font-weight: 800;
    font-style: normal;
    transition: all 0.1s linear;
    -webkit-appearance: text;
    background-color: transparent;
    border: solid 1px  #000000;
    border-radius: 4px;
    color: #ffffff; ;
    display: inline-block;
    font-size: 14px;
    text-transform:uppercase;
    margin: 5px;
    line-height: 1em;
    text-decoration:  none;
    min-width: 80px;
    outline: none;
}

.betot button:hover {
    background-color: #f4ae31;
    color: #fff;
}

.betot button:active,
.betot button:focus {
    background-color: transparent; /* Original background color */
    color: #ffffff; /* Original text color */


}

.thr {
    text-align: center;
    cursor: pointer;
    position: relative;
    z-index: 2;
    top: -50px;
}

.thr button {
   
    font-style: normal;
    transition: all 0.1s linear;
    -webkit-appearance: text;
   background-image: url(https://i.pinimg.com/originals/c2/8b/3d/c28b3d755023f4c88a0521945b17964d.jpg);
   background-position: center;
   background-size:cover;
    border: solid 1px  #13805A;
    border-radius: 4px;
    color: #ffffff; ;
    display: inline-block;
    font-size: px;
    text-transform:uppercase;
    margin: 5px;
    line-height: 1em;
    text-decoration:  none;
    min-width: 150px;
    min-height: 50px;
    outline: none;
}

.thr button:hover {
    background-color: #000000;
    color: #00f7ff;
}

.thr button:active,
.thr button:focus {
    background-color: transparent; /* Original background color */
    color: #13805A; /* Original text color */


}
.reset {
    text-align: center;
    cursor: pointer;
    position: relative; /* Ensure the button is positioned correctly */
    z-index: 10; /* Bring the button above other elements */
}

.reset button {
    font-weight: 800;
    font-style: normal;
    transition: all 0.1s linear;
    -webkit-appearance: text;
    background-color: transparent;
    border: solid 2px #f4e2cb;
    border-radius: 4px;
    color: #f4ae31;
    display: inline-block;
    font-size: 14px;
    text-transform: uppercase;
    margin: 4px;
    padding: 10px;
    line-height: 1em;
    text-decoration:  none;
    min-width: 120px;
    outline: none;
}

.reset button:hover {
    background-color: #f4ae31;
    color: #fff;
}

.card {
    overflow-y: hidden;
    position: absolute;
   border-image: url(img/Amplop\ Lebaran\ Ilustratif\ Ceria\ Oranye.png);
   border-image-width: 100%;
    border-image-slice: 50% 50% 50% 50%;
    width: 180px;
    height: 280px;
    top: 5px;
    left: 39px;
    box-shadow: -5px -5px 100px rgba(0,0,0,0,4);
 
}
.card::before {
    content: '';
    position: absolute;
    border: 3px solid #101b11;
    border-style: dotted;
    width: 165px;
    border-radius: px;
    height: 265px;
    top: 5px;
    left: 5px;
}

.close-card {
    transform: translatey(0px);
    transition: transform 0.4s ease, z-index 1s;
    z-index: 1;
}


.open-card {
    transform: translatey(-70px);
    transition: transform 0.4s 0.6s ease, z-index 0.6s;
    z-index: 2;
}

.left-card {
    transform: translateX(-400px);
    transition: transform 0.4s  ease, z-index 0.6s;
    z-index: 2;
}

.mid-card {
    transform: translateX(0px);
    transition: transform 0.4s ease, z-index 0.6s;
    z-index: 2;
}

.text {
     display: inline-block;
    word-spacing: 1px;
    min-width: -5rem;
    position: absolute;
    font-family:textcard;
    line-height: 8px;
    text-align: center;
    top: 90px;
    left: -3px;
    color: #000000;
    z-index: 2;
}
.text1 {

    word-spacing: 1px;
    min-width: 150px;
    position: absolute;
    font-family:textcard;
    text-align: center;
    line-height: 8px;
    top:200px;
    left: -3px;
    color: #000000;
    z-index: 2;
}


@font-face {
    font-family: tulisan_keren;
    src: url(font/sketsa-ramadhan.ttf);
}

@font-face {
    font-family: textcard;
    src: url(font/cocogotic.ttf);
}
.moon {
    position: relative;
    background-color: #f4ae31;
    display: inline-block;
    width: 80px;
    left: 25px;
    top:90px;
    aspect-ratio: 1;
    border-radius: 59%;
    mask: radial-gradient(circle at 70% 50%, #ff000000 40%, #000000 0);

}


.moon:before, .moon:after {
    content: "";
    background-color: #e0a134;
    border-radius: 100%;
    height: 30px;
    position: absolute;
    width: 50px;
}

.moon:before {
    top: -15px;
    left: 0;
}

.moon:after {
    left: 15px;
    top: 0;
} 

.moons {
    position: absolute;
    top: 15px;
}

@keyframes moons{
    0% {
        transform: translate(0) rotate(-45deg) scale(0.3);
        opacity: 1;
    }
    100% {
        transform: translateY(-150px) rotate(-45deg) scale(1.3);
        opacity: 0.5;
    }
}

.one, .two, .three, .four, .five {
    background-color: rgb(0, 0, 0);
    display: inline-block;
    height: 10px;
    width: 10px;
    margin: 0 10px;
    position: relative;
    transform: rotate(-45deg);
    top: 50px;
}

.one:before, .one:after, .two:before, .two:after,.three:before, .three:after, .four:before, .four:after, .five:before, .five:after {
    content:"";
    background-color: rgb(0, 0, 0);
    border-radius: 50%;
    width: 10px;
    height: 10px;
    position: absolute;
}

.one:before, .two:before, .three:before, .four:before, .five:before {
    top:-5px;
    left:0;
}

.one:after, .two:after, .three:after, .four:after, .five:after {
    left: 5px;
    top: 0;
}

.one {
    left: 10px;
    animation: moons 1s ease-out infinite;
}

.two {
    left: 30px;
    animation: moons 2s ease-out infinite;
}

.three {
    left: 50px;
    animation : moons 1.5s ease-out infinite;
}

.four {
    left: 70px;
    animation : moons 2.3s ease-out infinite;
}

.five {
    left: 90px;
    animation : moons 1.7s ease-out infinite;
}

.front {
    position: absolute;
    border-radius: 10%;
    border-image: url(img/1\ edit.png);
    border-image-width: 100%;
    border-image-slice: 50% 50% 50% 50%;
    border-right: 95px solid #066c48;
    border-top: 70px solid transparent;
    border-bottom: 224px solid #076242;
    border-left: 90px solid #066c48;
    left: 36px;
    top: 2px;
    width: 0;
    height: 0;
    z-index: 3;
}

.dana {
    display: none;
    position: absolute;
    border-radius: 10%;
    border-image: url(img/dana.jpeg);
    border-image-width: 100%;
    border-image-slice: 50% 50% 50% 50%;
    border-right: 95px solid #066c48;
    border-top: 70px solid transparent;
    border-bottom: 224px solid #076242;
    border-left: 90px solid #066c48;
    top: 2px;
    left: 50px;
    width: 0;
    height: 0;
    z-index: 3;
}


.shadow {
    position: absolute;
    width: 250px;
    height: 25px;
    border-radius: 50%;
    background-color: rgba(0,0,0,0.15);
    top: 350px;
    left: 20px;
    z-index: -1;
    animation: scale 3s linear infinite;
}

@keyframes scale {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scaleX(1);
    }
}




.redeem {
    position: absolute;
    background-image: url(img/Amplop\ Lebaran\ Ilustratif\ Ceria\ Oranye.png);
    transform: translateY(-360px) translateX(500px);
    display: block;
    text-align: center;
    padding: 30px;
    border-radius: 20px;
    width: 250px;
    margin: 50px auto;
    will-change: transform;
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.5);
    
}

.open-redeem {
    transform: translateX(-15px) translateY(-350px);
    transition: transform 0.4s  ease, z-index 0.6s;
    z-index: 2;
   
}

.close-redeem {
    transform: translateX(500px) translateY(-360px); /* fix: hapus tanda kutip di -360 */
    transition: transform 0.4s  ease, z-index 0.6s;
    z-index: 2;
   
} 

.redeem input::placeholder {
    color: #ffffff;
    letter-spacing: 3px;
    font-family: tulisan_keren;
}



.redeem::before {
    content: '';
    position: absolute;
    border: 3px solid #101b11;
    border-style: dotted;
    width: 275px;
    border-radius: 20px;
    height: 140px;
    top: 10px;
    left: 15px;
    z-index: -1;
}

.back {
    display: none;
    text-align: center;
    cursor: pointer;
   position: absolute;
    top: 160px;
    left: 200px;
    z-index: 10; /* Bring the button above other elements */
}

.back-button {
    font-weight: 800;
    font-style: normal;
    transition: all 0.1s linear;
    -webkit-appearance: text;
    background-color: transparent;
    border: solid 2px #f4e2cb;
    border-radius: 4px;
    color: #ffffff;
    display: inline-block;
    font-size: 14px;
    text-transform: uppercase;
    margin: 5px;
    padding: 10px;
    line-height: 1em;
    text-decoration:  none;
    min-width: 120px;
    outline: none;
}

.back button:hover {
    background-color: #f4e2cb;
    color: #f4ae31;
}

.redeem input {
    border-radius: 10px;
    border: 3px solid #f4e2cb;
    width: 90%;
    padding: 12px;
    outline: none;
    margin-bottom: 15px;
    background: transparent;
    color: #f4ae31;
    font-size: 16px;
    text-align: center;
    transition: 0.3s;
}
.redeem input:not(:placeholder-shown) {
    background: #f4e2cb;
}

.redeem input:focus {
    background-color: #f4e2cb;
    border: 2px solid #ffffff;
    box-shadow:  0 0 15px #ffffff;
}



.redeem button {
  width: 100%;
  padding: 12px;
  border: solid 2px #f4e2cb;
  border-radius: 10px;
  background: transparent;
  color: #ffffff;
  font-weight: bold;
  cursor: pointer;
  font-family: tulisan_keren;
  letter-spacing: 3px;
  transition: 0.3s;
}

.redeem button:hover {
    background-color: #f4e2cb;
    color: #f4ae31;
  transform: scale(1.05);
  box-shadow: 0 0 15px #ffffff;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes popIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* --- FIX UNTUK TAMPILAN DESKTOP --- */
@media screen and (min-width: 768px) {
    .redeem {
        /* Posisi awal (sembunyi) di desktop, geser ke kanan dikit aja dan kasih efek transparan */
        transform: translateX(350px) translateY(-280px);
        opacity: 0;
        pointer-events: none; /* Biar ga bisa diklik pas sembunyi */
    }

    .open-redeem {
        /* Pas dibuka, box muncul rapi di SEBELAH KANAN amplop */
        transform: translateX(280px) translateY(-280px);
        opacity: 1;
        pointer-events: auto;
        z-index: 10;
    }

    .close-redeem {
        /* Pas ditutup, balik lagi ke posisi sembunyi */
        transform: translateX(350px) translateY(-280px);
        opacity: 0;
        pointer-events: none;
    }
}

  