html, body {
  min-height: 100%;
  margin: 0;
  padding: 0;
  width: 100vw;
  background: url('versidekstop.webp') no-repeat center top fixed;
  background-size: cover;
  transition: background-image 0.3s;
  box-sizing: border-box;
  overflow-x: hidden;
}
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  min-height: 100vh;
  min-width: 100vw;
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow-x: hidden;
  background: none;
}
.mainbox {
  max-width: 410px;
  width: 95vw;
  margin: 0 auto;
  background: rgba(255,255,255,0.94);
  border-radius: 26px;
  box-shadow: 0 8px 48px #c43c1e16;
  padding: 42px 18px 22px 18px;
  text-align: center;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 2.7px solid #ea1e1e;
  backdrop-filter: blur(1.2px);
}

.logo-bulat {
  width: 108px;
  height: 108px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 2px 22px #ea232230, 0 1.5px 0 #fff8;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -54px;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid #fff;
  z-index: 9;
}
.logo-bulat img { width: 90px; height: 90px; border-radius: 99px; }

h2 {
  font-weight: 800;
  font-size: 1.29em;
  margin-bottom: 6px;
  margin-top: 24px;
  letter-spacing: 1.1px;
  color: #d51818;
  text-shadow: 0 1px 0 #fff, 0 3px 18px #c90e1652;
}
h3 {
  color: #343b44;
  font-size: 1.11em;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 18px;
  margin-top: 7px;
  text-shadow: 0 1px 0 #fff,0 2px 10px #f4433626;
}

.menu-auth {
  margin: 10px auto 18px auto; display:flex; justify-content:center; gap:15px;
}
.btn-login, .btn-daftar {
  background: #fff;
  border: 1.7px solid #e31a17;
  color: #e31a17;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 1.01em;
  font-weight:700;
  text-decoration: none;
  transition: background 0.16s, color 0.14s;
  box-shadow: 0 2px 8px #ffd0d02c;
  display:inline-block;
  letter-spacing: 0.07em;
}
.btn-login:hover, .btn-daftar:hover {
  background: #e31a17;
  color: #fff;
}
input[type='text'] {
  padding: 15px 12px; width: 100%;
  font-size: 1.09em; margin-bottom: 14px;
  border:1.7px solid #f1e1e1; border-radius:11px; outline:none;
  background: #fcfcfc; font-weight: 600;
  transition: border 0.19s;
  box-sizing: border-box; color:#383838;
  box-shadow: 0 1px 0 #fff, 0 1.5px 5px #ffaeae10;
}
input[type='text']:focus { border-color: #e31a17; background:#fff; }
.btn-cek {
  padding: 13px 0; width: 100%;
  font-size: 1.10em; background: #e31a17;
  color: #fff; border: none; border-radius: 10px; cursor:pointer;
  font-weight: bold; letter-spacing: 0.8px;
  box-shadow: 0 2px 10px #e4baba6a;
  transition: background 0.18s;
  margin-bottom: 17px;
}
.btn-cek:hover { background: #b90708; }

/* LEADERBOARD */
.leaderboard-box {
  background: #fff9;
  border-radius: 17px;
  box-shadow: 0 1px 7px #7c0a1136;
  margin: 32px 0 0 0;
  padding: 14px 8px 12px 8px;
  max-width: 410px;
  width: 100%;
  max-height: 225px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #b6b6b6 #fff0;
  border: 2px solid #ea1e1e;
}
.leaderboard-title {
  color:#c90e16; font-weight:700; letter-spacing:0.06em; margin-bottom:10px; font-size:1.1em;
  text-align: center;
}
.leaderboard-table {
  width: 98%;
  margin: 0 auto;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  background: #fff;
}
.leaderboard-table th {
  background: #e82727;
  color: #fff;
  font-weight: 700;
  font-size: 1.03em;
  padding: 8px 4px 7px 4px;
  letter-spacing: 0.06em;
  border-right: 1.5px solid #fff;
  border-bottom: 2.2px solid #c01919;
  text-align: center;
}
.leaderboard-table th:last-child { border-right: none; }

.leaderboard-table td {
  background: #fff;
  border-bottom: 1.3px solid #ffd7d7;
  border-right: 1.1px solid #ffe1e1;
  padding: 7px 3px 7px 3px;
  font-size: 0.99em;
  text-align: center;
  vertical-align: middle;
  word-break: break-word;
  line-height: 1.1em;
}
.leaderboard-table td:last-child { border-right: none; }
.leaderboard-table tr:last-child td { border-bottom: none; }

.leaderboard-table td.member-col {
  text-align: left;
  padding-left: 8px;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.leaderboard-table td.kat-col {
  text-align: center;
  padding: 0 2px;
  max-width: 94px;
}
.bonus-label {
  min-width: 58px;
  font-size: 0.94em;
  padding: 4px 8px 4px 8px;
  border-radius: 8px;
  display: inline-block;
  word-break: break-word;
  white-space: pre-line;
  font-weight: 700;
  margin: 0 auto;
}
.cat-SALDO { background: #ffed8d; color: #705900; border:1.3px solid #ffe7b7;}
.cat-LUCKYWHEELS { background: #ededed; color: #232323; border:1.3px solid #ccc;}
.cat-MYSTERYBOX { background: #ffd3da; color: #b60000; border:1.3px solid #ffb6c3;}
.cat-LOGAM\ MULIA { background: #d2ffe6; color: #02744c; border:1.3px solid #c0f7d3; }
.leaderboard-table td.bonus-col {
  text-align: right;
  padding-right: 10px;
  font-weight: 700;
  color: #c01919;
  max-width: 64px;
  font-size: 1.03em;
}

.hideid {
  letter-spacing: 0.13em; font-family:monospace;
  color: #222;
  background: #eee;
  border-radius:6px;
  padding:2px 10px;
  font-weight:600;
  font-size:1em;
  user-select:none;
}
.copyright { margin-top: 14px; color: #7e7e7e; font-size: 0.99em; letter-spacing: 0.2px; text-align:center; }

/* --- MODAL --- */
#modal-bg {
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  background: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
}

#modal-content.modal {
  position: relative;
  max-width: 95vw;
  width: 360px;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  padding: 0;
  overflow: visible;
}

.popup-bg {
  width: 100%;
  max-width: 360px;
  height: auto;
  border-radius: 18px;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

#popup-content-inside {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.btn-popup-close,
.btn-popup-info {
  position: absolute;
  top: 12px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
  pointer-events: auto;
  padding: 0;
}

.btn-popup-close { right: 12px; }
.btn-popup-info { left: 12px; }

.btn-popup-konfirmasi {
  position: absolute;
  bottom: -18px; /* Sesuaikan nilai minusnya agar lebih ke bawah */
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 300px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
  pointer-events: auto;
  padding: 0;
  margin: 0 auto;
}
.popup-idbox {
  position: absolute;
  width: 100%;
  text-align: center;
  top: 125px;        /* atau sesuaikan 98px - 115px */
  font-size: 1.19em;
  font-weight: bold;
  color: #e20202;
  pointer-events: auto;
  left: 0;
  z-index: 11;
}
/* --- RESPONSIVE --- */
@media (max-width: 700px) {
  html, body {
    background: url('versimobile.webp') no-repeat center top fixed !important;
    background-size: cover !important;
    min-width: 100vw;
    width: 100vw;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  body {
    font-size: 0.95em;
    justify-content: flex-start;
  }
  .mainbox {
    width: 96vw;
    max-width: 340px;
    min-width: 210px;
    margin: 16vw auto 2vw auto !important;
    padding: 5vw 2vw 3vw 2vw;
    border-radius: 16px;
    background: rgba(255,255,255,0.91);
    box-shadow: 0 6px 24px #c43c1e16, 0 2px 22px #fff8;
    border: 2px solid #ea1e1e;
    position: relative;
    align-items: center;
    box-sizing: border-box;
  }
  .logo-bulat {
    width: 53px;
    height: 53px;
    top: -26px;
    left: 50%;
    transform: translateX(-50%);
    position: absolute;
    z-index: 2;
  }
  .logo-bulat img { width: 41px; height: 41px; }
  h2 { font-size: 1em; margin-top: 18px; }
  h3 { font-size: 0.88em; }
  .leaderboard-box {
    border-radius: 9px;
    padding: 5px 0vw 6px 0vw;
    width: 99%;
    margin: 12px auto 0 auto;
    background: #fff;
    box-shadow: 0 1.5px 8px #c43c1e12;
    border: 2px solid #ea1e1e;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .leaderboard-title { font-size: 0.99em; }
  .leaderboard-table {
    width: 98%;
    margin: 0 auto;
    font-size: 0.91em;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
  }
  .leaderboard-table th,
  .leaderboard-table td {
    padding: 6px 2px;
    border-bottom: 1.2px solid #e6e6e6;
    border-right: 1.2px solid #f5bcbc;
    background: #fff;
    word-break: break-word;
    font-size: 0.97em;
  }
  .leaderboard-table th:last-child,
  .leaderboard-table td:last-child { border-right: none; }
  .leaderboard-table th {
    background: #e82727;
    color: #fff;
    font-weight: bold;
    border-top: 1.5px solid #eaa;
    font-size: 1em;
  }
  .leaderboard-table tr:last-child td {
    border-bottom: none;
  }
  .bonus-label { min-width: 43px; font-size: 0.85em; padding: 2px 5px;}
  .hideid { font-size: 0.93em; }
  .copyright { font-size: 0.89em; }

  /* POPUP */
#modal-bg {
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  background: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
}

#modal-content.modal {
  position: relative;
  max-width: 95vw;
  width: 360px;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  padding: 0;
  overflow: visible;
}

.popup-bg {
  width: 100%;
  max-width: 360px;
  height: auto;
  border-radius: 18px;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

#popup-content-inside {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.btn-popup-close,
.btn-popup-info {
  position: absolute;
  top: 12px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
  pointer-events: auto;
  padding: 0;
}

.btn-popup-close { right: 12px; }
.btn-popup-info { left: 12px; }

.btn-popup-konfirmasi {
  position: absolute;
  bottom: -18px; /* Sesuaikan nilai minusnya agar lebih ke bawah */
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 300px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
  pointer-events: auto;
  padding: 0;
  margin: 0 auto;
}
.popup-idbox {
  position: absolute;
  width: 100%;
  text-align: center;
  top: 125px;        /* atau sesuaikan 98px - 115px */
  font-size: 1.19em;
  font-weight: bold;
  color: #e20202;
  pointer-events: auto;
  left: 0;
  z-index: 11;
}