/* ===================== RESET ===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  font-family: 'Segoe UI', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ===================== BACKGROUND DESKTOP ===================== */
.desktop-bg {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: url('bg-desktop.png') center center / cover no-repeat;
  filter: brightness(.25) blur(8px);
  transform: scale(1.08);
}

/* ===================== FRAME MOBILE ===================== */
.mobile-frame {
  position: relative;
  z-index: 2;
  width: 500px;
  height: 100vh;
  max-height: 920px;
  overflow: hidden;
  background: url('bg-landing.png') center center / cover no-repeat;
  box-shadow: 0 0 80px rgba(0, 0, 0, .8);
}

.mobile-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 30%, rgba(2, 10, 7, .7) 100%);
}

/* SPARKLE -- partikel cahaya naik dari bawah */
.sparkle-layer {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.sparkle-particle {
  position: absolute;
  bottom: -10px;
  border-radius: 50%;
  animation-name: sparkleRise;
  animation-timing-function: ease-in;
  animation-iteration-count: infinite;
}

@keyframes sparkleRise {
  0%   { transform: translateY(0) scale(.6); opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: .85; }
  100% { transform: translateY(-100vh) scale(1); opacity: 0; }
}

.mobile-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 45px;
  gap: 12px;
}

/* ===================== LOGO & PETI ===================== */
.logo-top {
  width: 350px;
  max-width: 90%;
  margin-bottom: -20px;
}

.logo-main {
  width: 420px;
  max-width: 95%;
  animation: floatLogo 4s ease-in-out infinite;
}

.chest-main {
  width: 300px;
  margin-top: -20px;
  animation: chestShake 4s infinite;
}

.info-text {
  width: 375px;
  max-width: 90%;
  margin-top: -50px;
}

/* ===================== TOMBOL MASUK ===================== */
.btn-masuk {
  width: 240px;
  margin-top: -30px;
  transition: .3s;
  animation: pulse 2s infinite;
}

.btn-masuk:hover {
  transform: scale(1.05);
}

/* ===================== ANIMASI ===================== */
@keyframes pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes floatLogo {
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}

@keyframes chestShake {
  0%   { transform: translateX(0); }
  2%   { transform: translateX(-2px) rotate(-1deg); }
  4%   { transform: translateX(2px) rotate(1deg); }
  6%   { transform: translateX(-2px) rotate(-1deg); }
  8%   { transform: translateX(2px) rotate(1deg); }
  10%  { transform: translateX(0); }
  100% { transform: translateX(0); }
}

@keyframes popupReveal {
  0% {
    opacity: 0;
    transform: scale(.85) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ===================== RESPONSIVE MOBILE ===================== */
@media (max-width: 768px) {
  body {
    display: block;
  }

  .desktop-bg {
    display: none;
  }

  .mobile-frame {
    width: 100vw;
    height: 100vh;
    max-height: none;
    box-shadow: none;
  }

  .mobile-content {
    padding: 25px 15px;
    gap: 12px;
  }

  .logo-top {
    width: 250px;
  }

  .logo-main {
    width: 300px;
    animation: floatLogo 4s ease-in-out infinite;
  }

  .chest-main {
    width: 220px;
    margin-top: -15px;
    margin-bottom: 10px;
  }

  .info-text {
    width: 280px;
  }

  .btn-masuk {
    width: 180px;
  }
}

/* ===================== OVERLAY & POPUP DASAR ===================== */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, .60);
  backdrop-filter: blur(10px);
  padding: 20px;
}

.popup-box {
  position: relative;
  width: 100%;
  max-width: 380px;
  padding: 32px 26px 26px;
  border: 1px solid rgba(245, 196, 82, .4);
  border-radius: 28px;
  background: linear-gradient(180deg, #0f4235, #052018);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .3),
    0 30px 60px rgba(0, 0, 0, .5),
    0 0 60px rgba(247, 200, 95, .12);
  animation: popupReveal .45s cubic-bezier(.22, 1, .36, 1);
}

.popup-title {
  text-align: center;
  color: #ffe9a8;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: .01em;
  text-shadow: 0 0 24px rgba(255, 215, 106, .35);
}

.popup-subtitle {
  text-align: center;
  color: rgba(255, 255, 255, .65);
  font-size: 13px;
  margin: 6px 0 25px;
}

.popup-box label {
  display: block;
  color: rgba(255, 255, 255, .7);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.popup-box input {
  width: 100%;
  padding: 14px;
  color: white;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 14px;
  background: rgba(255, 255, 255, .08);
  margin-bottom: 18px;
  transition: border-color .15s ease, background .15s ease;
}

.popup-box input:focus {
  outline: none;
  border-color: rgba(255, 215, 106, .6);
  background: rgba(255, 255, 255, .12);
}

.popup-btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  color: #2b1b00;
  background: linear-gradient(180deg, #ffd95c, #e4a600);
  transition: transform .15s ease, filter .15s ease;
}

.popup-btn:hover {
  filter: brightness(1.06);
}

.popup-btn:active {
  transform: scale(.98);
}

.popup-close {
  position: absolute;
  top: 14px;
  right: 18px;
  color: rgba(255, 255, 255, .5);
  font-size: 20px;
  cursor: pointer;
  transition: color .15s ease;
}

.popup-close:hover {
  color: #ffd76a;
}

/* ===================== POPUP SCREENSHOT / PERHATIAN ===================== */
.popup-warning {
  text-align: center;
}

.popup-icon {
  color: #ffd76a;
  font-size: 36px;
  margin-bottom: 6px;
  filter: drop-shadow(0 0 16px rgba(255, 215, 106, .4));
}

.popup-image {
  display: block;
  width: 170px;
  max-width: 80%;
  margin: 4px auto 10px;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .4));
}

.popup-text {
  color: rgba(255, 255, 255, .85);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 22px;
}

.popup-text strong {
  color: #ffd76a;
}

/* ===================== ERROR MESSAGE ===================== */
.field-error {
  display: none;
  color: #ffd76a;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  margin-top: -8px;
  margin-bottom: 12px;
}