/* General */
body {
  font-family: Arial, sans-serif;
  background-color: #025551;
  color: #ffffff;
  margin: 0;
  padding: 0;
  text-align: center;
}

/* Header */
.site-header {
  padding: 15px;
}
.site-header .logo {
  max-width: 220px;
}

/* Banner */
.banner {
  position: relative;
  display: inline-block;
  width: 100%;
}
.banner img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.banner::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.6) 50%, transparent 100%);
  transform: skewX(-25deg);
  animation: shine 4s infinite;
}

/* Login & Daftar */
.auth-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 20px auto;
  max-width: 700px;
}

.btn-auth {
  flex: 1;
  text-align: center;
  padding: 18px 0;
  border-radius: 8px;
  font-weight: bold;
  font-size: 18px;
  text-decoration: none;
  color: #fff;
  transition: 0.3s;
  position: relative;
  overflow: hidden;
}
.btn-auth.login {
  background: red;
}
.btn-auth.daftar {
  background: #ffe100;
  color: #000;
}
.btn-auth:hover {
  opacity: 0.85;
}
.btn-auth::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.5) 50%, transparent 100%);
  transform: skewX(-25deg);
  animation: shine 6s infinite;
}

/* Provider Container */
.provider-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  padding: 15px;
  background: #ffd700;
  border-radius: 8px;
  margin: 20px auto;
  width: 100%;
  max-width: 1200px;
  box-sizing: border-box;
}
.provider-nav a {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 50px;
  background: #333;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  transition: 0.3s;
  position: relative;
  overflow: hidden;
}
.provider-nav a:hover {
  background: red;
}
.provider-nav a::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.5) 50%, transparent 100%);
  transform: skewX(-25deg);
  animation: shine 7s infinite;
}

.provider-nav a.active {
  background: red;
  color: #fff;
}

/* Game Cards */
.games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 25px;
  padding: 20px;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  justify-items: center;
}

.game-card .frame {
  position: relative;
  overflow: hidden;
}
.game-card img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  background: #025551;
  display: block;
}
.game-card .frame::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.5) 50%, transparent 100%);
  transform: skewX(-25deg);
  animation: shine 5s infinite;
}

/* Nama Game di Overlay */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.75);
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* 🔹 bagi rata: atas - tengah - bawah */
  align-items: center;
  padding: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
  box-sizing: border-box;
  text-align: center;
}

.overlay .game-title {
  font-size: 14px;
  font-weight: bold;
  color: #fff;
  word-wrap: break-word;
  max-width: 90%;
  line-height: 1.3em;
  margin-bottom: 8px;
}

.overlay .buttons {
  display: flex;
  gap: 10px;
  width: 100%;
  justify-content: center;
}

.overlay .btn {
  flex: 1;                 /* 🔹 biar sama lebar */
  max-width: 100px;        /* 🔹 batas biar gak kepanjangan */
  padding: 10px 0;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  text-align: center;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  position: relative;
  overflow: hidden;
  transition: 0.3s;
}
.btn-main { background: #ff4500; }
.btn-info { background: #0066ff; }

/* Container RTP */
.rtp-bar {
  width: 100%;
  margin: 8px auto 12px;
  height: 22px;
  background: #333;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.rtp-fill {
  height: 100%;
  line-height: 22px;
  color: #fff;
  font-weight: bold;
  font-size: 13px;
  text-align: center;
  transition: width 0.5s ease;
  position: relative;
  overflow: hidden;
}
.rtp-fill::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.25) 0px,
    rgba(255, 255, 255, 0.25) 10px,
    transparent 10px,
    transparent 20px
  );
  animation: waveMove 2s linear infinite;
}
@keyframes waveMove {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.rtp-fill.low { background-color: #ff3b3b; }
.rtp-fill.mid { background-color: #f1c40f; color:#000; }
.rtp-fill.high { background-color: #2ecc71; }

/* Overlay tombol */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.75);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.game-card:hover .overlay {
  opacity: 1;
}
.overlay .btn {
  padding: 10px 15px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  width: 70%;
  text-align: center;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}
.btn-main { background: #ff4500; }
.btn-info { background: #ffd900; }
.btn:hover { opacity: 0.9; }
.overlay .btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.5) 50%, transparent 100%);
  transform: skewX(-25deg);
  animation: shine 6s infinite;
}

/* Animasi shine */
@keyframes shine {
  100% { left: 125%; }
}

#rtpFrame {
  width: 100%;
  height: 1000px; /* atur tinggi sesuai kebutuhan */
  border: none;
  margin-top: 20px;
}

/* === Container Tengah === */
body {
  margin: 0;
  padding: 0;
  background: url('https://i.postimg.cc/YS4cQvDH/image.png') center center fixed; /* Ganti sesuai file lo */
  background-size: cover;
  background-color: #000000; /* fallback kalau gak ada gambar */
}

.main-container {
  width: 90%;
  max-width: 1200px;       /* lebar kontainer tengah */
  margin: 0 auto;          /* center di layar */
  background: linear-gradient(180deg, #1f1f1f, #027664);        /* warna isi tengah */
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  padding-bottom: 20px;
}

/* Supaya elemen di dalam ikut lebar kontainer */
.banner img,
.provider-nav,
.auth-buttons,
.running-text-container,
.games,
#rtpFrame {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  border-radius: 0 !important;
}

/* === Game Section Grid (3 per baris) === */
.game-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  justify-items: center;
  padding: 20px;
}

/* === Gambar Kiri === */
.game-image {
  position: relative;
  flex: 1;
  max-width: 45%;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000; /* biar efek glow gak ilang */
  overflow: hidden;
}

.game-image img {
  width: 100%;
  height: auto;
  object-fit: contain; /* Biar gambar gak kepotong */
  border-radius: 10px;
  image-rendering: auto; /* biar kualitas glow tetap halus */
}


.tag {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 6px;
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  border-radius: 4px;
}
.tag.hot { background: red; }
.tag.top { background: green; }

.pola-slot h4 {
  margin: 0;
  font-size: 15px;
  color: #ffcc00;
}

.pola-slot ul {
  list-style: none;
  margin: 5px 0;
  padding: 0;
  font-size: 14px;
}

.jam-gacor p, .persentase p {
  margin: 4px 0;
  font-size: 14px;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: #444;
  border-radius: 5px;
  overflow: hidden;
}

.progress {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #00ff99, #00cc66);
  transition: width 0.8s ease-in-out;
}

/* === Game Grid === */
.game-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
  padding: 20px;
  justify-items: center;
}

.tag {
  position: absolute;
  top: 5px;
  left: 5px;
  padding: 2px 6px;
  font-size: 12px;
  font-weight: bold;
  color: white;
  border-radius: 4px;
}
.tag.hot { background: red; }
.tag.top { background: green; }

/* === Container Kanan === */
.game-details {
  flex: 1;
  background: #111;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 2px solid #ffb400;
}

.pola-slot h4 {
  margin: 0;
  font-size: 15px;
  color: #ffcc00;
}

.pola-slot ul {
  list-style: none;
  padding: 0;
  margin: 5px 0 10px;
  font-size: 14px;
}

.jam-gacor p, .persentase p {
  margin: 5px 0;
  font-size: 14px;
  color: #fff;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: #444;
  border-radius: 5px;
  overflow: hidden;
}
.progress {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #00ff99, #00cc66);
  transition: width 0.8s ease-in-out;
}

/* === EFEK KILAU (TETAP DI GAMBAR SAJA) === */
@keyframes shine {
  0% { filter: brightness(1); }
  50% { filter: brightness(1.3); }
  100% { filter: brightness(1); }
}

/* === INFO POLA === */
.game-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: linear-gradient(180deg, #1f1f1f, #027664); 
  color: #fff;
  padding: 12px;
  font-size: 14px;
  box-sizing: border-box;
}

.game-info h4 {
  margin: 0 0 6px 0;
  font-size: 15px;
  color: #ffffff;
}

.game-info p {
  margin: 4px 0;
  font-size: 14px;
}

/* === PROGRESS BAR === */
.progress-bar {
  background: #222;
  height: 16px;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 8px;
  width: 100%;
}

.progress-fill {
  height: 100%;
  text-align: center;
  font-size: 12px;
  font-weight: bold;
  color: #000;
  border-radius: 10px;
  background: linear-gradient(90deg, #ffcc00, #ffee88);
}

/* === GRID BIAR RAPIH === */
.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(370px, 1fr));
  gap: 25px;
  justify-items: center;
}

.game-card {
  display: flex;
  align-items: center; /* ⬅️ dari flex-start jadi center */
  justify-content: flex-start;
  background: linear-gradient(180deg, #1f1f1f, #027664);
  border-radius: 12px;
  border: 2px solid #ffcc00;
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.4);
  overflow: hidden;
  width: 100%;
  max-width: 370px;
  margin: 10px auto;
  transition: transform 0.2s ease;
}

.game-card:hover {
  transform: translateY(-5px);
}

/* === GAMBAR === */
.game-img {
  flex: 0 0 40%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  /* background: #000; */ /* ⬅️ HAPUS BARIS INI */
  border-right: none; /* ⬅️ Biar gak ada garis pemisah */
}

.game-img img {
  width: 90%;
  height: auto;
  object-fit: cover;
  animation: shine 3s infinite linear;
  border-radius: 8px; /* opsional, biar pinggirannya halus */
}

.btn-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0;
}

.btn-main, .btn-info {
  display: block;
  text-align: center;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Tombol Mainkan */
.btn-main {
  background: linear-gradient(90deg, #ff2d2d, #ff5c5c);
  color: #fff;
}
.btn-main:hover {
  background: linear-gradient(90deg, #ff4d4d, #ff8080);
  transform: translateY(-2px);
}

/* Tombol Info Pola */
.btn-info {
  background: linear-gradient(90deg, #0099ff, #0066ff);
  color: #fff;
}
.btn-info:hover {
  background: linear-gradient(90deg, #00b3ff, #0077ff);
  transform: translateY(-2px);
}

/* === FIX POSISI SETELAH HAPUS TOMBOL === */
.game-info {
  display: flex;
  flex-direction: column;
  justify-content: center; /* biar isi ke tengah vertikal */
  align-items: center;
  padding: 15px;
  gap: 10px; /* jarak antar elemen */
}

.game-info h4 {
  margin-bottom: 8px;
  font-size: 16px;
  text-align: center;
}

.rtp-bar {
  width: 100%;
  max-width: 200px;
  height: 25px;
  border-radius: 5px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.rtp-fill {
  height: 100%;
  line-height: 25px;
  text-align: center;
  font-weight: bold;
  color: #fff;
}

/* === Tombol Login, Info Pola, Daftar === */
.button-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 15px 0;
  flex-wrap: wrap;
}

.button-container a {
  flex: 1;
  max-width: 200px;
  text-align: center;
  padding: 12px 0;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  transition: 0.2s ease-in-out;
}

/* Warna tombol */
.btn-login {
  background-color: #007bff;
}

.btn-info-pola {
  background-color: #ff9800;
}

.btn-register {
  background-color: #4caf50;
}

/* Hover efek */
.button-container a:hover {
  opacity: 0.85;
  transform: scale(1.03);
}

/* === Responsive Mobile === */
@media (max-width: 768px) {
  .button-container {
    flex-direction: column;
    width: 90%;
    margin: 10px auto;
  }

  .button-container a {
    width: 100%;
    max-width: none;
  }
}

/* === RESPONSIVE FIX: GAME CARD VERTIKAL, 2 KOLOM, RAPI === */
@media (max-width: 768px) {
  .game-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding: 12px;
    box-sizing: border-box;
  }

.game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: #0e1a1f;
  border: 2px solid #ffcc00;
  border-radius: 12px;
  padding: 12px 8px 14px 8px; /* tambahin padding atas & bawah biar gambar gak kepotong */
  box-sizing: border-box;
  text-align: center;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.game-img img {
  width: 100px; /* sedikit lebih kecil biar aman */
  height: 100px;
  border-radius: 10px;
  margin-top: 4px; /* tambahin sedikit jarak dari atas */
  margin-bottom: 10px;
  object-fit: contain; /* penting: biar gambar gak kepotong */
}

  .game-info {
    width: 100%;
  }

  .game-info h4 {
    font-size: 13px;
    color: #fff;
    margin-bottom: 6px;
    text-align: center;
  }

  .rtp-bar {
    width: 100%;
    height: 14px;
    border-radius: 6px;
    background: #222;
    overflow: hidden;
  }

  .rtp-fill {
    font-size: 11px;
    line-height: 14px;
    text-align: center;
  }
}

/* === Untuk layar kecil banget (≤480px) === */
@media (max-width: 480px) {
  .game-section {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .game-card {
    padding: 6px;
  }

  .game-img img {
    width: 80px;
    height: 80px;
  }

  .game-info h4 {
    font-size: 12px;
  }
}

/* === Responsive Mobile Fix (2 kolom, gambar tidak kepotong) === */
@media (max-width: 768px) {
  .game-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding: 12px;
    box-sizing: border-box;
  }

  .game-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: #0e1a1f;
    border: 2px solid #ffcc00;
    border-radius: 12px;
    padding: 14px 8px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  }

  .game-img {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }

.game-img img {
  width: 100%;
  max-width: 150px;
  height: 100px;
  border-radius: 10px;
  margin: 8px 0 12px 0;
  object-fit: scale-down; /* biar full tapi gak kepotong */
  object-position: center; /* posisi di tengah */
}

  .game-info {
    width: 100%;
    text-align: center;
  }

  .game-info h4 {
    font-size: 13px;
    color: #fff;
    margin-bottom: 6px;
  }

  .rtp-bar {
    width: 100%;
    height: 14px;
    border-radius: 6px;
    background: #222;
    overflow: hidden;
  }

  .rtp-fill {
    font-size: 11px;
    line-height: 14px;
    text-align: center;
  }
}

/* === FIX TERAKHIR: gambar tidak kepotong di HP dan tetap rapi === */
@media (max-width: 768px) {
  .game-img {
    width: 100%;
    height: auto;
    min-height: 120px;        /* tinggi area gambar */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;          /* mastiin gak keluar dari kotak */
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .game-img img {
    width: auto;
    height: 100%;
    max-height: 110px;         /* biar pas tinggi card */
    object-fit: contain;       /* biar gak kepotong */
    object-position: center;
    border-radius: 10px;
    display: block;
  }
}
