/* ================================
   GLOBAL STYLES - PUSAT4D NEON DASHBOARD
================================ */
:root {
  --bg-dark: #031e16;
  --bg-panel: #063525;
  --highlight: #42c498;
  --text-main: #e5e5e5;
  --text-sub: #b4b4b4;
  --radius: 14px;
  --shadow: 0 0 18px rgba(0, 0, 0, 0.5);
  --font: 'Poppins', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font);
  overflow-x: hidden;
}

/* ================================
   HEADER
================================ */
.top-header {
  position: sticky;
  top: 0;
  width: 100%;
  background: linear-gradient(135deg, #042a1c, #063525);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 30px;
  z-index: 1000;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}

.top-header .logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--highlight);
  text-shadow: 0 0 8px rgba(66, 196, 152, 0.6);
}

.top-header .logo span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-sub);
  letter-spacing: 0.5px;
}

.profile-icon {
  font-size: 1.6rem;
  color: var(--highlight);
  cursor: pointer;
  transition: transform 0.3s ease;
}
.profile-icon:hover {
  transform: scale(1.1);
}

/* ================================
   MAIN WRAPPER
================================ */
.main-wrapper {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 25px;
}

/* ================================
   SIDEBAR
================================ */
.sidebar {
  background: var(--bg-panel);
  border: 2px solid var(--highlight);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  height: fit-content;
  max-height: 80vh;
  overflow-y: auto;
}

.sidebar h3 {
  color: var(--highlight);
  margin-bottom: 15px;
  text-align: center;
}

#riwayat-list {
  list-style: none;
}

#riwayat-list li {
  padding: 10px;
  background: rgba(66, 196, 152, 0.1);
  border-radius: 8px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 0.95rem;
}

#riwayat-list li:hover {
  background: rgba(66, 196, 152, 0.3);
  transform: scale(1.02);
}

/* ================================
   CONTENT
================================ */
.content h1 {
  color: var(--highlight);
  text-shadow: 0 0 10px rgba(66, 196, 152, 0.6);
  text-align: center;
  margin-bottom: 10px;
}

.desc {
  text-align: center;
  color: var(--text-sub);
  margin-bottom: 30px;
  font-size: 0.95rem;
}

/* ================================
   PASARAN GRID
================================ */
.pasaran-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px;
}

.pasaran-btn {
  background: var(--bg-panel);
  border: 2px solid var(--highlight);
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  font-weight: 600;
  color: var(--text-main);
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

.pasaran-btn:hover {
  background: var(--highlight);
  color: #000;
  transform: scale(1.07);
  box-shadow: 0 0 12px rgba(66, 196, 152, 0.7);
}

/* ================================
   POPUP RESULT
================================ */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 2000;
}

.popup-overlay.active {
  visibility: visible;
  opacity: 1;
}

.popup-box {
  background: var(--bg-panel);
  border: 2px solid var(--highlight);
  border-radius: var(--radius);
  padding: 30px 20px;
  width: 90%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 0 25px rgba(66, 196, 152, 0.5);
  animation: zoomIn 0.4s ease;
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.result-table {
  width: 100%;
  margin: 15px 0;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.result-table td {
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-table td:first-child {
  color: var(--highlight);
  text-align: left;
}
.result-table td:last-child {
  text-align: right;
}

.note {
  color: var(--text-sub);
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.close-btn {
  background: var(--highlight);
  border: none;
  padding: 10px 25px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}
.close-btn:hover {
  transform: scale(1.05);
}

/* ================================
   LOADING ANIMATION
================================ */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

.loading-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 60px;
  margin-bottom: 18px;
}

.loader {
  width: 6px;
  margin-left: 4px;
  height: 35px;
  border-radius: 2px;
  background-color: #42c498;
  box-shadow: 0 0 14px rgba(66, 196, 152, 0.6);
  position: relative;
}

.l1 { animation: l1 1s 0s infinite ease-in-out; }
.l2 { animation: l1 1s 0.1s infinite ease-in-out; }
.l3 { animation: l1 1s 0.2s infinite ease-in-out; }
.l4 { animation: l1 1s 0.3s infinite ease-in-out; }
.l5 { animation: l1 1s 0.4s infinite ease-in-out; }
.l6 { animation: l1 1s 0.5s infinite ease-in-out; }
.l7 { animation: l1 1s 0.6s infinite ease-in-out; }

@keyframes l1 {
  0%, 100% { height: 35px; opacity: 1; }
  50% { height: 5px; opacity: 0.6; }
}

.loading-overlay p {
  color: #42c498;
  text-shadow: 0 0 8px rgba(66, 196, 152, 0.6);
  animation: fadeBlink 1.2s ease-in-out infinite alternate;
}

@keyframes fadeBlink {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

.prediksi-partner .partner-grid.top-row {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 25px;
}

.prediksi-partner .partner-grid.bottom-row {
  display: flex;
  justify-content: center;
  gap: 80px;
  margin-top: -30px;
}

.prediksi-partner .partner-card {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.prediksi-partner .partner-card:hover {
  transform: translateY(-6px) scale(1.03);
}

/* ================================
   CUSTOM ZIGZAG LAYOUT UNTUK PARTNER
================================ */
#partner-section {
  margin: 60px auto;
  max-width: 1100px;
  text-align: center;
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 35px;
  justify-items: center;
}

/* Efek zigzag rapi - baris kedua agak turun & geser */
.partner-card:nth-child(4) {
  margin-top: -30px;          /* turun dikit */
  transform: translateX(200px); /* geser kanan dikit */
}

.partner-card:nth-child(5) {
  margin-top: -30px;
  transform: translateX(220px); /* geser kiri dikit */
}

/* Animasi halus */
.partner-card {
  transition: all 0.3s ease;
}

/* Responsif - di HP balik center */
@media (max-width: 768px) {
  .partner-card:nth-child(4),
  .partner-card:nth-child(5) {
    margin-top: 0;
    transform: none;
  }
}

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 1024px) {
  .main-wrapper {
    grid-template-columns: 1fr;
  }
  .sidebar {
    order: 2;
    margin-top: 25px;
  }
}

@media (max-width: 600px) {
  .top-header {
    padding: 15px 20px;
  }
  .main-wrapper {
    padding: 0 15px;
  }
  .partner-grid {
    gap: 18px;
  }
}
/* ================================
   LAYOUT CENTER FIX (DESKTOP MODE)
================================ */
@media (min-width: 1025px) {
  .main-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 1000px;
    margin: 40px auto;
    text-align: center;
  }

  .content {
    order: 1;
    width: 100%;
    max-width: 850px;
  }

  .sidebar {
    order: 2;
    width: 100%;
    max-width: 400px;
    margin-top: 35px;
  }

  #riwayat-list {
    max-height: 45vh;
    overflow-y: auto;
  }

  .pasaran-grid {
    justify-content: center;
  }
}
/* ===============================
   STICKY BUTTON (AUTO HIDE)
================================ */
.btn-up {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99;
  background-color: #063525;
  color: #42c498;
  border: 2px solid #42c498;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(66,196,152,0.4);
}

.btn-up:hover {
  background-color: #42c498;
  color: #031e16;
  box-shadow: 0 0 14px rgba(0,255,179,0.7);
}

.btn-up.show {
  opacity: 1;
  visibility: visible;
}
/* ============================
   MOBILE BANNER GROUP (FULL WIDTH TANPA CELAH)
============================ */
.mobile-banner-group {
  display: none;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow: hidden;
  background: #02180f;
  padding: 0;
  border-bottom: 1px solid rgba(66, 196, 152, 0.2);
}

.mobile-banner-group a {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
}

.mobile-banner-group img {
  display: block;
  width: 100vw;
  height: auto;
  margin: 0;
  padding: 0;
  border: none;
}

/* Muncul hanya di mobile */
@media (max-width: 768px) {
  .mobile-banner-group {
    display: block;
  }
}