:root {
  /* Orange / Gold theme (bright like the reference) */
  --bg0: #ff7a00;
  --bg1: #ffd08a;

  --cardA: rgba(255, 248, 224, .96);
  --cardB: rgba(255, 236, 190, .94);

  --stroke: rgba(124, 46, 0, .28);
  --stroke2: rgba(124, 46, 0, .16);

  --text: #2a1400;
  --muted: rgba(42, 20, 0, .74);

  --gold1: #fff1a8;
  --gold2: #ffbf1a;
  --gold3: #ff7a00;
  --gold4: #ffd36a;

  --danger: #d61f1f;
  --ok: #1e9b4b;
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  font-family: system-ui, "Segoe UI", Roboto, Arial;
  background:
    radial-gradient(900px 420px at 20% 15%, rgba(255, 255, 255, .26), transparent 60%),
    radial-gradient(760px 360px at 90% 20%, rgba(255, 255, 255, .18), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  color: var(--text);
  min-height: 100vh;
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 22px 18px;
}

/* Text shine for DRAGON SUPER */
.shine-text {
  background: linear-gradient(90deg, var(--gold1), var(--gold2), var(--gold3), var(--gold4), var(--gold1));
  background-size: 220% 100%;
  animation: sheen 7s linear infinite;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@keyframes sheen {
  0% {
    background-position: 0% 50%
  }

  100% {
    background-position: 220% 50%
  }
}

/* Base blocks */
.card {
  background: linear-gradient(180deg, var(--cardA), var(--cardB));
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 16px;
  margin: 14px 0;
  box-shadow:
    0 18px 46px rgba(0, 0, 0, .18),
    inset 0 0 0 1px rgba(255, 255, 255, .10);
}

.section-title {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: .4px;
  color: #3a1a00;
}

.hr {
  height: 1px;
  background: rgba(124, 46, 0, .18);
  margin: 10px 0 14px;
}

.note {
  color: var(--muted);
  font-size: 13px;
}

a {
  color: #b12a00;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

label {
  display: block;
  margin: 10px 0 6px;
  color: rgba(42, 20, 0, .84);
  font-size: 13px;
}

input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(124, 46, 0, .24);
  background: rgba(255, 255, 255, .86);
  color: var(--text);
  outline: none;
}

input:focus {
  border-color: rgba(255, 122, 0, .70);
  box-shadow: 0 0 0 4px rgba(255, 122, 0, .14);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(124, 46, 0, .22);
  background: rgba(255, 255, 255, .55);
  color: #3a1a00;
  cursor: pointer;
  user-select: none;
  font-weight: 800;
  transition: transform .06s ease, box-shadow .18s ease, border-color .18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 122, 0, .55);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
}

.btn:active {
  transform: translateY(0);
}

.btn.primary {
  border: none;
  color: #2a1400;
  font-weight: 1000;
  background: linear-gradient(90deg, var(--gold1), var(--gold2), var(--gold3), var(--gold4), var(--gold1));
  background-size: 240% 100%;
  animation: sheen 6s linear infinite;
  box-shadow: 0 14px 34px rgba(255, 122, 0, .20);
}

.badge {
  font-size: 12px;
  color: rgba(42, 20, 0, .80);
  border: 1px solid rgba(124, 46, 0, .20);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, .45);
}

.msg {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(124, 46, 0, .18);
  margin: 12px 0;
  background: rgba(255, 255, 255, .50);
}

.msg.ok {
  border-color: rgba(30, 155, 75, .55);
  background: rgba(30, 155, 75, .10);
}

.msg.err {
  border-color: rgba(214, 31, 31, .55);
  background: rgba(214, 31, 31, .10);
}

/* Auth pages */
.auth-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  margin: 10px 0 16px;
}

.auth-top .auth-logo {
  width: min(360px, 86%);
  height: auto;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, .22));
}

.auth-top .auth-title {
  margin: 0;
  font-size: 26px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  font-weight: 1000;
}

.small {
  color: rgba(42, 20, 0, .72);
  font-size: 13px;
}

/* Toast (non-blocking, replaces alert()) */
/* =========================
   DRAGON SUPER Toast v3
   - Smooth slide/blur
   - Green success theme
   - Animated circle + check (like your video)
   ========================= */
#toast-root.toast-root{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

@media (max-width: 520px){
  #toast-root.toast-root{
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: 14px;
    width: calc(100vw - 20px);
    align-items: center;
  }
}

/* Base toast box (support old .toast and new .toast-item/.ds-toast) */
#toast-root .ds-toast,
#toast-root .toast,
#toast-root .toast-item{
  pointer-events: none;
  position: relative;
  width: 360px;
  max-width: calc(100vw - 20px);
  border-radius: 16px;
  overflow: hidden;

  background: linear-gradient(180deg, rgba(220,252,231,.98), rgba(134,239,172,.95)) !important;
  border: 1px solid rgba(34,197,94,.45) !important;
  color: #08361a !important;

  box-shadow:
    0 16px 50px rgba(0,0,0,.20),
    inset 0 0 0 1px rgba(255,255,255,.45);

  opacity: 0;
  transform: translateY(14px) scale(.98);
}

/* Variants */
#toast-root .toast-error{
  background: linear-gradient(180deg, rgba(254,226,226,.98), rgba(252,165,165,.95)) !important;
  border-color: rgba(239,68,68,.50) !important;
  color: #3b0b0b !important;
}
#toast-root .toast-info{
  background: linear-gradient(180deg, rgba(254,243,199,.98), rgba(253,230,138,.95)) !important;
  border-color: rgba(245,158,11,.45) !important;
  color: #2a1a00 !important;
}

/* Show/Hide */
#toast-root .show{
  animation: toast-in .36s cubic-bezier(0.22, 1, 0.36, 1) both;
}
#toast-root .hide{
  animation: toast-out .26s cubic-bezier(0.4, 0, 1, 1) both;
}

@keyframes toast-in{
  0%{opacity:0; transform: translateY(14px) scale(.98); filter: blur(1px);}
  100%{opacity:1; transform: translateY(0) scale(1); filter: blur(0);}
}
@keyframes toast-out{
  0%{opacity:1; transform: translateY(0) scale(1);}
  100%{opacity:0; transform: translateY(10px) scale(.98);}
}

/* Layout inside toast */
#toast-root .toast-body{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px 10px;
}

#toast-root .toast-ic{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(34,197,94,.16);
  border: 1px solid rgba(34,197,94,.28);
  flex: 0 0 34px;
  margin-top: 1px;
}

#toast-root .toast-tx{
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 1px;
  min-width: 0;
}

/* support both .toast-title (new) and .toast-text (old) */
#toast-root .toast-title,
#toast-root .toast-text{
  font-weight: 1000;
  line-height: 1.25;
  font-size: 14px;
}

#toast-root .toast-sub{
  font-weight: 750;
  font-size: 12px;
  color: rgba(8,54,26,.72);
  word-break: break-word;
}

/* Progress bar */
#toast-root .toast-bar{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(8,54,26,.12);
}

#toast-root .toast-bar > i{
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, rgba(34,197,94,.95), rgba(16,185,129,.95), rgba(34,197,94,.95));
  transform-origin: left center;
  animation: toast-progress linear both;
}

@keyframes toast-progress{
  from{transform: scaleX(1);}
  to{transform: scaleX(0);}
}

/* ✅ Animated check icon (circle draw + tick draw) */
#toast-root .toast-check{
  width: 22px;
  height: 22px;
}

#toast-root .toast-check__circle{
  stroke: rgba(34,197,94,.95);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 160;
  stroke-dashoffset: 160;
  animation: ds-draw-circle .45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

#toast-root .toast-check__check{
  stroke: rgba(16,185,129,.95);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: ds-draw-check .28s cubic-bezier(0.22, 1, 0.36, 1) .32s forwards;
}

@keyframes ds-draw-circle{ to { stroke-dashoffset: 0; } }
@keyframes ds-draw-check{  to { stroke-dashoffset: 0; } }

/* ==========
   Shake-bottom (from Animista)
   ========== */
.shake-bottom{
  -webkit-animation: shake-bottom 0.8s cubic-bezier(0.455, 0.030, 0.515, 0.955) both;
          animation: shake-bottom 0.8s cubic-bezier(0.455, 0.030, 0.515, 0.955) both;
}

@-webkit-keyframes shake-bottom{
  0%,100%{
    -webkit-transform: rotate(0deg);
            transform: rotate(0deg);
    -webkit-transform-origin: 50% 100%;
            transform-origin: 50% 100%;
  }
  10%{ -webkit-transform: rotate(2deg); transform: rotate(2deg); }
  20%,40%,60%{ -webkit-transform: rotate(-4deg); transform: rotate(-4deg); }
  30%,50%,70%{ -webkit-transform: rotate(4deg); transform: rotate(4deg); }
  80%{ -webkit-transform: rotate(-2deg); transform: rotate(-2deg); }
  90%{ -webkit-transform: rotate(2deg); transform: rotate(2deg); }
}

@keyframes shake-bottom{
  0%,100%{
    -webkit-transform: rotate(0deg);
            transform: rotate(0deg);
    -webkit-transform-origin: 50% 100%;
            transform-origin: 50% 100%;
  }
  10%{ -webkit-transform: rotate(2deg); transform: rotate(2deg); }
  20%,40%,60%{ -webkit-transform: rotate(-4deg); transform: rotate(-4deg); }
  30%,50%,70%{ -webkit-transform: rotate(4deg); transform: rotate(4deg); }
  80%{ -webkit-transform: rotate(-2deg); transform: rotate(-2deg); }
  90%{ -webkit-transform: rotate(2deg); transform: rotate(2deg); }
}

/* =========================
   TOPUP EVENT POPUP (x2/x3...)
   ========================= */
.ds-modal-overlay{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0,0,0,.55);
  z-index: 9998;
}
.ds-modal-overlay.is-open, .ds-modal-overlay.show{ display: flex; }

.ds-modal{
  position: relative;
  width: min(460px, 92vw);
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.12);
  background: linear-gradient(180deg, rgba(255,250,235,1) 0%, rgba(255,231,181,1) 100%);
  box-shadow: 0 18px 52px rgba(0,0,0,.35);
  overflow: hidden;
  transform: translateY(16px) scale(.98);
  opacity: 0;
}
.ds-modal.is-show, .ds-modal.show{
  animation: ds-modal-in .42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes ds-modal-in{
  0%   { opacity: 0; transform: translateY(18px) scale(.96); }
  60%  { opacity: 1; transform: translateY(-4px) scale(1.01); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.ds-modal-head{
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  align-items: center;
  border-bottom: 1px solid rgba(0,0,0,.08);
  background: linear-gradient(180deg, rgba(255,239,200,1) 0%, rgba(255,232,180,1) 100%);
}

.ds-head-left{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.ds-gifts{
  display: inline-flex;
  gap: 6px;
  opacity: .95;
}

.ds-gift-ic{
  width: 22px;
  height: 22px;
  fill: rgba(59,37,0,.78);
}

.ds-badge{
  flex: 0 0 auto;
  min-width: 54px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 900;
  letter-spacing: .5px;
  color: #fff;
  background: linear-gradient(180deg, rgba(34,197,94,1) 0%, rgba(16,185,129,1) 100%);
  box-shadow: 0 10px 22px rgba(16,185,129,.35);
}

.ds-modal-title{
  font-size: 17px;
  font-weight: 900;
  line-height: 1.2;
  color: #3b2500;
}
.ds-modal-sub{
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.35;
  color: rgba(59,37,0,.85);
}

.ds-modal-close{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.15);
  background: rgba(255,255,255,.65);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: rgba(0,0,0,.75);
}
.ds-modal-close:hover{ background: rgba(255,255,255,.9); }

.ds-modal-body{ padding: 12px 16px 16px; }

.ds-modal-steps{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ds-step{
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(0,0,0,.08);
  color: rgba(59,37,0,.92);
  font-size: 13px;
}

.ds-step-ic{
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(1px);
}

.ds-modal-list{
  margin: 0;
  padding-left: 18px;
  color: rgba(59,37,0,.9);
  font-size: 13px;
}
.ds-modal-list li{ margin: 6px 0; }

.ds-modal-check{
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  width: fit-content;
  max-width: 100%;
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(0,0,0,.08);
  user-select: none;
  font-size: 13px;
  color: rgba(59,37,0,.9);
  white-space: nowrap;
}
.ds-modal-check input[type="checkbox"]{
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,.22);
  background: rgba(255,255,255,.95);
  box-shadow: none;
  transform: translateY(1px);
  accent-color: rgba(255, 142, 0, .95);
}

.ds-modal-actions{
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}

/* Responsive: stack buttons on very small screens */
@media (max-width: 420px){
  .ds-modal-actions{ flex-direction: column; }
  .ds-modal-actions .btn{ width: 100%; text-align: center; }
}

