/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: #f5f5f7; /* Mobile theme */
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 40px;
  transition: background-color 0.4s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeSlideIn 0.8s ease forwards;
}

/* ===== CONTAINER ===== */
.container {
  width: 100%;
  max-width: 900px;
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.08);
  padding: 50px 40px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeSlideIn 0.9s ease forwards;
  animation-delay: 0.2s;
}

/* ===== LOGO ===== */
.logo-wrapper {
  text-align: center;
  margin-bottom: 24px;
  opacity: 0;
  transform: scale(0.95);
  animation: fadeScaleIn 0.7s ease forwards;
  animation-delay: 0.3s;
}

.logo-wrapper img {
  width: 100px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.05));
  transition: width 0.3s ease;
}

/* ===== TITLES ===== */
.form-title {
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  text-transform: uppercase;
  color: #bca06b; /* Gold color */
  margin-bottom: 10px;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeSlideIn 0.6s ease forwards;
  animation-delay: 0.4s;
}

.form-subtitle {
  text-align: center;
  font-size: 15px;
  color: #555;
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeSlideIn 0.6s ease forwards;
  animation-delay: 0.5s;
}

/* ===== INPUT GROUP ===== */
.input-group {
  position: relative;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeSlideIn 0.6s ease forwards;
  animation-delay: 0.6s;
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 12px 10px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #fafafa;
  transition: all 0.3s ease;
}

.input-group input:focus,
.input-group textarea:focus {
  border-color: #bca06b;
  box-shadow: 0 0 0 3px rgba(188, 160, 107, 0.15);
  outline: none;
}

.input-group label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  background-color: #fff;
  padding: 0 4px;
  font-size: 14px;
  color: #888;
  pointer-events: none;
  transition: all 0.2s ease;
}

.input-group.has-content label,
.input-group input:focus + label,
.input-group textarea:focus + label {
  top: -8px;
  font-size: 12px;
  color: #bca06b;
}

/* ===== FLEX ROW ===== */
.input-row {
  display: flex;
  gap: 16px;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeSlideIn 0.6s ease forwards;
  animation-delay: 0.7s;
}

.input-row .input-group.half {
  flex: 1;
}

/* ===== BUTTON ROW ===== */
.button-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeSlideIn 0.6s ease forwards;
  animation-delay: 0.8s;
}

.button-row button {
  flex: 1;
  padding: 12px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.button-row button[type="submit"] {
  background-color: #bca06b;
  color: #fff;
}

.button-row button[type="submit"]:hover {
  background-color: #a0895e;
  transform: translateY(-2px);
}

.button-row button[type="reset"] {
  background-color: #e0e0e0;
  color: #333;
}

.button-row button[type="reset"]:hover {
  background-color: #ccc;
}

/* ===== OVERLAY & SUCCESS ===== */
.overlay {
  display: none;
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.9);
  z-index: 10;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  pointer-events: none;
  transition: background-color 0.3s ease;
}

.overlay.active {
  display: flex;
  pointer-events: all;
}

.spinner {
  width: 45px;
  height: 45px;
  border: 4px solid #ddd;
  border-top: 4px solid #34c759;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.success-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.3s ease;
}

.success-message.show {
  opacity: 1;
  transform: scale(1);
}

.success-icon {
  font-size: 2.4rem;
  color: #34c759;
  margin-bottom: 8px;
}

.success-text {
  font-size: 1.1rem;
  font-weight: 500;
  color: #34c759;
}

/* ===== BACK BUTTON ===== */
.back-btn {
  position: absolute;
  top: clamp(15px, 3vw, 30px);
  left: clamp(15px, 3vw, 30px);
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  border-radius: clamp(8px, 2vw, 12px);
  padding: clamp(8px, 1.5vw, 10px) clamp(15px, 3vw, 18px);
  font-size: clamp(13px, 1.5vw, 16px);
  color: #646464;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease, backdrop-filter 0.3s ease;
  z-index: 20;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.5);
  color: #bca06b;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
}

.back-btn:active {
  transform: scale(0.98);
  box-shadow: 0 4px 12px #00000033;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeSlideIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeScaleIn {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .container {
    padding: 40px 20px;
  }
}

@media (min-width: 1024px) {
  body {
    background-color: #bca06b; /* Gold background for desktop */
  }

  .container {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    padding: 60px 80px;
  }

  .form-title {
    font-size: 30px;
  }

  .form-subtitle {
    font-size: 17px;
  }

  .input-group input,
  .input-group textarea {
    font-size: 16px;
    background-color: #f9f9f9;
    border: 1px solid #d1d1d6;
  }

  .button-row button {
    font-size: 16px;
    border-radius: 10px;
  }
}

/* === Container (Default Desktop & Tablet) === */
.recaptcha-container {
  display: grid;
  grid-template-columns: auto 1fr; /* 🟢 Box kiri, teks kanan */
  align-items: center;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(15px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  padding: clamp(12px, 2vw, 20px) clamp(16px, 3vw, 28px);
  gap: clamp(16px, 3vw, 40px); /* 🟢 Responsive gap */
  transition: all 0.3s ease;
  margin: 20px 0;
}

.recaptcha-container:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
}

/* === reCAPTCHA Box (Resize for small screens) === */
.recaptcha-box {
  width: 100%;
  max-width: 300px;
  min-width: 260px;
}

/* === Label di Kanan === */
.recaptcha-label {
  display: flex;
  align-items: center; /* 🟢 Rata tengah vertikal */
  gap: clamp(5px, 1.5vw, 12px); /* 🟢 Dynamic gap icon ↔ teks */
  font-size: clamp(13px, 1.2vw, 16px); /* 🟢 Responsive font size */
  font-weight: 600;
  color: #333;
  margin-left: clamp(8px, 2vw, 30px); /* 🟢 Responsive margin kiri */
  transition: all 0.4s ease; /* Smooth perubahan posisi & ukuran */
}

.recaptcha-icon {
  font-size: clamp(12px, 1.2vw, 16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* === Error Message === */
.error-text {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: #d9534f;
  text-align: center;
}

/* ===================================
   RESPONSIVE: iPad (Portrait & Landscape)
=================================== */
@media (max-width: 1024px) {
  .recaptcha-container {
    padding: clamp(10px, 2vw, 16px);
    gap: clamp(12px, 2vw, 20px); /* 🟢 Kompak di iPad */
  }

  .recaptcha-label {
    font-size: clamp(12px, 2vw, 14px); /* 🟢 Font lebih kecil */
    margin-left: clamp(6px, 2vw, 15px); /* 🟢 Margin kiri lebih sempit */
  }
}

/* ===================================
   RESPONSIVE: Mobile Phones (≤ 480px)
=================================== */
@media (max-width: 480px) {
  .recaptcha-container {
    display: flex;
    flex-direction: column;   /* 🟢 Box di atas, label di bawah */
    align-items: center;
    padding: clamp(8px, 2vw, 12px);
    gap: clamp(10px, 2vw, 15px); /* 🟢 Super kompak untuk HP */
  }

  .recaptcha-box {
    max-width: 250px; /* 🟢 Lebih kecil biar muat */
  }

  .recaptcha-label {
    margin-left: 0;            /* 🟢 Hilangkan margin kiri */
    justify-content: center;   /* 🟢 Center label */
    font-size: clamp(12px, 3vw, 14px); /* 🟢 Responsive font */
  }

  .recaptcha-icon {
    opacity: 0;                /* 🟢 Icon hilang */
    transform: scale(0.7);     /* 🟢 Scale down smooth */
    pointer-events: none;
  }
}

/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: #f5f5f7; /* Mobile-first theme */
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 40px;
  transition: background-color 0.4s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeSlideIn 0.8s ease forwards;
}

/* ===== CONTAINER ===== */
.container {
  width: 100%;
  max-width: 900px;
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.08);
  padding: clamp(30px, 5vw, 50px) clamp(20px, 4vw, 40px);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeSlideIn 0.9s ease forwards;
  animation-delay: 0.2s;
}

/* ===== LOGO ===== */
.logo-wrapper {
  text-align: center;
  margin-bottom: clamp(20px, 3vw, 30px);
  opacity: 0;
  transform: scale(0.95);
  animation: fadeScaleIn 0.7s ease forwards;
  animation-delay: 0.3s;
}

.logo-wrapper img {
  width: clamp(80px, 10vw, 120px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.05));
  transition: width 0.3s ease;
}

/* ===== TITLES ===== */
.form-title {
  text-align: center;
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 700;
  text-transform: uppercase;
  color: #bca06b; /* Gold color */
  margin-bottom: 10px;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeSlideIn 0.6s ease forwards;
  animation-delay: 0.4s;
}

.form-subtitle {
  text-align: center;
  font-size: clamp(14px, 1.5vw, 17px);
  color: #555;
  margin-bottom: clamp(20px, 3vw, 28px);
  opacity: 0;
  transform: translateY(10px);
  animation: fadeSlideIn 0.6s ease forwards;
  animation-delay: 0.5s;
}

/* ===== INPUT GROUP ===== */
.input-group {
  position: relative;
  margin-bottom: clamp(14px, 2vw, 20px);
  opacity: 0;
  transform: translateY(10px);
  animation: fadeSlideIn 0.6s ease forwards;
  animation-delay: 0.6s;
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: clamp(10px, 1.5vw, 14px) clamp(10px, 1.5vw, 14px);
  font-size: clamp(14px, 1.5vw, 16px);
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #fafafa;
  transition: all 0.3s ease;
}

.input-group input:focus,
.input-group textarea:focus {
  border-color: #bca06b;
  box-shadow: 0 0 0 3px rgba(188, 160, 107, 0.15);
  outline: none;
}

.input-group label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  background-color: #fff;
  padding: 0 4px;
  font-size: clamp(12px, 1.3vw, 14px);
  color: #888;
  pointer-events: none;
  transition: all 0.2s ease;
}

.input-group.has-content label,
.input-group input:focus + label,
.input-group textarea:focus + label {
  top: -8px;
  font-size: clamp(11px, 1.2vw, 12px);
  color: #bca06b;
}

/* ===== FLEX ROW ===== */
.input-row {
  display: flex;
  gap: clamp(10px, 2vw, 16px);
  opacity: 0;
  transform: translateY(10px);
  animation: fadeSlideIn 0.6s ease forwards;
  animation-delay: 0.7s;
}

.input-row .input-group.half {
  flex: 1;
}

/* ===== BUTTON ROW ===== */
.button-row {
  display: flex;
  gap: clamp(8px, 2vw, 12px);
  margin-top: clamp(20px, 3vw, 24px);
  opacity: 0;
  transform: translateY(10px);
  animation: fadeSlideIn 0.6s ease forwards;
  animation-delay: 0.8s;
}

.button-row button {
  flex: 1;
  padding: clamp(10px, 1.5vw, 12px);
  font-size: clamp(14px, 1.5vw, 16px);
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.button-row button[type="submit"] {
  background-color: #bca06b;
  color: #fff;
}

.button-row button[type="submit"]:hover {
  background-color: #a0895e;
  transform: translateY(-2px);
}

.button-row button[type="reset"] {
  background-color: #e0e0e0;
  color: #333;
}

.button-row button[type="reset"]:hover {
  background-color: #ccc;
}

/* ===== reCAPTCHA CONTAINER ===== */
.recaptcha-container {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(15px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  padding: clamp(12px, 2vw, 20px) clamp(16px, 3vw, 28px);
  gap: clamp(14px, 3vw, 40px);
  margin: clamp(15px, 2vw, 25px) 0;
  transition: all 0.4s ease;
}

.recaptcha-box {
  width: 100%;
  max-width: 300px;
  min-width: 260px;
}

.recaptcha-label {
  display: flex;
  align-items: center;
  gap: clamp(5px, 1.5vw, 12px);
  font-size: clamp(13px, 1.5vw, 16px);
  font-weight: 600;
  color: #808080;
  margin-left: clamp(8px, 2vw, 30px);
}

.recaptcha-icon {
  font-size: clamp(12px, 1.5vw, 16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* ===== RESPONSIVE: Mobile ===== */
@media (max-width: 768px) {
  .recaptcha-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(10px, 2vw, 15px);
    padding: clamp(10px, 2vw, 14px);
  }
  .recaptcha-label {
    margin-left: 0;
    justify-content: center;
  }
  .recaptcha-icon {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
  }
}



/* Mini Rewards Popup */
.reward-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.reward-popup.active {
  opacity: 1;
  pointer-events: auto;
}

.reward-content {
  background: linear-gradient(145deg, #fff, #f5f5f5);
  padding: 30px 25px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);
  position: relative;
  animation: popupScale 0.5s ease forwards;
}

.reward-icon {
  font-size: 50px;
  margin-bottom: 15px;
  animation: bounce 1s infinite alternate;
}

.reward-content h2 {
  font-family: "Open Sans", sans-serif;
  font-weight: 800; /* Extra Bold */
  font-size: 26px;
  color: #bca06b;
  margin-bottom: 10px;
}

.reward-content p {
  font-family: "Open Sans", sans-serif;
  font-size: 16px;
  color: #555;
  margin-bottom: 20px;
}

.claim-btn {
  display: inline-block;
  padding: 12px 25px;
  background: #bca06b;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease;
}

.claim-btn:hover {
  background: #f5c012;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 20px;
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
}


/* language-switcher */
.language-switcher {
  position: absolute;
  top: clamp(15px, 3vw, 30px);
  right: clamp(15px, 3vw, 30px);
  z-index: 50;
}

.language-switcher select {
  padding: 8px 12px;
  border: 1px solid #bca06b;
  border-radius: 8px;
  background-color: #fff;
  color: #bca06b;
  font-weight: 600;
  font-size: clamp(13px, 1.5vw, 16px);
  cursor: pointer;
  transition: all 0.3s ease;
}

.language-switcher select:hover {
  background-color: #f5f5f5;
}


/* ========================================
   BOTTOM NAVBAR (Dock/MacOS Style)
======================================== */
.bottom-navbar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1050;
  height: 80px;
  padding: 0 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 40px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.bottom-navbar.hide {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(30px);
}

.bottom-navbar a {
  position: relative;
  width: 55px;
  height: 55px;
  background: #ffffff;
  color: #bca06b;
  font-size: 1.7rem;
  border-radius: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.25s ease, background 0.25s ease;
}

.bottom-navbar a:hover {
  transform: scale(1.25);
  background: #f0f0f0;
}

.bottom-navbar .badge {
  position: absolute;
  top: 5px;
  right: 5px;
  transform: translate(50%, -50%);
  background: red;
  color: white;
  font-size: 0.7rem;
  padding: 3px 7px;
  border-radius: 9999px;
  font-weight: bold;
}
