/* ===============================
   Global Base Styles
================================= */
body {
  font-family: Arial, sans-serif;
  font-size: 0.9em;
  margin: 0;
  padding: 0;
  padding-top: 130px;
  background: linear-gradient(to right, #000000, #181818f8, #000);
  background-size: 200% 200%;
  animation: gradientMove 5s ease infinite;
  color: #fff;
}

@keyframes gradientMove {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ===============================
   Scrollbar Customization
================================= */
::-webkit-scrollbar {
  width: 10px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background: rgba(255,208,0,0.5);
  border-radius: 10px;
  backdrop-filter: blur(5px);
}

/* ===============================
   Header
================================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #000000;
  padding: 15px 0;
  border-bottom: 1px solid #ffd000;
  z-index: 1000;
}
.header-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.logo {
  max-width: 250px;
  height: auto;
}
.jam-digital {
  margin-top: 5px;
  color: #ffd000;
  font-size: 16px;
}

/* ===============================
   Running Banner
================================= */
.running-banner {
  position: fixed;
  top: 145px;
  width: 100%;
  background: #66551f;
  padding: 12px 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  text-align: center;
  z-index: 100000;
}
.running-banner span {
  display: inline-block;
  padding-left: 100%;
  white-space: nowrap;
  animation: marquee 15s linear infinite;
  font-size: 14px;
}
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ===============================
   Banner Slider
================================= */
.banner-slider {
  width: 90%;
  max-width: 850px;
  margin: 90px auto 20px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 12px rgba(0,0,0,0.5);
}
.banner-slider img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===============================
   Provider Buttons
================================= */
.container-provider {
  display: flex;
  justify-content: center;
  gap: 10px;
  background: rgba(102, 91, 31, 0.75);
  padding: 15px;
  overflow-x: auto;
  margin-bottom: -30px;
  /* smooth scrolling on iOS */
  -webkit-overflow-scrolling: touch;
}

.provider-button {
  width: 70px;
  height: 70px;
  border: 2px outset #fac000;
  background: #d9e2e6;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.3s, box-shadow 0.3s;
}

.provider-button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.4);
}

.provider-button a {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.provider-button img {
  max-width: 60%;
  max-height: 60%;
  object-fit: contain;
  margin: auto;
}


/* ===============================
   Game Grid & Cards
================================= */
.container {
  padding: 20px;
  max-width: 1200px;
  margin: 20px auto;
}
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.game-card {
  background: #161b22;
  border: 2px outset #fac000;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  transition: transform 0.3s, box-shadow 0.3s;
}
.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 10px rgba(0,0,0,0.4);
}
.game-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
}
.game-info {
  padding: 15px;
  text-align: center;
}
.game-info h3 {
  margin: 10px 0;
  font-size: 0.9em;
}

/* ===============================
   RTP Bar & Effects
================================= */
.rtp-bar {
  display: flex;
  align-items: center;
  margin: 10px 0;
}
.rtp-bar span {
  margin-right: 10px;
}
.rtp-bar .bar {
  flex: 1;
  height: 20px;
  background: #21262d;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}
.rtp-bar .bar div {
  width: 0;
  height: 100%;
  transition: width 1.5s ease-in-out;
  position: relative;
  overflow: hidden;
}
.rtp-bar .bar div::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0.2), rgba(255,255,255,0.6), rgba(255,255,255,0.2));
  animation: shimmer 2s linear infinite;
}

/* ===============================
   Hot Icon Animation
================================= */
@keyframes neon-blink {
  0%, 100% { opacity: 1; text-shadow: 0 0 5px #ff0000, 0 0 10px #ff6600, 0 0 15px #ff9900, 0 0 20px #ff0000; }
  50%      { opacity: 0.8; text-shadow: 0 0 3px #ff0000, 0 0 5px #ff6600; }
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25%      { transform: rotate(1.5deg); }
  75%      { transform: rotate(-1.5deg); }
}
@keyframes glow-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.2); opacity: 0.85; }
}
.hot-icon-wrapper {
  position: absolute;
  top: -25px;
  left: -25px;
  z-index: 99;
  pointer-events: none;
}
.hot-icon-circle {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 8px;
  background: radial-gradient(circle, #ff5722, #bf360c);
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  border-radius: 999px;
  box-shadow: 0 0 6px #ff9800, 0 0 12px #ff6d00;
  animation: glow-pulse 1.2s infinite ease-in-out;
  pointer-events: none;
  line-height: 1;
  display: inline-block;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .hot-icon {
    font-size: 11px;
    padding: 3px 6px;
    top: 4px;
    left: 4px;
  }
}


/* ===============================
   Modal Styles
================================= */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.modal-overlay.show {
  display: flex;
}
.modal-content {
  background: #161b22;
  top: -5px;
  padding: 20px;
  border: 2px outset #ffc400;
  border-radius: 8px;
  width: 80%;
  max-width: 500px;
  max-height: 80%;
  overflow-y: auto;
  position: relative;
}
.modal-content h3 {
  margin: 0 0 10px;
  color: #ffd000;
}
.modal-content ul {
  list-style: disc inside;
  margin: 10px 0;
  padding-left: 20px;
}
.modal-content .play-now-btn {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background: linear-gradient(45deg, #ffd700, #ffc107);
  color: #161b22;
  font-size: 0.9em;
  font-weight: bold;
  text-align: center;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}
.modal-content .play-now-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 8px rgba(0,0,0,0.4);
}
#modalCloseBtn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: red;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
#modal-rating-input .star {
  font-size: 1.5rem;
  cursor: pointer;
  user-select: none;
  color: #ccc;
  transition: color .2s, opacity .2s;
}
#modal-rating-input .star.selected {
  color: #ffc107;
}
#modal-rating-input .star.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ===============================
   Footer
================================= */
footer {
  text-align: center;
  padding: 20px;
  background: #161b22;
  border-top: 2px solid #21262d;
}
footer p {
  margin: 0;
  color: gold;
}

/* ===============================
   Animation Keyframes
================================= */
@-webkit-keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ===============================
   Responsive Layout
================================= */
@media screen and (max-width: 768px) {
  .game-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media screen and (min-width: 1024px) {
  .game-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 375px) {
  .container-provider {
    gap: 8px;
    padding: 10px;
    margin-bottom: -20px;
  }
  .provider-button {
    width: 60px;
    height: 60px;
    border-width: 1px;
  }
  .provider-button img {
    max-width: 50%;
    max-height: 50%;
  }
}

@media (min-width: 376px) and (max-width: 390px) {
  .container-provider {
    gap: 9px;
    padding: 12px;
    margin-bottom: -25px;
  }
  .provider-button {
    width: 65px;
    height: 65px;
    border-width: 1.5px;
  }
  .provider-button img {
    max-width: 55%;
    max-height: 55%;
  }
}