:root {
  --bg: #0f1115;
  --panel: #171a21;
  --line: #2a3140;
  --text: #e8ecf4;
  --muted: #9aa6b8;
  --accent: #7c5cff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image: url("../background.png");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 18px 60px;
}
button {
  cursor: pointer;
  background: var(--accent);
  color: var(--text);
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 600;
}
.prov-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
}
.prov-nav {
  flex: 0 0 36px;
  width: 36px;
  height: 64px;
  border: none;
  border-radius: 6px;
  background: #2a2a2a;
  color: #fff;
  font-size: 1.4rem;
}
.site-head { margin: 0 0 18px; }
.brand-center {
  display: flex;
  justify-content: center;
  margin: 0 0 10px;
}
.brand-center img {
  height: 88px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.ticker {
  display: flex;
  align-items: center;
  background: #141414;
  border: 1px solid #2a2a2a;
  color: #cfcfcf;
  font-size: 0.78rem;
  padding: 6px 10px;
  margin: 0 0 10px;
  overflow: hidden;
}
.ticker-track {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}
.ticker-track span {
  display: inline-block;
  padding-left: 100%;
  animation: tickerMove 35s linear infinite;
}
@keyframes tickerMove {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
.hero {
  width: 100%;
  overflow: hidden;
  border-radius: 4px;
}
.hero-track {
  display: flex;
  width: 200%;
  animation: heroSlide 8s infinite;
}
.hero-slide {
  width: 50%;
  flex: 0 0 50%;
}
.hero-slide img {
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: cover;
  display: block;
}
@keyframes heroSlide {
  0%, 40% { transform: translateX(0); }
  50%, 90% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}
.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-btn {
  display: grid;
  place-items: center;
  height: 42px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.auth-dark { background: #111; color: #fff; }
.auth-gold { background: #e7c56a; color: #111; }
.cat-bar {
  display: flex;
  flex: 1;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0;
  scrollbar-width: none;
}
.cat-bar::-webkit-scrollbar { display: none; }
.cat-item {
  flex: 0 0 128px;
  width: 128px;
  height: 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 6px;
  border: none;
  border-radius: 6px;
  background: #4a4a4a;
  color: #9be28a;
}
.cat-item img,
.cat-item .prov-ico {
  width: 72px;
  height: 36px;
  object-fit: contain;
  display: block;
}
.cat-item span {
  width: 100%;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cat-item.is-on { outline: 2px solid #f4c430; }
.grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  min-width: 0;
  width: 100%;
}
.thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  background: #0d0f14;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card:hover .thumb img {
  transform: scale(1.08);
}
.thumb::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  pointer-events: none;
}
.prov-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 2;
  max-width: calc(100% - 16px);
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15, 17, 21, 0.78);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
}
.meta { padding: 12px 10px 14px; }
.meta h2 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.provider {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.85rem;
}
.rtp-wrap {
  position: relative;
  height: 28px;
  margin: 8px 0;
  background: #2b2b2b;
  border-radius: 999px;
  overflow: hidden;
}
.rtp-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--target);
  border-radius: 999px;
  background-size: 28px 28px;
  animation: rtpMove 0.9s linear infinite;
}
.rtp-fill.ok { background-color: #22c55e; }
.rtp-fill.mid { background-color: #f59e0b; }
.rtp-fill.low { background-color: #ef4444; }
.rtp-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  color: #fff;
  font-weight: 800;
  font-size: clamp(0.55rem, 1.1vw, 0.72rem);
}
@keyframes rtpMove {
  from { background-position: 0 0; }
  to { background-position: 28px 0; }
}
.card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.btn-ghost,
.btn-main {
  width: 100%;
  height: 34px;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: clamp(0.58rem, 1.15vw, 0.75rem);
}
.btn-ghost { background: #5a5a5a; color: #fff; }
.btn-main { background: #b22222; color: #fff; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.72);
}
.modal.is-open { display: grid; }
.modal-card {
  width: min(920px, 100%);
  background: linear-gradient(180deg, #1c212b 0%, #14171d 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #15181f;
  color: #f4c430;
}
.modal-body {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 16px;
  padding: 16px;
}
.step {
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #14171d;
}
.step h3 {
  display: inline-block;
  margin: 0 0 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #2a3140;
  font-size: 0.68rem;
}
.step strong { display: block; margin-bottom: 4px; color: #f4c430; }
.step p { margin: 0; color: var(--muted); font-size: 0.85rem; }
.modal-side {
  text-align: center;
  background: #14171d;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
}
.modal-side .thumb {
  width: 200px;
  height: 200px;
  border-radius: 16px;
  margin: 0 auto 10px;
}
#tips-close {
  background: transparent;
  color: #f4c430;
  font-size: 1.4rem;
  min-width: 0;
  height: auto;
  padding: 0 6px;
}
#main-sekarang,
#tips-download {
  width: 100%;
  margin-top: 12px;
  height: 46px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
  color: #fff;
  font-weight: 800;
}
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .modal-body { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .wrap { padding: 16px 10px 40px; }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
