html,
body {
  font-family: "Nunito", sans-serif;
  margin: 0;
  position: relative;
  z-index: 99;
  scroll-behavior: smooth;
  color: var(--text-primary);
}
body{
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

footer {
    margin-top: auto !important;
    position: static; 
}
.back-to-top {
  transition: all 0.3s ease;
}

.back-to-top:hover {
  transform: translateY(-5px);
}

body::-webkit-scrollbar {
  display: none;
}

#copy-message {
  position: fixed;
  z-index: 999;
  bottom: 30%;
  width: 60px;
  height: 28px;
  left: 50%;
  transform: translate(-50%, 0);
  background: var(--bg-white);
  border: 1px solid var(--bg-color-3);
  color: var(--text-primary);
  font-size: 12px;
  text-align: center;
  line-height: 28px;
  border-radius: 20px;
}


/* Custom scrollbar styling matches modern platforms */
::-webkit-scrollbar {
  background: var(--bg-scroll);
  border-radius: 9999px;
  height: 6px;
  width: 6px;
}

::-webkit-scrollbar-thumb {
  background: var(--color-tertiary);
  border-radius: 9999px;
}

header ::-webkit-scrollbar {
  height: 3px;
}

@media (max-width:768px) {}

.star i.full {
  color: var(--color-star);
}

.star i {
  color: var(--color-star-empty);
}

.star i.partial {
  background: linear-gradient(to right, var(--color-star) var(--percent, 0%), var(--color-star-empty) var(--percent, 0%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.num {
  counter-reset: mvp-trend;
}

.num a {
  counter-increment: mvp-trend;
}

.num a .number::after {
  content: counter(mvp-trend);
}

.topgame a:nth-child(2) .rank-1,
.topgame a:nth-child(3) .rank-1,
.topgame a:nth-child(5) .rank-1 {
  display: none;
}

/* Classic Games: HOT badge via nth-child */
.classic-games>a:is(:nth-child(2), :nth-child(5), :nth-child(13), :nth-child(15), :nth-child(18))>div::after {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  width: 48px;
  height: 48px;
  background: var(--img-hot) no-repeat 0 0 / contain;
  z-index: 2;
  pointer-events: none;
}

@media (min-width: 768px) {
  .classic-games>a:is(:nth-child(2), :nth-child(5), :nth-child(13), :nth-child(15), :nth-child(18))>div::after {
    width: 60px;
    height: 60px;
    top: -5px;
    left: -5px;
  }
}

@media (min-width: 1024px) {
  .classic-games>a:is(:nth-child(2), :nth-child(5), :nth-child(13), :nth-child(15), :nth-child(18))>div::after {
    width: 72px;
    height: 72px;
  }
}

/* Game carousel: mobile 3 / pad 5 / pc 4 */
.game-carousel-item {
  flex: 0 0 calc((100% - 24px) / 3);
}

@media (min-width: 768px) {
  .game-carousel-item {
    flex: 0 0 calc((100% - 48px) / 5);
  }
}

@media (min-width: 1024px) {
  .game-carousel-item {
    flex: 0 0 calc((100% - 36px) / 4);
  }
}

.game-carousel [data-carousel-dots] button {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: var(--color-dot);
  padding: 0;
  border: 0;
  cursor: pointer;
}

.game-carousel [data-carousel-dots] button.is-active {
  background: var(--color-primary);
}


.pt {
  max-width: 1200px
}

.pt h1 {
  font-weight: 800;
  font-size: 22px !important;  padding: 0 0 10px 0;

}

.pt h2 {
  position: relative;
  padding-left: 16px;
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 14px;
}

.pt h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 10px;
  width: 4px;
  background: var(--color-primary);
  border-radius: 2px;
}
.pt h3,
.pt h4,
.pt h3 {
  font-size: 16px;
  line-height: 22px;  padding: 0 0 10px 0;

}


.pt p,
.pt li {
  font-size: 14px;
  line-height: 22px;
  padding: 0 0 10px 0;
}

.pt img {
  width: 100%;
}

.pt a {
  word-break: break-all;
  color: #65a1ff;
}

/* Game player */
#play-game.is-playing .top__shading,
#play-game.is-playing .play-bg,
#play-game.is-playing .play-cover {
  display: none;
}

#play-game.is-playing #gameIframe {
  opacity: 1;
  pointer-events: auto;
}

#play-player:fullscreen,
#play-player:-webkit-full-screen {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-width: none;
  border-radius: 0;
  background: var(--bg-white);
}

#play-player:fullscreen #play-game,
#play-player:-webkit-full-screen #play-game {
  flex: 1 1 auto;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: auto;
}

#play-player:fullscreen .play-bar,
#play-player:-webkit-full-screen .play-bar {
  flex-shrink: 0;
  width: 100%;
}

.like-btn.liked {
  color: var(--color-primary);
}

.like-btn.liked .like-outline {
  display: none;
}

.like-btn.liked .like-fill {
  display: block;
}

.like-btn.is-pop .like-icon {
  animation: like-pop 0.4s ease;
}

@keyframes like-pop {
  0% {
    transform: scale(1);
  }

  35% {
    transform: scale(1.35);
  }

  65% {
    transform: scale(0.9);
  }

  100% {
    transform: scale(1);
  }
}

.pt ul {
  list-style: disc;
  margin: 0 0 0 30px;
  padding: 0;
}


.pt table {
  margin-bottom: 10px
}

.pt table,
.pt th,
.pt td {
  border: 1px solid !important;
  border-collapse: collapse !important;
  border-style: double !important;
}

.pt th,
.pt td {
  padding: 8px;
  text-align: center;
}

.topgame {
  counter-reset: topgame-counter;
}

.topgame>a {
  counter-increment: topgame-counter;
}

.topgame>a::before {
  content: counter(topgame-counter, decimal-leading-zero);
  flex-shrink: 0;
  width: 1.5rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-primary);
  line-height: 1.25rem;
  text-align: center;
}

@media (min-width: 768px) {
  .topgame>a::before {
    width: 2.5rem;
    font-size: 1.5rem;
    line-height: 2rem;
  }
}