/* style.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

/* ========== SPLASH SCREEN ========== */
.splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #16a34a 0%, #dcfce7 100%);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.splash.hide { opacity: 0; visibility: hidden; }
.splash-container {
  text-align: center;
  max-width: 380px;
  width: 85%;
  padding: 30px 20px;
  animation: fadeInUp 0.8s ease;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.splash-logo {
  width: 90px;
  height: 90px;
  border-radius: 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  object-fit: cover;
}
.splash-container h1 {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #f97316, #facc15);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 12px;
}
.splash-container .sub {
  font-size: 1.2rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 20px;
}
.splash-container .desc {
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 30px;
}
.btn-login {
  background: linear-gradient(95deg, #f97316, #ea580c);
  border: none;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  border-radius: 40px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 10px 20px -5px rgba(249,115,22,0.4);
  transition: all 0.2s;
}
.btn-login:hover { transform: scale(1.02); background: linear-gradient(95deg, #ea580c, #c2410c); }
.btn-login:active { transform: scale(0.98); }

/* ========== KONTEN UTAMA ========== */
.main-content {
  opacity: 0;
  transition: opacity 0.6s ease;
}
.main-content.show { opacity: 1; }
body {
  background: linear-gradient(180deg, #ecfdf5 0%, #f0fdf4 50%, #ffffff 100%);
  overflow-x: hidden;
  min-height: 100vh;
}
.page-container {
  min-height: 60vh;
  padding-bottom: 70px;
}
.fade { animation: fadeIn 0.3s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.footer {
  text-align: center;
  color: #666;
  font-size: 14px;
  margin: 30px 0;
}
.footer span { color: #ff6a00; font-weight: 600; }

/* ========== NAVBAR ========== */
.navbar {
  background: white;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}
.logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.store {
  font-weight: 700;
  font-size: 18px;
}
.store span { color: #16a34a; }
.sub {
  font-size: 11px;
  color: #777;
}
.nav-right {
  display: flex;
  gap: 12px;
}
.icon {
  font-size: 20px;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
}
.icon:hover { background: #f3f3f3; }

/* ========== SIDEBAR ========== */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: none;
  z-index: 998;
}
#overlay.active { display: block; }
#sidebar {
  position: fixed;
  top: 0;
  left: -260px;
  width: 260px;
  height: 100%;
  background: #fff;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  transition: 0.3s;
  z-index: 999;
  display: flex;
  flex-direction: column;
}
#sidebar.active { left: 0; }
.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  font-weight: bold;
  font-size: 16px;
  border-bottom: 1px solid #eee;
}
.menu {
  padding: 10px;
}
.menu p {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
}
.menu p:hover { background: #f3f4f6; }
.menu p.active {
  background: #16a34a;
  color: #fff;
}
.menu .title {
  margin: 15px 10px 5px;
  font-size: 12px;
  color: #888;
}

/* ========== BOTTOM NAV ========== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: white;
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  z-index: 99;
}
.bottom-nav div {
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.bottom-nav div i { font-size: 20px; }
.bottom-nav .active { color: #16a34a; }

/* ========== POPUP ========== */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.popup-box {
  background: white;
  padding: 20px;
  border-radius: 10px;
  width: 300px;
  text-align: center;
}
.popup-btn {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  justify-content: center;
}
.popup-btn button {
  padding: 8px 15px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* ========== MODAL TOPUP (BERANDA) ========== */
.topup-modal {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: flex-end;
  z-index: 9999;
}
.topup-modal.show { display: flex; }
.topup-content {
  background: white;
  width: 100%;
  border-radius: 25px 25px 0 0;
  padding: 20px;
  max-height: 90vh;
  overflow: auto;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}
.topup-modal.show .topup-content { transform: translateY(0); }
.topup-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topup-header img { width: 45px; border-radius: 10px; }
.instant {
  background: #e8f7ee;
  color: #1fa463;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
}
.tabs {
  display: flex;
  margin-top: 20px;
  border-bottom: 2px solid #eee;
}
.tab {
  flex: 1;
  padding: 10px;
  background: none;
  border: none;
  font-weight: bold;
  color: #888;
  cursor: pointer;
}
.tab.active { color: #18a558; border-bottom: 3px solid #18a558; }
.topup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}
.item {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  cursor: pointer;
}
.item.selected { border: 2px solid #16a34a; background: #ecfdf5; }
.item.online { background: #f9fafb; }
.item.offline {
  background: #f9fafb;
  opacity: 0.5;
  cursor: not-allowed;
}
.price { color: #16a34a; font-weight: 700; }
.status {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}
.status.online { background: #22c55e; }
.status.offline { background: #ef4444; }
.confirm-btn {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: #16a34a;
  color: white;
  font-size: 16px;
  font-weight: 600;
  opacity: 0.5;
  transition: 0.2s;
}
.confirm-btn.active { opacity: 1; }
.close-btn {
  margin-left: auto;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: #f3f4f6;
  cursor: pointer;
}

/* ========== STYLE KHUSUS BERANDA ========== */
.beranda-page .banner-container { padding: 15px; }
.beranda-page .slider { position: relative; overflow: hidden; border-radius: 14px; }
.beranda-page .slide { display: none; }
.beranda-page .slide img { width: 100%; border-radius: 14px; }
.beranda-page .slide.active { display: block; }
.beranda-page .info-box {
  margin: 10px 15px;
  background: white;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #d1fae5;
  overflow: hidden;
}
.beranda-page .info-icon { color: #16a34a; font-size: 18px; flex-shrink: 0; }
.beranda-page .info-text {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}
.beranda-page .info-text::before {
  content: attr(data-text);
  display: inline-block;
  white-space: nowrap;
  animation: scrollLeft 12s linear infinite;
  padding-left: 100%;
}
@keyframes scrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
.beranda-page .search-area { display: flex; gap: 10px; padding: 15px; }
.beranda-page .search-box { flex: 1; }
.beranda-page .search-box input {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: #fff;
  font-size: 14px;
}
.beranda-page .game-title {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 15px;
  margin: 10px 0;
}
.beranda-page .title-bar {
  width: 6px;
  height: 32px;
  background: #16a34a;
  border-radius: 6px;
}
.beranda-page .title-text h2 { font-size: 22px; font-weight: 700; color: #1f2937; }
.beranda-page .title-text p { font-size: 13px; color: #6b7280; }
.beranda-page .game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 15px;
}
.beranda-page .game-card {
  background: white;
  border-radius: 18px;
  padding: 12px;
  cursor: pointer;
  border: 1px solid #ecfdf5;
  box-shadow: 0 6px 14px rgba(0,0,0,0.05);
  transition: 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.beranda-page .game-card:active { transform: scale(0.98); }
.beranda-page .game-img {
  width: 100%;
  aspect-ratio: 1/1;
  background: #f9fafb;
  border-radius: 12px;
  padding: 6px;
  margin-bottom: 8px;
  border: 1px solid #f1f5f9;
  position: relative;
}
.beranda-page .game-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}
.beranda-page .game-name { font-size: 13px; font-weight: 600; color: #1f2937; }
.beranda-page .game-service { font-size: 11px; color: #16a34a; font-weight: 500; }
.beranda-page .badge-premium {
  position: absolute;
  top: 6px;
  right: 6px;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
}
.beranda-page .menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  padding: 15px;
}
.beranda-page .menu-card {
  background: white;
  border-radius: 18px;
  padding: 18px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  cursor: pointer;
}
.beranda-page .menu-card i { font-size: 24px; color: #16a34a; margin-bottom: 8px; }
.beranda-page .menu-card p { font-size: 13px; font-weight: 600; }
.beranda-page #gameGrid, .beranda-page #panelGrid, .beranda-page #otherGrid { display: none; }
.beranda-page #titleGame, .beranda-page #titleHosting, .beranda-page #titleOther { display: none; }
.beranda-page #backBtn { display: none; }

/* ========== STYLE KHUSUS PENGUMUMAN ========== */
.pengumuman-page .pengumuman-container {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.pengumuman-page .card {
  background: white;
  border-radius: 20px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.05);
}
.pengumuman-page .card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pengumuman-page .card-header img {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  object-fit: cover;
}
.pengumuman-page .info .title {
  font-weight: 600;
  font-size: 14px;
  color: #111827;
}
.pengumuman-page .meta {
  font-size: 12px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.pengumuman-page .badge-info, .pengumuman-page .badge-promo, .pengumuman-page .badge-event {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: white;
}
.pengumuman-page .badge-info { background: #3b82f6; }
.pengumuman-page .badge-promo { background: #ef4444; }
.pengumuman-page .badge-event { background: #8b5cf6; }
.pengumuman-page .banner {
  width: 100%;
  border-radius: 15px;
  margin-top: 10px;
}
.pengumuman-page .desc-box {
  background: #f3f4f6;
  padding: 12px;
  border-radius: 14px;
  margin-top: 10px;
}
.pengumuman-page .desc {
  font-size: 14px;
  color: #374151;
  line-height: 1.6;
}
.pengumuman-page .tags {
  color: #0ea5e9;
  font-size: 13px;
  margin-top: 8px;
}

/* ========== STYLE KHUSUS MUSIC ========== */
.music-page .player {
  padding: 20px;
  text-align: center;
}
.music-page .player img {
  width: 250px;
  border-radius: 15px;
}
.music-page .song-title {
  font-weight: bold;
  margin-top: 10px;
}
.music-page .artist {
  color: gray;
  font-size: 14px;
}
.music-page .lyrics {
  height: 150px;
  overflow-y: auto;
  margin-top: 10px;
}
.music-page .lyrics p {
  margin: 5px;
  opacity: 0.4;
  transition: 0.2s;
}
.music-page .lyrics .active {
  opacity: 1;
  color: #16a34a;
  font-weight: bold;
}
.music-page .progress-container {
  height: 6px;
  background: #ddd;
  margin: 10px;
  border-radius: 10px;
  cursor: pointer;
}
.music-page .progress {
  height: 100%;
  width: 0%;
  background: #16a34a;
  border-radius: 10px;
}
.music-page .controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
}
.music-page .controls button {
  border: none;
  background: #16a34a;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}

/* ========== STYLE KHUSUS BANTUAN ========== */
.bantuan-page .bantuan-wrapper {
  background: white;
  border-radius: 20px;
  padding: 20px;
  margin: 15px;
}
.bantuan-page .header {
  text-align: center;
  margin-bottom: 25px;
}
.bantuan-page .head-icon {
  width: 70px;
  height: 70px;
  background: #e6f8ee;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: auto;
  font-size: 30px;
  color: #22c55e;
  margin-bottom: 10px;
}
.bantuan-page .header h2 { font-size: 24px; }
.bantuan-page .header p { font-size: 14px; color: #6b7280; }
.bantuan-page .card {
  display: flex;
  align-items: center;
  background: #fafafa;
  padding: 15px;
  border-radius: 15px;
  margin-bottom: 15px;
  text-decoration: none;
  color: black;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}
.bantuan-page .icon-box {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-right: 15px;
}
.bantuan-page .wa { background: #25D366; color: white; }
.bantuan-page .info { background: #111827; color: white; }
.bantuan-page .card-text { flex: 1; }
.bantuan-page .badge {
  background: #dcfce7;
  color: #16a34a;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 20px;
  margin-left: 6px;
}
.bantuan-page .arrow { color: #9ca3af; }

/* ========== STYLE KHUSUS CHECKOUT ========== */
.checkout-page .header {
  display: flex;
  align-items: center;
  padding: 15px;
  background: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.checkout-page .back {
  font-size: 22px;
  margin-right: 10px;
  cursor: pointer;
}
.checkout-page .title {
  font-weight: bold;
  font-size: 18px;
}
.checkout-page .card {
  background: white;
  margin: 15px;
  padding: 15px;
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.checkout-page .product {
  display: flex;
  align-items: center;
  gap: 15px;
}
.checkout-page .product img {
  width: 60px;
  border-radius: 10px;
}
.checkout-page .badge {
  background: #e6f7ed;
  color: #1ea55b;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 5px;
}
.checkout-page .price { color: #555; }
.checkout-page .label {
  font-weight: bold;
  margin-bottom: 6px;
  display: block;
}
.checkout-page .input-group {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
}
.checkout-page .input-group input, .checkout-page .input-group select {
  flex: 1;
  border: none;
  padding: 12px;
  outline: none;
}
.checkout-page .row {
  display: flex;
  justify-content: space-between;
  margin: 8px 0;
}
.checkout-page .total {
  font-size: 20px;
  color: #16a34a;
  font-weight: bold;
}
.checkout-page .footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 15px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}
.checkout-page .pay {
  background: #16a34a;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
}
.checkout-page .bill {
  color: #16a34a;
  font-weight: bold;
  font-size: 18px;
}
.checkout-page .payment-select {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #ddd;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  background: #fafafa;
}
.checkout-page .payment-list {
  display: none;
  margin-top: 10px;
}
.checkout-page .payment-item {
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
}
.checkout-page .payment-item.disabled {
  color: #999;
  cursor: not-allowed;
}
.checkout-page .sheet {
  position: fixed;
  bottom: -100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
  transition: 0.3s;
  z-index: 9999;
}
.checkout-page .sheet.show { bottom: 0; }
.checkout-page .sheet-content { padding: 15px; }
.checkout-page .sheet-header {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  margin-bottom: 10px;
}
.checkout-page .modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}
.checkout-page .modal-content {
  background: white;
  width: 90%;
  max-width: 400px;
  border-radius: 14px;
  padding: 15px;
}
.checkout-page .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  margin-bottom: 10px;
}
.checkout-page .close {
  cursor: pointer;
  font-size: 18px;
}
.checkout-page .loading-popup, .checkout-page .popup-warning {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.checkout-page .loading-box, .checkout-page .popup-box {
  background: white;
  padding: 20px;
  border-radius: 15px;
  text-align: center;
  width: 80%;
  max-width: 250px;
}
.checkout-page .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #eee;
  border-top: 4px solid #5b7cff;
  border-radius: 50%;
  margin: 0 auto 10px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}