:root {
  --box-size: 120px;
  --gap: 125px;
  --pulse-duration: 2.2s;
  --pulse-scale: 1.03;
  --pulse-glow: 0;
  --pulse-glow-color: rgba(66,165,245,0.18);
  --ease-bezier: cubic-bezier(.35, 1.75, .75, 1);
  --vh: 1dvh;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, Arial, sans-serif;
  
  background: url("/uploads/custom/web/page-bg.png") center center / cover fixed no-repeat;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}


.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

.layer {
  position: absolute;
  width: 100%;
  height: 100%;
  background-position: center;
  background-repeat: repeat-x;
  background-size: contain;
  animation: floatClouds 10s ease-in-out infinite alternate;
}

.bg {
  background-image: url("/uploads/custom/web/page-bg.png");
  animation: none;
}
.clouds-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}
.clouds-bg>div {
    width: 100%;
    height: 100%;
    position: absolute;
    animation: float 5s ease-in-out infinite;
}


.clouds-bg .clouds-back {
    background: url(/uploads/custom/web/clouds-back.png) bottom / calc(60 * var(--vh, 1vh)) repeat-x;
    z-index: 1;
    animation-duration: 10s;
}
.clouds-bg .clouds-back {
    background: url(/uploads/custom/web/clouds-back.png) bottom / calc(60 * var(--vh, 1vh)) repeat-x;
}

.clouds-bg .clouds-front {
    background: url(/uploads/custom/web/clouds-front.png) bottom / calc(50 * var(--vh, 1vh)) repeat-x;
    animation-duration: 7s;
}.clouds-bg .clouds-front {
    z-index: 20;
}.clouds-bg .clouds-top {
    background: url(/uploads/custom/web/clouds-top.png) bottom / calc(45 * var(--vh, 1vh)) repeat-x;
    bottom: calc(43 * var(--vh, 1vh));
    z-index: 11;
}
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

.content {
  position: relative;
  z-index: 10;
}

.container {
  text-align: center;
  padding: 24px;
  width: 100%;
  max-width: 920px;
}

h1 { margin-bottom: 50px; }

.logo-title {
  font-size: 0;
  width: 300px;
  height: 120px;
  background: url("/uploads/custom/pencetbromisterylogo.png") no-repeat center/contain;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, var(--box-size));
  grid-gap: var(--gap);
  justify-content: center;
  position: relative;
 padding-bottom: 140px;
}

.box {
    width: var(--box-size);
    height: var(--box-size);
    perspective: 1000px;
    display: inline-block;
    position: relative;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.8),
                0 0 50px rgba(255, 255, 255, 0.6),
                0 0 75px rgba(255, 255, 255, 0.4);
    border-radius: 12px; 
  transition: opacity 1s ease;
}

.pulse-slow {
  animation: pulse-slow var(--pulse-duration) ease-in-out infinite;
  will-change: transform, box-shadow, opacity;
}

@keyframes pulse-slow {
  0% { transform: scale(1); opacity: 1; }
  45% { transform: scale(var(--pulse-scale)); opacity: 0.98; }
  100% { transform: scale(1); opacity: 1; }
}

.pulse-slow:hover {
  animation-duration: calc(var(--pulse-duration) / 1.25);
}

@media (prefers-reduced-motion: reduce) {
  .pulse-slow {
    animation: none !important;
    transform: none !important;
    box-shadow: none !important;
  }
}

.cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(-15deg) rotateY(25deg);
  transition: transform 1s ease;
}

.face {
  position: absolute;
  width: var(--box-size);
  height: var(--box-size);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: linear-gradient(145deg, #1565c0, #42a5f5);
  border: 2px solid rgba(255,255,255,0.15);
  box-shadow: inset -3px -3px 8px rgba(0,0,0,0.4),
              inset 3px 3px 8px rgba(255,255,255,0.1);
  transition: transform 0.8s ease;
}

.face.front {
  transform: rotateY(0deg) translateZ(calc(var(--box-size)/2));
  background: url("/uploads/custom/frontpencet.png") no-repeat center/cover;
}

.face.back {
  transform: rotateY(90deg) translateX(calc(var(--box-size) / 2)) rotateY(-90deg);
  background: url("/uploads/custom/frontpencet.png") no-repeat center/cover;
  transform-origin: bottom center;
}

.face.left {
  transform: rotateY(-88deg) translateZ(calc(var(--box-size)/2));
  background: url("/uploads/custom/frontpencet.png") no-repeat center/100% 100%, linear-gradient(145deg, #1e88e5, #42a5f5);
}

.face.right {
  transform: rotateY(88deg) translateZ(calc(var(--box-size)/2));
  background: url("/uploads/custom/frontpencet.png") no-repeat center/100% 100%, linear-gradient(145deg, #1e88e5, #42a5f5);
}

.face.bottom {
  transform: rotateX(90deg) translateZ(calc(var(--box-size)/2));
  background: linear-gradient(145deg, #0d47a1, #42a5f5);
}

.face.top {
  transform: rotateX(90deg) translateZ(calc(var(--box-size)/2));
  background: linear-gradient(145deg, #1976d2, #64b5f6);
  background: url("/uploads/custom/baby.png") no-repeat center/cover;
  position: relative;
  overflow: hidden;
}
.reward img{
    width: 70px;
}
#startBtn{
  background: linear-gradient(145deg, #e9791c, #ffa726);
}
#liveChatBtn{
  background: linear-gradient(145deg, #17928c, #05c726);
}
/*.face.top::before,
.face.top::after {
  content: "";
  position: absolute;
  background: linear-gradient(to bottom, #ffebee, #ffcdd2);
}

.face.top::before {
  width: 20%;
  height: 100%;
  left: 40%;
  top: 0;
}

.face.top::after {
  height: 20%;
  width: 100%;
  top: 40%;
  left: 0;
}

.face.top .knot {
  position: absolute;
  width: 30%;
  height: 30%;
  background: radial-gradient(circle, #ffcdd2, #e91e63);
  border-radius: 50%;
  top: 35%;
  left: 35%;
  box-shadow: inset -2px -2px 6px rgba(0,0,0,0.2);
}*/

.box.open .face.back {
  transform: rotateY(180deg) translateZ(calc(var(--box-size) / 1)) translateX(calc(var(--box-size) / 2)) rotateY(-90deg);
  opacity: .9;
}

.box.open .face.right {
  transform: rotateY(84deg) translateZ(calc(var(--box-size) / 1.8));
  opacity: .8;
}

.box.open .face.front,
.box.open .face.left {
  background: linear-gradient(145deg, #1e88e5, #42a5f5);
}

.box::after {
  content: "";
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle at center, rgba(255,200,0,0.4), transparent 70%);
  z-index: -1;
  filter: blur(20px);
}

.box.open .cube {
  transform: rotateX(-15deg) rotateY(205deg);
  transition: transform 1.2s cubic-bezier(.25,.8,.25,1);
}

.buttons { margin-top: 100px; }
.buttons {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-around;
    gap: 5px;
    padding: 16px 20px;
    background: rgb(255 255 255 / 55%);
    backdrop-filter: blur(30px);
    border-radius: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    z-index: 9999;
    width: calc(100% - 40px);
    max-width: 620px;
    opacity: 0;
    transition: all 0.6s ease;
}

/* saat aktif muncul */
.buttons.show {
    bottom: 50px;
    opacity: 1;
}

.buttons button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(145deg, #3a8ef6, #6baefc);
    border: none;
    border-radius: 16px;
    padding: 14px 10px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.buttons button i {
    font-size: 20px;
}

.buttons button:hover {
    transform: scale(1.12) translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}

.buttons button:active {
    transform: scale(1.05);
}

button {
  padding: 10px 18px;
  margin: 0 8px;
  border: none;
  border-radius: 10px;
  background: #ff6b6b;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.box:hover {
  transform: scale(1.08)!important;
  transition: transform 0.25s ease;
  animation: none;
  cursor: pointer;
}

.box.open:hover { transform: none; }

.reward {
  position: absolute;
  inset: 0;
  transform: scaleX(-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  opacity: 0;
  transform: translateZ(0);
  pointer-events: none;
  z-index: 1;
}

.box.open .reward {
  opacity: 1;
  transform: scaleX(-1) translate(5px, 0);
  color: #ffd700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.8),
               0 0 16px rgba(255, 215, 0, 0.6),
               0 0 24px rgba(255, 140, 0, 0.4);
  transition: opacity 0.5s ease 0.3s, text-shadow 0.8s ease-in-out;
  animation: reward-glow 1.5s ease-in-out infinite alternate;
}

@keyframes reward-glow {
  from {
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.6),
                 0 0 12px rgba(255, 140, 0, 0.4);
  }
  to {
    text-shadow: 0 0 12px rgba(255, 215, 0, 1),
                 0 0 24px rgba(255, 140, 0, 0.8),
                 0 0 36px rgba(255, 69, 0, 0.6);
  }
}

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

@media (max-width: 420px) {
  :root { --box-size: 84px; --gap: 80px; }
  .grid { grid-template-columns: repeat(2, var(--box-size)); }
  h1 { font-size: 18px; }
  .layer { background-size: cover; }
  .clouds-bg .clouds-front {
   z-index: 1;   
  }.clouds-bg {
    position: fixed;
  }
  .buttons.show{
          bottom: 25px;
  }.buttons span{
      /*display: none;*/
      font-size: 5px;
  }
  #voucherInput{
          -webkit-text-stroke-width: 0!important;
    -webkit-text-stroke-color: #000!important;
    font-size: 16px!important;
  }
}

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  z-index: 999;
}

.popup-box {
  background: linear-gradient(145deg, #1e88e5, #42a5f5);
  color: white;
  border-radius: 14px;
  padding: 24px 28px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  position: relative;
  transform: scale(0.8);
  transition: transform 0.35s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: white;
  cursor: pointer;
}

.popup-action {
  margin-top: 16px;
  background: linear-gradient(145deg, #ff9800, #ffc107);
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  cursor: pointer;
  color: #fff;
  font-weight: bold;
  transition: opacity 0.25s;
}

.popup-action:hover { opacity: 0.85; }

.popup-overlay.active {
  visibility: visible;
  opacity: 1;
}

.popup-overlay.active .popup-box { transform: scale(1); }

.dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.3);
      visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.dialog.active {
  visibility: visible;
  opacity: 1;
}

@keyframes popIn {
  0%   { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.dialog-container {
  max-width: 500px;
  width: 90%;
  background: #fff;
  border-radius: 12px;
  transform: scale(0.85);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.dialog.active .dialog-container {
  animation: popIn 0.4s ease forwards;
}

.dialog-container .first-background {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  border-radius: 2vh;
  z-index: -2;
  box-shadow: 0 .5vh .4vh #00000073;
}

.dialog-container .second-background {
  position: absolute;
  left: 2%;
  right: 2%;
  top: 1%;
  bottom: 2%;
  border-radius: 2vh;
  z-index: -1;
}

.dialog-container .top-background-holder {
  width: 100%;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-45%, -110%);
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  pointer-events: none;
}

.dialog-container .top-background-holder img {
  width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: contain;
}

.dialog-container .top-close-button-container {
  position: absolute;
  top: -20px;
  right: -20px;
  z-index: 3;
}

.dialog-container .close-button {
  background: transparent;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dialog-container .close-button img {
  width: 44px;
  height: 44px;
}

.dialog-container .ribbon-container-svg {
  position: relative;
  margin-top: -20px;
  width: 100%;
  height: 70px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

.dialog-container .ribbon-container-svg svg {
  width: 100%;
  height: 100%;
}

.dialog-container .ribbon-container-svg .title-label {
  position: absolute;
  top: 8px;
  -webkit-text-stroke-width: calc(.1 * var(--vh, 1vh));
  -webkit-text-stroke-color: #000;
  font-size: calc(3 * var(--vh, 1vh));
  font-weight: 900;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
  z-index: 2;
  text-transform: uppercase;
}

.dialog-content {
  margin-top: 10px;
  padding-bottom: 15px;
  width: 100%;
  color: #fff;
  text-align: center;
}
canvas{
    z-index: 999!important;
}

#popupMessage{
        -webkit-text-stroke-width: calc(.1 * var(--vh, 1vh));
    -webkit-text-stroke-color: #000;
    font-size: calc(3 * var(--vh, 1vh));
    font-weight: 900;
    color: #fff;
    text-shadow: 2px 2px 0 #000;
    z-index: 2;
    text-transform: uppercase;
    margin-top: 0;
}
.buttons p {
    -webkit-text-stroke-width: 1px;
    -webkit-text-stroke-color: #00000094;
    font-size: 16px;
    font-weight: 900;
    color: #fff;
    text-shadow: 2px 2px 0 #000;
    z-index: 2;
    text-transform: uppercase;
    margin: 0;
}
#backtoSite,
#Klaim {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none; /* kalau dipakai di <a> biar nggak ada underline */
  transition: all 0.3s ease;
}

/* Tombol kembali */
#backtoSite {
  background: linear-gradient(145deg, #ffffff, #ebebeb);
  color: #222;
}

#backtoSite:hover {
  background: linear-gradient(145deg, #ebebeb, #ffffff);
}

/* Tombol klaim */
#Klaim {
  background: linear-gradient(145deg, #FF9800, #FF5722);
  color: #000000;
}

#Klaim:hover {
  background: linear-gradient(145deg, #FF5722, #FF9800);
}

#voucherInput {
    
    width: 90%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #6faaff;
    background: #161616;
    text-align: center;
    margin-bottom: 15px;
    outline: none;
    transition: border-color 0.2s;
    -webkit-text-stroke-width: calc(.1 * var(--vh, 1vh));
    -webkit-text-stroke-color: #000;
    font-size: calc(2 * var(--vh, 1vh));
    font-weight: 900;
    color: #fff;
    text-shadow: 2px 2px 0 #000;
    z-index: 2;
    text-transform: uppercase;
}

div:where(.swal2-container) {
    z-index: 9999!important;
}

#voucherInput:focus {
  border-color: #ffd700;
  box-shadow: 0 0 6px #ffd70055;
}
.dialog button {
  padding: 10px 20px;
  margin: 5px;
  border-radius: 8px;
  border: none;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
}

#voucherSubmit {
  background: #28a745;
  color: #fff;
}

#voucherSubmit:hover {
  background: #1e7e34;
}

#voucherCancel {
  background: #dc3545;
  color: #fff;
}

#voucherCancel:hover {
  background: #a71d2a;
}

.app-moon {
  transition: all .2s var(--ease-bezier);
  animation: fade-in .2s var(--ease-bezier);
  animation-delay: .1s;
  position: absolute;
  top: 0;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
  animation-fill-mode: both;
  z-index: 1;
  width: calc(11.5 * var(--vh, 1vh));
  height: calc(11.5 * var(--vh, 1vh));
  right: calc(3 * var(--vh, 1vh));
}

.app-moon img { max-width: 112px; }