/* ============================================================
   ROOT VARIABLES - ELEGANT THEME
   ============================================================ */
:root,
[data-bs-theme=light] {
  --bs-color-nav: #00b18a;
  --bs-color-btn: #ffffff;
  --bs-color-text-hover: #00daaa;
  --bs-color-btn-hover: #00be95;
  
  --bs-glow-primary: rgba(0, 218, 170, 0.4);
  --bs-glow-secondary: rgba(0, 255, 170, 0.2);
  --bs-card-bg: rgba(255, 255, 255, 0.08);
  --bs-border-glow: rgba(0, 218, 170, 0.3);
  --bs-shadow-color: rgba(0, 0, 0, 0.15);
}

[data-bs-theme=dark] {
  color-scheme: dark;
  --bs-color-nav: #2a2a2a;
  --bs-color-btn: #00daaa;
  --bs-color-text-hover: #000000;
  --bs-color-btn-hover: #ffffff;
  
  --bs-glow-primary: rgba(0, 218, 170, 0.5);
  --bs-glow-secondary: rgba(0, 255, 170, 0.15);
  --bs-card-bg: rgba(255, 255, 255, 0.05);
  --bs-border-glow: rgba(0, 218, 170, 0.2);
  --bs-shadow-color: rgba(0, 0, 0, 0.4);
}

/* ============================================================
   RESET & OVERFLOW
   ============================================================ */
html, body {
  overflow-x: hidden !important;
  max-width: 100% !important;
  margin: 0;
  padding: 0;
}

* {
  box-sizing: border-box;
}

.container, .container-fluid {
  overflow-x: hidden !important;
}

/* ============================================================
   SCROLLBAR PREMIUM (RINGAN)
   ============================================================ */
body::-webkit-scrollbar {
  width: 5px;
  background: transparent;
}

body::-webkit-scrollbar-track {
  background: rgba(44, 44, 44, 0.15);
  border-radius: 25px;
}

body::-webkit-scrollbar-thumb {
  background: #00daaa;
  border-radius: 25px;
}

body::-webkit-scrollbar-thumb:hover {
  background: #00ca8d;
}

/* ============================================================
   NAVBAR ELEGANT (OPTIMASI)
   ============================================================ */
.bg-rtp {
  background: var(--bs-color-nav);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  border-bottom: 2px solid rgba(0, 218, 170, 0.12);
  position: relative;
}

.bg-rtp::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00daaa, transparent);
  animation: shimmerBorder 3s ease-in-out infinite;
}

@keyframes shimmerBorder {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.7; }
}

.btn-outline-nav {
  border: 1.5px solid var(--bs-color-btn);
  color: var(--bs-color-btn);
  border-radius: 25px;
  padding: 8px 20px;
  transition: all 0.25s ease;
}

.btn-outline-nav:hover {
  background: var(--bs-color-btn-hover);
  color: var(--bs-color-text-hover);
  transform: scale(1.04);
}

.navbar-brand .logo {
  width: 150px !important;
  height: 60px;
  transition: transform 0.25s ease;
}

.navbar-brand .logo:hover {
  transform: scale(1.04);
}

/* ============================================================
   PAGE BACKGROUND (RINGAN)
   ============================================================ */
.page-items {
  background: linear-gradient(135deg, rgba(10, 171, 96, 0.2), rgba(0, 218, 170, 0.04));
  padding: 20px 0;
  position: relative;
  overflow-x: hidden;
}

/* ============================================================
   CARD PROVIDER (RINGAN)
   ============================================================ */
.card-privider {
  background: linear-gradient(145deg, rgba(0, 97, 76, 0.75), rgba(0, 50, 40, 0.65));
  border-radius: 20px !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
}

/* ============================================================
   BUTTON OUTLINE
   ============================================================ */
.btn-outline-rtp {
  background: rgba(255, 204, 0, 0.04);
  color: #ffcc00;
  border: 2px solid #ffcc00;
  border-radius: 12px;
  text-decoration: none;
  display: flex;
  text-align: center;
  justify-content: center;
  align-items: center;
  height: 45px;
  transition: all 0.25s ease;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 14px;
}

.btn-outline-rtp:hover {
  background: linear-gradient(135deg, #ffcc00, #f5a623);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 204, 0, 0.15);
}

/* ============================================================
   SLIDER PROVIDER - OPTIMASI SCROLL
   ============================================================ */
#sliderRow {
  height: 250px;
  scroll-behavior: smooth;
  padding: 5px 5px 25px 5px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  flex-wrap: nowrap !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #00daaa transparent;
}

#sliderRow .pro-img {
  height: 200px;
  padding: 2px;
  flex-shrink: 0;
}

@media (max-width: 960px) {
  #sliderRow {
    height: 180px;
    padding: 5px 5px 20px 5px !important;
  }
  #sliderRow .pro-img {
    height: 130px;
  }
}

@media (max-width: 768px) {
  #sliderRow {
    height: 180px;
    padding: 5px 5px 20px 5px !important;
  }
  #sliderRow .pro-img {
    height: 150px;
  }
}

@media (max-width: 480px) {
  #sliderRow {
    height: 160px;
    padding: 5px 5px 18px 5px !important;
  }
  #sliderRow .pro-img {
    height: 140px;
  }
}

/* Scrollbar styling - RINGAN & LANCAR */
#sliderRow::-webkit-scrollbar {
  height: 4px;
  background: transparent;
}

#sliderRow::-webkit-scrollbar-track {
  background: rgba(56, 56, 56, 0.1);
  border-radius: 25px;
  margin: 0 10px;
}

#sliderRow::-webkit-scrollbar-thumb {
  background: #00daaa;
  border-radius: 25px;
}

/* Provider Link - OPTIMASI (HAPUS will-change) */
.provider-link {
  transition: transform 0.2s ease;
  background: rgba(66, 66, 66, 0.45);
  display: block;
  border-radius: 16px !important;
  padding: 10px 5px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
}

.provider-link:hover {
  transform: translateY(-4px) scale(1.01);
  background: rgba(66, 66, 66, 0.65);
}

.provider-img {
  width: auto;
  bottom: 0;
  border: none;
  border-radius: 12px;
  transition: transform 0.25s ease;
}

.provider-link:hover .provider-img {
  transform: scale(1.04);
}

/* Active State - RINGAN */
.active {
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 255, 157, 0.25) !important;
  border-color: rgba(0, 218, 170, 0.25) !important;
  background: rgba(0, 218, 170, 0.06) !important;
}

.active .provider-img {
  filter: drop-shadow(0 0 12px rgba(0, 218, 170, 0.2));
}

/* Flash Diagonal - OPTIMASI (HAPUS glow ring) */
.active::before {
  content: '';
  position: absolute;
  top: -150%;
  left: -150%;
  width: 300%;
  height: 300%;
  background: linear-gradient(
    45deg,
    transparent 35%,
    rgba(255, 255, 255, 0.3) 45%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0.3) 55%,
    transparent 65%
  );
  animation: flashDiagonal 3.5s ease-in-out infinite;
  pointer-events: none;
  border-radius: 16px;
}

@keyframes flashDiagonal {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
    opacity: 0;
  }
  25% {
    opacity: 1;
  }
  75% {
    opacity: 1;
  }
  100% {
    transform: translate(50%, 50%) rotate(10deg);
    opacity: 0;
  }
}

/* HAPUS GLOW RING (penyebab lag) */
.active::after {
  display: none;
}

/* ============================================================
   SLIDER NAVIGASI MOBILE
   ============================================================ */
.slider-container {
  position: relative;
  padding: 0 35px;
}

.slider-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0, 218, 170, 0.15);
  color: #ffffff;
  border: 1px solid rgba(0, 218, 170, 0.15);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.slider-nav-btn:hover {
  background: rgba(0, 218, 170, 0.3);
  transform: translateY(-50%) scale(1.06);
}

.slider-nav-btn.prev {
  left: 0;
}

.slider-nav-btn.next {
  right: 0;
}

.slider-nav-btn.disabled {
  opacity: 0.2;
  cursor: not-allowed;
  pointer-events: none;
}

@media (min-width: 769px) {
  .slider-nav-btn {
    display: none !important;
  }
  .slider-container {
    padding: 0;
  }
}

@media (max-width: 768px) {
  .slider-nav-btn {
    display: flex !important;
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
  .slider-container {
    padding: 0 28px;
  }
}

@media (max-width: 480px) {
  .slider-nav-btn {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }
  .slider-container {
    padding: 0 22px;
  }
}

/* ============================================================
   GAME CARD
   ============================================================ */
#tanggalwaktu,
.text-provider {
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  letter-spacing: 1px;
}

.text-provider {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #00daaa, #00ffaa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  position: relative;
  display: inline-block;
}

.text-provider::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #00daaa, transparent);
  border-radius: 10px;
}

.card-list {
  background: linear-gradient(145deg, rgba(0, 124, 97, 0.25), rgba(0, 50, 40, 0.15));
  border-radius: 20px !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

/* ============================================================
   SEARCH FORM
   ============================================================ */
.search-wrapper {
  background: rgba(171, 225, 202, 0.571);
  border-radius: 50px;
  border: 1px solid rgba(0, 214, 125, 0.648);
  padding: 0 5px;
  transition: all 0.25s ease;
  margin-bottom: 15px;
}

.search-wrapper:focus-within {
  border-color: rgba(0, 214, 125, 0.648);
  background: rgba(18, 183, 131, 0.476);
}

.search-wrapper .input-group {
  border-radius: 50px;
  overflow: hidden;
}

.search-wrapper .form-control {
  padding: 12px 20px;
  font-size: 15px;
  color: #ffffff !important;
  background: transparent !important;
  outline: none;
  box-shadow: none !important;
}

.search-wrapper .form-control::placeholder {
  color: rgba(255, 255, 255, 0.3);
  font-weight: 300;
}

.search-wrapper .form-control:focus {
  border-color: transparent;
  box-shadow: none;
}

.search-wrapper .input-group-text {
  color: rgba(255, 255, 255, 0.35);
  padding-left: 20px;
  background: transparent;
  border: none;
}

#clearSearch {
  color: rgba(255, 255, 255, 0.35);
  transition: all 0.25s ease;
  padding: 0 15px;
  background: transparent;
  border: none;
}

#clearSearch:hover {
  color: #00daaa;
  transform: scale(1.06);
}

/* ============================================================
   SEARCH RESULT - RAPAT KE KIRI
   ============================================================ */
#game-container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start !important;
  gap: 0;
  min-height: 80px;
  height: auto !important;
}

#game-container .col-6,
#game-container .col-md-4,
#game-container .col-lg-2 {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  transition: all 0.2s ease;
  padding-left: 8px;
  padding-right: 8px;
  margin-bottom: 16px;
}

#game-container .col-6[style*="display: none"],
#game-container .col-md-4[style*="display: none"],
#game-container .col-lg-2[style*="display: none"] {
  display: none !important;
  margin: 0;
  padding: 0;
  width: 0;
  height: 0;
  overflow: hidden;
  flex: 0 0 0;
  border: none;
}

#game-container .col-6:not([style*="display: none"]),
#game-container .col-md-4:not([style*="display: none"]),
#game-container .col-lg-2:not([style*="display: none"]) {
  display: flex !important;
  animation: cardAppear 0.2s ease forwards;
}

@keyframes cardAppear {
  0% {
    opacity: 0;
    transform: scale(0.95) translateY(6px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (min-width: 992px) {
  #game-container .col-lg-2 {
    flex: 0 0 20% !important;
    max-width: 20% !important;
    padding: 0 8px;
    margin-bottom: 16px;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  #game-container .col-md-4 {
    flex: 0 0 33.33333333% !important;
    max-width: 33.33333333% !important;
    padding: 0 8px;
    margin-bottom: 16px;
  }
}

@media (max-width: 767px) {
  #game-container .col-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    padding: 0 5px;
    margin-bottom: 12px;
  }
}

#no-result {
  display: none;
  width: 100%;
  text-align: center;
  padding: 30px 20px;
}

#no-result.show {
  display: block !important;
  animation: fadeIn 0.25s ease;
}

#no-result .no-result-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.4;
}

#no-result .no-result-text {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.5);
}

#no-result .no-result-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.25);
  margin-top: 4px;
}

.game-title .highlight {
  background: rgba(0, 218, 170, 0.2);
  color: #00daaa;
  padding: 0 4px;
  border-radius: 3px;
  font-weight: 700;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   GRID GAME - RESPONSIVE
   ============================================================ */
#game-container .col-6 {
  flex: 0 0 auto;
  width: 50%;
}

@media (min-width: 992px) {
  #game-container .col-lg-2 {
    flex: 0 0 20% !important;
    width: 20% !important;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  #game-container .col-md-4 {
    flex: 0 0 33.33333333% !important;
    width: 33.33333333% !important;
  }
}

@media (max-width: 767px) {
  #game-container .col-6 {
    flex: 0 0 50% !important;
    width: 50% !important;
  }
}

/* ============================================================
   GAME CARD WRAPPER - OPTIMASI (HAPUS will-change)
   ============================================================ */
.game-card-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  height: 100%;
}

.game-card-wrapper:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.card-play {
  flex-grow: 1;
  background-image: url('../img/pelate.jpg');
  background-size: cover;
  background-position: center;
  border-radius: 16px 16px 0 0 !important;
  color: #ffffff !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-play::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.04));
  z-index: 1;
  transition: background 0.25s ease;
}

.game-card-wrapper:hover .card-play::before {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.15));
}

.card-play > * {
  position: relative;
  z-index: 2;
}

/* ============================================================
   GAMBAR GAME (HAPUS will-change)
   ============================================================ */
.card-img-top {
  width: 100%;
  height: 100%;
  max-height: 220px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px 12px 0 0 !important;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.game-card-wrapper:hover .card-img-top {
  transform: scale(1.02);
}

.game-title {
  min-height: 36px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
  transition: color 0.25s ease;
  padding: 4px 0;
}

.game-card-wrapper:hover .game-title {
  color: #00daaa;
}

/* ============================================================
   TOMBOL PLAY - OVERLAY (DESKTOP)
   ============================================================ */
.btn-play {
  display: none !important;
}

.btn-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background: linear-gradient(135deg, #00ffaa, #00ddcb);
  color: #000 !important;
  padding: 10px 24px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  box-shadow: 0 6px 25px rgba(0, 218, 170, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
  white-space: nowrap;
  cursor: pointer;
}

.btn-play-overlay:hover {
  background: linear-gradient(135deg, #00ca8d, #00b8a8);
  color: #ffffff !important;
  transform: translate(-50%, -50%) scale(1.06);
  box-shadow: 0 10px 30px rgba(0, 218, 170, 0.35);
}

@media (min-width: 769px) {
  .game-card-wrapper:hover .btn-play-overlay {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translate(-50%, -50%) scale(1) !important;
  }
}

/* ============================================================
   TOMBOL PLAY BAWAH (MOBILE)
   ============================================================ */
.btn-play-bottom {
  display: none;
  background: linear-gradient(135deg, #00ffaa, #00ddcb);
  color: #000 !important;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  transition: background 0.25s ease;
  border-radius: 0 0 16px 16px;
  text-align: center;
  text-decoration: none;
}

.btn-play-bottom:hover {
  background: linear-gradient(135deg, #00ca8d, #00b8a8);
  color: #ffffff !important;
}

@media (max-width: 768px) {
  .btn-play-overlay {
    display: none !important;
  }
  .btn-play-bottom {
    display: block !important;
  }
}

/* ============================================================
   PERCENT BAR
   ============================================================ */
.card-body {
  padding: 8px 10px !important;
  flex: 0 0 auto;
}

.percent {
  position: relative;
  width: 100%;
  height: 18px;
  background: rgba(34, 34, 34, 0.6);
  border-radius: 12px;
  overflow: hidden;
  display: block !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.25);
}

.percent-txt {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 10px !important;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  margin: 0 !important;
  letter-spacing: 0.5px;
}

.percent-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  z-index: 10;
  transition: width 0.8s ease-in-out !important;
  border-radius: 12px;
}

.bg-merah {
  background: linear-gradient(135deg, #ff416c, #ff4b2b) !important;
}

.bg-kuning {
  background: linear-gradient(135deg, #f8ff00, #f8c210) !important;
}

.bg-hijau {
  background: linear-gradient(135deg, #11998e, #38ef7d) !important;
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
.backToTopBtn {
  display: none;
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 99;
  border-radius: 50%;
  border: none;
  outline: none;
  background: linear-gradient(135deg, #00daaa, #00b18a);
  color: #ffffff;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
  font-weight: bold;
  cursor: pointer;
  padding: 10px 20px;
  font-size: 18px;
  transition: all 0.25s ease;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.backToTopBtn:hover {
  background: linear-gradient(135deg, #00f0bb, #00ca8d);
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 10px 35px rgba(0, 218, 170, 0.2);
}

/* ============================================================
   JACKPOT SNACKBAR
   ============================================================ */
.popup {
  position: relative;
  cursor: pointer;
}

.popup .popuptext {
  visibility: hidden;
  width: 350px;
  background: linear-gradient(135deg, #018a6c, #01e4b3);
  color: #ffffff !important;
  text-align: center;
  border-radius: 20px;
  padding: 4px 0;
  position: fixed;
  z-index: 9999;
  bottom: 50px;
  left: 25px;
  font-size: 14px;
  overflow: hidden;
}

#imageid {
  margin-top: 5px;
}

.popuptext strong {
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.popuptext #winner-title {
  font-size: 14px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.35);
}

.popuptext #winner-info {
  font-size: 13px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.35);
}

#winner-info {
  margin-top: -15px;
}

.popuptext #winner-amount {
  font-size: 13px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.35);
}

.game-text {
  color: rgb(241, 32, 32);
  font-weight: bold;
}

.popup.show .popuptext:before {
  animation: shine 1s ease-in-out forwards;
}

@keyframes shine {
  0% { left: -150%; }
  50% { left: 50%; }
  100% { left: 150%; }
}

.popup .show {
  visibility: visible;
  -webkit-animation: fadeinout 12s cubic-bezier(0.18, 0.89, 0.32, 2.28) forwards;
  animation: fadeinout 12s cubic-bezier(0.18, 0.89, 0.32, 2.28) forwards;
}

#imageid {
  float: left;
  width: 15%;
  margin-left: 10px;
}

@-webkit-keyframes fadeinout {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

@keyframes fadeinout {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .text-provider {
    font-size: 1.4rem;
  }
  
  .card-privider {
    border-radius: 16px !important;
    padding: 15px !important;
  }
  
  .card-list {
    border-radius: 16px !important;
    padding: 15px !important;
  }
  
  .btn-outline-rtp {
    height: 40px;
    font-size: 12px;
    border-radius: 10px;
  }
  
  .popup .popuptext {
    width: 300px;
    left: 15px;
    bottom: 20px;
    padding: 4px 0;
    border-radius: 20px;
  }
  
  .backToTopBtn {
    bottom: 15px;
    right: 15px;
    padding: 8px 16px;
    font-size: 16px;
  }
  
  .card-img-top {
    max-height: 180px;
  }
}

@media (max-width: 480px) {
  .text-provider {
    font-size: 1.2rem;
  }
  
  .popup .popuptext {
    width: 260px;
    left: 10px;
    bottom: 15px;
    font-size: 12px;
  }
  
  #imageid {
    width: 12%;
  }
  
  .card-img-top {
    max-height: 150px;
  }
}



/* ============================================================
   POPUP POLA BERMAIN - ELEGANT
   ============================================================ */

/* Overlay - LEBIH TRANSPARAN */
.pola-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    animation: fadeInOverlay 0.25s ease;
}

.pola-modal-overlay.show {
    display: flex;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modal - RADIUS KECIL */
.pola-modal {
    background: linear-gradient(145deg, #0d1a0f, #1a2a1f);
    border-radius: 8px;
    max-width: 400px;
    width: 92%;
    padding: 0;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 218, 170, 0.08);
    animation: slideUpModal 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
}

@keyframes slideUpModal {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header - RADIUS KECIL */
.pola-modal-header {
    background: linear-gradient(135deg, #00daaa, #00b18a);
    padding: 18px 20px 14px;
    text-align: center;
    border-radius: 8px 8px 0 0;
    position: relative;
}

/* ============================================================
   TOMBOL CLOSE - HOVER MERAH (SEDERHANA)
   ============================================================ */
.pola-modal-close {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    font-weight: 300;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.pola-modal-close:hover {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.15);
    transform: translateY(-50%) scale(1.1);
}

.pola-modal-close:active {
    transform: translateY(-50%) scale(0.92);
}

.pola-modal-title-main {
    color: #000;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.3px;
    margin: 0;
}

.pola-modal-subtitle {
    color: rgba(0, 0, 0, 0.6);
    font-size: 12px;
    font-weight: 500;
    margin-top: 2px;
    letter-spacing: 0.5px;
}

/* Body */
.pola-modal-body {
    padding: 16px 18px 18px;
    background-color: #57ffdb56;
}

/* Game Info */
.pola-game-info {
    text-align: center;
    margin-bottom: 14px;
}

.pola-game-name {
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
}

.pola-game-name .highlight {
    color: #00daaa;
}

.pola-game-label {
    color: rgba(255, 255, 255, 0.35);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

/* RTP / Persentase */
.pola-rtp-box {
    background: rgba(255, 255, 255, 0.212);
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 14px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.pola-rtp-label {
    color: #ffd884;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.pola-rtp-value {
    font-size: 30px;
    font-weight: 800;
    margin-top: 2px;
}

.pola-rtp-value.high {
    color: #00daaa;
}

.pola-rtp-value.medium {
    color: #ffcc00;
}

.pola-rtp-value.low {
    color: #ff6b6b;
}

/* Pola List */
.pola-list {
    margin: 10px 0 14px;
}

.pola-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
    margin-bottom: 4px;
    border-left: 3px solid rgba(0, 218, 170, 0.15);
    transition: all 0.2s ease;
}

.pola-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: #00daaa;
}

.pola-item .label {
    color: rgba(255, 255, 255, 0.65);
    font-size: 12px;
}

.pola-item .status {
    font-size: 12px;
    font-weight: 600;
}

.pola-item .status.fail {
    color: #ff6b6b;
}

.pola-item .status.success {
    color: #00daaa;
}

.pola-item .status.pending {
    color: #ffcc00;
}

/* Taruhan */
.pola-bet {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.pola-bet .label {
    color: rgba(255, 255, 255, 0.35);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pola-bet .value {
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    margin-top: 2px;
}

/* Rekomendasi Game Lain */
.pola-modal-recommend {
    background: rgba(255, 107, 107, 0.06);
    border: 1px solid rgba(255, 107, 107, 0.12);
    border-radius: 6px;
    padding: 10px 14px;
    margin: 8px 0 14px;
}

.pola-modal-recommend .label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pola-modal-recommend .game-name {
    color: #ff6b6b;
    font-weight: 700;
    font-size: 14px;
}

.pola-modal-recommend .game-percent {
    color: #ffcc00;
    font-weight: 700;
    font-size: 15px;
}

.pola-modal-recommend .sub-text {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.2);
    margin-top: 2px;
}

/* Tombol */
.pola-modal-btn-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.pola-modal-btn {
    display: block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.pola-modal-btn.primary {
    background: linear-gradient(135deg, #00daaa, #00b18a);
    color: #000;
}

.pola-modal-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 218, 170, 0.25);
}

.pola-modal-btn.secondary {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.pola-modal-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.pola-modal-btn.danger {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: #fff;
}

.pola-modal-btn.danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.25);
}

/* Scrollbar - HALUS */
.pola-modal::-webkit-scrollbar {
    width: 3px;
}

.pola-modal::-webkit-scrollbar-track {
    background: transparent;
}

.pola-modal::-webkit-scrollbar-thumb {
    background: rgba(0, 218, 170, 0.25);
    border-radius: 10px;
}

.pola-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 218, 170, 0.4);
}

/* Responsive */
@media (max-width: 480px) {
    .pola-modal {
        border-radius: 6px;
        width: 95%;
    }
    .pola-modal-header {
        padding: 14px 14px 10px;
        border-radius: 6px 6px 0 0;
    }
    .pola-modal-title-main {
        font-size: 17px;
    }
    .pola-modal-body {
        padding: 12px 14px 14px;
    }
    .pola-rtp-value {
        font-size: 24px;
    }
    .pola-modal-btn {
        font-size: 12px;
        padding: 10px;
        border-radius: 4px;
    }
    .pola-item {
        padding: 5px 10px;
        font-size: 11px;
    }
    .pola-modal-close {
        top: 50%;
        right: 10px;
        width: 28px;
        height: 28px;
        font-size: 16px;
        transform: translateY(-50%);
    }
    .pola-modal-close:hover {
        transform: translateY(-50%) scale(1.1);
    }
}

@media (max-width: 380px) {
    .pola-modal {
        width: 98%;
        border-radius: 4px;
    }
    .pola-modal-header {
        padding: 12px 10px 8px;
    }
    .pola-modal-title-main {
        font-size: 15px;
    }
    .pola-modal-body {
        padding: 10px 10px 12px;
    }
    .pola-rtp-value {
        font-size: 20px;
    }
}