:root{
  --red:#ef2b2b;
  --dark:#111;
  --muted:#777;
  --bg:#fff;
  --card-shadow:0 10px 30px rgba(0,0,0,0.18);
  --radius:12px;
  --maxw:380px;
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Inter,Arial;
  background:var(--bg);
  color:var(--dark);
}

/* ================= CONTAINER ================= */
.viewport{
 max-width:420px;
 margin:0 auto;
 padding:0 14px 20px;
}

.header{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:space-between;

  margin-bottom:8px;
}

.brand{
  position:absolute;
  left:50%;
  transform:translateX(-50%);

  font-weight:700;
  font-size:18px;
}

.header-right{
  display:flex;
  gap:12px;
}
/* ================= TITLE ================= */
.title-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.title{font-size:18px;font-weight:700;}

.history{
  font-size:12px;
  color:var(--muted);
  font-weight:700;
}

.subtitle{
  font-size:13px;
  color:var(--muted);
  margin:6px 0 10px;
}

/* ================= INPUT ================= */
.user-box{margin-bottom:10px;}

.input-wrap{position:relative;width:100%;}

.input-wrap .input{
  width:100%;
  height:48px;
  padding:0 14px 0 34px;
  font-size:15px;
  border-radius:12px;
  border:1px solid #eee;
}

.input-wrap .at{
  position:absolute;
  left:12px;
  top:50%;
  transform:translateY(-50%);
  color:#999;
  font-weight:600;
}

/* ================= PROMO ================= */
.promo{
  font-size:13px;
  color:#b22323;
  font-weight:700;
  margin-bottom:8px;
}

/* ================= GRID ================= */
.grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px;
  margin-bottom:12px;
}

.coin{
  display:flex;
  gap:10px;
  align-items:center;
  padding:10px;
  border-radius:12px;
  border:1px solid #eee;
  background:#fff;
  cursor:pointer;
  transition:.2s;
}

.coin:hover{
  transform:translateY(-3px);
  box-shadow:0 6px 15px rgba(0,0,0,0.12);
}

.coin:active{transform:scale(0.97);}

.coin.selected{border:2px solid var(--red);}

.coin .icon img{
  width:40px;
  height:40px;
  border-radius:50%;
}

.amount{font-weight:800;font-size:16px;}
.price{font-size:13px;color:var(--muted);}
.note{font-size:12px;color:var(--muted);}

/* ================= PAYMENT ================= */
.pm-row{
  display:flex;
  align-items:center;
  gap:10px;
}

.pm-row img{height:18px;opacity:.8;}

/* ================= BUTTON ================= */
.btn{
  width:100%;
  padding:12px;
  border-radius:12px;
  border:none;
  background:linear-gradient(135deg,#ff3b3b,#ef2b2b);
  color:#fff;
  font-weight:800;
  font-size:16px;
  margin-top:12px;
  cursor:pointer;
}

.btn:active{transform:scale(0.97);}

.overlay{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:100;

  background:rgba(255,255,255,0.12);

  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}

.overlay.active{
  display:flex;
}

/* ================= MODAL ================= */
.modal{
  width:100%;
  max-width:420px;
  background:#fff;
  border-radius:var(--radius);
  padding:18px;
  box-shadow:var(--card-shadow);
  animation:pop .2s ease;
}

@keyframes pop{
  from{transform:scale(.9);opacity:0;}
  to{transform:scale(1);opacity:1;}
}

/* ================= ORDER ================= */
.order-head{text-align:center;font-size:20px;font-weight:700;}

.order-user{
  display:flex;
  align-items:center;
  gap:10px;
  margin:10px 0;
}

.order-row{
  display:flex;
  justify-content:space-between;
}

.payment-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:10px;
}

.pay-item{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px;
  border-radius:10px;
  border:1px solid #eee;
  cursor:pointer;
}

.pay-item.active{
  border:2px solid var(--red);
  background:#fff5f5;
}

.pay-item img{height:22px;}

/* ================= PROCESS ================= */
.proc-box{
  text-align:center;
  padding:30px 20px 28px;
  border-radius:26px 26px 0 0;
  background:linear-gradient(180deg,#ffffff,#f6f7f9);
  box-shadow:0 -20px 50px rgba(0,0,0,0.08);
  animation:slideUp .35s ease;
}

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

.proc-logo{
  width:52px;
  height:52px;
  margin-bottom:14px;
  border-radius:14px;
  box-shadow:0 6px 18px rgba(0,0,0,0.08);
}

.proc-title{
  font-size:20px;
  font-weight:700;
}

.proc-sub{
  font-size:13px;
  color:#888;
  margin-bottom:20px;
}

.loader-ring{
  width:70px;
  height:70px;
  margin:0 auto 20px;
  border-radius:50%;
  border:4px solid rgba(0,0,0,0.05);
  border-top:4px solid #ff2d55;
  animation:spin 1s linear infinite;
}

@keyframes spin{to{transform:rotate(360deg);}}
/* ================= DONE ================= */

.done-btn{
  box-shadow:0 8px 20px rgba(255,43,84,.25);
}

.done-avatar-wrap{
  position:relative;
  width:90px;
  height:90px;
  margin:0 auto 18px;
}

#doneAvatar{
  width:90px !important;
  height:90px !important;
  border-radius:50%;
  object-fit:cover;
}

.done-check{
  position:absolute;
  right:0;
  bottom:0;

  width:30px;
  height:30px;

  border-radius:50%;
  background:#22c55e;
  color:#fff;

  display:flex;
  align-items:center;
  justify-content:center;

  font-size:16px;
  font-weight:700;

  border:3px solid #fff;
}

.done-title{
  font-size:28px;
  font-weight:700;
  color:#111;
  margin-bottom:18px;
}

.done-amount{
  font-size:20px;
  font-weight:600;
  color:#222;
}

.done-coin{
  width:24px;
  height:24px;
}

.done-user{
  color:#555;
  font-weight:600;
}

.done-sub{
  font-size:15px;
  line-height:1.7;
  color:#777;
  text-align:center;
  max-width:320px;
  margin:0 auto 24px;
}

.done-red{
  color:#d94b4b;
  font-weight:600;
}

.done-back{
  width:100%;
  height:54px;

  border:none;
  border-radius:16px;

  background:#fe2c55;
  color:#fff;

  font-size:17px;
  font-weight:700;
}

.done-back:active{
  transform:scale(.98);
}

/* ================= CUSTOM ================= */
.custom-title{text-align:center;font-size:20px;}

.custom-top{
  display:flex;
  align-items:center;
  gap:8px;
  margin:10px 0;
}

.custom-top img{
  width:30px;
  height:30px;
}

.keypad{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
}

.key{
  padding:10px;
  border:1px solid #eee;
  border-radius:8px;
  text-align:center;
  cursor:pointer;
}

/* ================= FIX ================= */
.order-user img{
  width:34px !important;
  height:34px !important;
  border-radius:50%;
  object-fit:cover;
}

.balance-box{
  display:flex;
  align-items:center;
  gap:8px;
  margin:6px 0 10px;
  font-weight:700;
  background:#f8f8f8;
  padding:8px 12px;
  border-radius:999px;
  width:fit-content;
}

.balance-box img{
  width:20px;
  height:20px;
  border-radius:50%;
}

.timer-circle{
  margin-top:8px;
  font-size:22px;
  font-weight:600;
  color:#666;
}

/* ================= MICRO INTERACTION ================= */

/* COIN */
.coin {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.coin:active {
  transform: scale(0.95);
}

.coin.selected {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* OVERLAY */
.overlay {
  opacity: 0;
  transition: opacity 0.25s ease;
}

.overlay.active {
  opacity: 1;
}

.modal {
  transform: translateY(40px) scale(0.95);
  transition: all 0.25s ease;
}

.overlay.active .modal {
  transform: translateY(0) scale(1);
}

/* BUTTON */
button {
  transition: transform 0.1s ease;
}

button:active {
  transform: scale(0.96);
}

/* INPUT */
input {
  transition: all 0.2s ease;
}

input:focus {
  transform: scale(1.02);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.3);
}

/* SHAKE */
@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}

.shake {
  animation: shake 0.3s;
}

/* COIN LOADER */
.coin-loader {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
}

.coin-loader img {
  width: 60px;
  height: 60px;
  animation: spinSmooth 1.2s linear infinite;
}

@keyframes spinSmooth {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ================= LOADER RING + COIN ================= */

.loader-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 16px auto;
}

/* RING */
.ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 6px solid #eee;
  border-top: 6px solid #ff2d55;

  animation: spinRing 1s linear infinite;
}

/* KOIN DI TENGAH */
.coin-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 55px;
  height: 55px;

  transform: translate(-50%, -50%);
  border-radius: 50%;

  animation: spinCoin 1.2s linear infinite;
}

/* ANIMASI */
@keyframes spinRing {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes spinCoin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}



/* mobile */
.recharge-logo{...}
.recharge-title{...}
.reward-card{...}
...

.recharge-title{
  font-size:16px;
  font-weight:600;
  margin-bottom:2px;
}

.balance-mini{
  display:flex;
  align-items:center;
  gap:4px;
  font-size:13px;
  color:#777;
}

.balance-mini img{
  width:12px;
  height:12px;
}

/* ===== RECHARGE HEADER ===== */

.recharge-info{
    margin: 15px 20px;
}

.recharge-top{
    display:flex;
    align-items:center;
    gap:12px;
}

.recharge-logo{
    width:38px;
    height:38px;
    object-fit:contain;
}

.recharge-detail{
    display:flex;
    flex-direction:column;
}

.recharge-title{
    font-size:18px;
    font-weight:500;
    color:#444;
    line-height:1;
    margin-bottom:6px;
}

.balance-mini{
    display:flex;
    align-items:center;
    gap:5px;
    color:#888;
    font-size:15px;
}

.balance-mini img{
    width:16px;
    height:16px;
}
.recharge-info{
    margin-top: 30px;
}

.brand{
    margin-top: 30px;
}

/* ===== TIKTOK GET COINS OVERRIDE ===== */
.viewport{
 max-width:420px;
 margin:0 auto;
 padding:0 14px 20px;
}

.header{
 height:52px;
 display:flex;
 align-items:center;
 justify-content:space-between;
 border-bottom:1px solid #f1f1f2;
 margin-bottom:8px;
}

.header-left,.header-right{
 display:flex;
 align-items:center;
 gap:14px;
 font-size:18px;
 color:#555;
}

.brand{
 margin-top:0 !important;
 font-size:18px;
 font-weight:700;
}

.search-box,.brand img{display:none !important;}

.recharge-info{
 margin:8px 0 12px 0 !important;
 padding:0 !important;
}

.recharge-info:last-of-type{margin-top:0 !important;}

.title{
 font-size:28px;
 font-weight:800;
}

.history{
 font-size:13px;
}

.user-box{margin-bottom:10px;}

.input-wrap .input{
 height:52px;
 background:#fafafa;
 border-radius:10px;
}

.promo{
 margin:10px 0;
}

.pm-row{
 margin-top:16px;
 padding-top:12px;
 border-top:1px solid #f1f1f2;
}

.btn{
 background:#fe2c55 !important;
 border-radius:8px;
}

.brand{margin-top:0 !important;}
.recharge-info{margin-top:0 !important;}


.recharge-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:15px;
}

.recharge-account{
    display:flex;
    align-items:center;
    gap:12px;
}

.tiktok-logo{
    width:40px;
    height:40px;
    border-radius:50%;
}

.recharge-name{
    font-size:18px;
    font-weight:700;
    color:#222;
}

.dropdown{
    font-size:14px;
    color:#666;
}

.userid-input{
    width:100%;
    height:56px;
    border:2px solid #d8def5;
    border-radius:16px;
    padding:0 18px;
    font-size:16px;
    outline:none;
    background:#fff;
}

.userid-input:focus{
    border-color:#4f7cff;
}

.recharge-label{
    font-size:16px;
    font-weight:700;
    margin:15px 0 8px;
}

.reward-card{
    display:flex;
    align-items:center;
    gap:12px;
    margin-top:20px;
    padding:15px;
    background:#fff;
    border-radius:14px;
    border:1px solid #ececec;
}

.reward-icon{
    font-size:28px;
}

.reward-title{
    font-size:16px;
    font-weight:700;
}

.reward-desc{
    font-size:13px;
    color:#888;
}

.promo{
    font-size:13px;
    color:#fe2c55;
    margin-bottom:18px;
    font-weight:600;
}
#grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:10px;
}

#grid .coin{
    background:#f5f5f5;
    border-radius:16px;

    height:65px;
    padding:7px 10px;

    display:flex;
    align-items:center;

    box-sizing:border-box;
    transition:.2s;
}

#grid .coin:hover{
    background:#efefef;
}

#grid .icon{
    margin-right:3px;
    flex-shrink:0;
}

#grid .icon img{
    width:22px;
    height:22px;
    object-fit:contain;
}

#grid .txt{
    display:flex;
    flex-direction:column;
    justify-content:center;
}

#grid .amount{
    font-size:15px;
    font-weight:700;
    color:#111;
    line-height:1;
}

#grid .price{
    font-size:10px;
    color:#8c8c8c;
    margin-top:3px;
    line-height:1;
}

/* ===== USER LOOKUP ===== */

.user-loader{
    width:32px;
    height:32px;
    margin:12px auto;
    border:3px solid #eee;
    border-top:3px solid #fe2c55;
    border-radius:50%;
    display:none;
    animation:spinUser .8s linear infinite;
}

@keyframes spinUser{
    from{
        transform:rotate(0deg);
    }
    to{
        transform:rotate(360deg);
    }
}

.user-profile{
    display:none;
    align-items:center;
    gap:12px;
    margin-top:12px;
    padding:12px;
    border:1px solid #ececec;
    border-radius:14px;
    background:#fff;
}

.user-profile img{
    width:52px;
    height:52px;
    border-radius:50%;
    object-fit:cover;
    flex-shrink:0;
}

.profile-info{
    display:flex;
    flex-direction:column;
}

#profileName{
    font-size:15px;
    font-weight:700;
    color:#111;
}

#profileUsername{
    font-size:13px;
    color:#888;
}

#profileAvatar,
#orderAvatar,
#doneAvatar{
    width:60px !important;
    height:60px !important;
    border-radius:50%;
    object-fit:cover;
    flex-shrink:0;
}

#doneAvatar{
    width:80px !important;
    height:80px !important;
    margin-bottom:12px;
}

.footer-info{
  margin:8px 0;
  padding:10px 0;
  text-align:center;

  border-top:1px solid #f2f2f2;
  border-bottom:1px solid #f2f2f2;
}

.footer-logo{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:5px;

  color:#a0a0a0;
  font-size:13px;
  font-weight:500;
}

.footer-logo img{
  width:13px;
  height:13px;
  opacity:.75;
}.done-box{
  max-width:420px;
  width:100%;
  text-align:center;
}

.done-avatar{
  width:80px;
  height:80px;
  border-radius:50%;
  object-fit:cover;
  display:block;
  margin:0 auto 10px;
}

.done-user{
  color:#666;
  font-size:16px;
  margin-bottom:15px;
}

.done-title{
  font-size:30px;
  font-weight:700;
  color:#111;
  margin-bottom:18px;
}
.done-coins{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:8px;
  font-size:24px;
  font-weight:700;
}

.done-coins img{
  width:24px;
  height:24px;
}

.done-price{
  color:#666;
  font-size:18px;
  margin-top:5px;
}

.done-sub,
.done-sub2{
  color:#777;
  font-size:14px;
  margin-top:12px;
}

.done-row{
  display:flex;
  justify-content:space-between;
  margin-top:20px;
  padding-top:15px;
  border-top:1px solid #eee;
  text-align:left;
}

.done-row span:last-child{
  font-weight:600;
}

.done-avatar-wrap{
  position:relative;
  width:90px;
  height:90px;
  margin:0 auto 12px;
}

.done-check{
  position:absolute;

  right:6px;
  bottom:6px;

  width:24px;
  height:24px;

  border-radius:50%;
  background:#43c856;
  color:#fff;

  display:flex;
  align-items:center;
  justify-content:center;

  font-size:14px;
  font-weight:700;

  border:none;
}

.done-coin{
  width:24px !important;
  height:24px !important;
  object-fit:contain;
  vertical-align:middle;
}
.profile-stats{
  margin-top:4px;
  font-size:13px;
  color:#777;
  line-height:1.4;
}

.profile-stats span{
  font-weight:600;
  color:#444;
}

/* TAMPILAN HP MESKI DI PC */
body{
  background:#eceff3;
}

.viewport{
  width:100%;
  max-width:420px;
  min-height:100vh;
  margin:0 auto;
  background:#fff;
  box-shadow:0 0 30px rgba(0,0,0,.12);
}

@media (min-width:768px){

  .viewport{
    margin-top:20px;
    min-height:calc(100vh - 40px);
    border-radius:20px;
    overflow:hidden;
  }

}

.secure-payment{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:4px;

  margin-top:8px;
  margin-bottom:12px;

  font-size:15px;
  font-weight:600;
  color:#73846b;
}

/* MATIKAN BLUR OVERLAY */
.overlay{
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}

.pay-notif{
  position:fixed;
  top:12px;
  left:50%;

  transform:translate(-50%,-120px);
  opacity:0;

  width:88%;
  max-width:420px;

  background:#fff;
  border-radius:16px;

  padding:12px;

  display:flex;
  align-items:center;
  gap:12px;

  box-shadow:0 8px 25px rgba(0,0,0,.12);

  z-index:99999;

  transition:.4s ease;
}

.pay-notif.show{
  transform:translate(-50%,0);
  opacity:1;
}

.pay-icon{
  width:36px;
  height:36px;
  flex-shrink:0;
}

.pay-content{
  flex:1;
}

.pay-header{
  display:flex;
  justify-content:space-between;
  align-items:center;

  font-size:13px;
  font-weight:700;
}

.pay-header small{
  color:#999;
}

.pay-text{
  margin-top:3px;
  font-size:13px;
  color:#666;

  word-break:break-word;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s ease;
}

.loading-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.loading-box {
  background: white;
  padding: 20px;
  border-radius: 16px;
  text-align: center;
  animation: floatIn 0.4s ease;
  min-width: 200px;
}

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

.avatar {
  font-size: 40px;
  margin-bottom: 10px;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid #ddd;
  border-top: 3px solid #333;
  border-radius: 50%;
  margin: 10px auto 0;
  animation: spin 0.8s linear infinite;
}

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

.hidden {
  display: none;
}