@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --similar-height: 10vh;
  --similar-height-dvh: 10dvh;
  --game-area-height: 90vh;
  --game-area-height-dvh: 90dvh;
}

body,
html {
  padding: 0;
  margin: 0;
  height: 100%;
  width: 100%;
  background: #01A8F0;
  font-family: 'Poppins', sans-serif;
}

.play-page {
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding-bottom: var(--similar-height);
  padding-bottom: var(--similar-height-dvh);
}

a {
  text-decoration: none;
  color: white;
}

#gameplay {
  max-width: 100%;
  height: var(--game-area-height);
  height: var(--game-area-height-dvh);
  position: relative;
  z-index: 1;
}

#similar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--similar-height);
  height: var(--similar-height-dvh);
  display: flex;
  align-items: center;
  z-index: 40;
}

.bottom-games-container {
  flex: 1;
  overflow-x: auto;
  white-space: nowrap;
}

.bottom-games-container::-webkit-scrollbar {
  display: none;
}

.bottom-games {
  display: inline-flex;
  margin-left: 5px;
}

.bottom-games .bottom-game {
  border: 2px solid white;
  border-radius: 10px;
  overflow: hidden;
  margin-right: 5px;
  width: calc(var(--similar-height) - 20px);
  width: calc(var(--similar-height-dvh) - 20px);
  height: calc(var(--similar-height) - 20px);
  height: calc(var(--similar-height-dvh) - 20px);
}

.bottom-games img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media screen and (orientation: landscape) {


  #gameplay {
    width: calc(100% - 10vw);
    width: calc(100% - 10dvw);
    height: 100vh;
    height: 100dvh;
  }

  #similar {
    position: fixed;
    right: 0;
    bottom: 0;
    top: 0;
    left: auto;
    height: 100%;
    width: 10vw;
    width: 10dvw;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .bottom-games-container {
    width: 100%;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    white-space: normal;
  }

  .bottom-games {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 5px;
  }

  .bottom-games .bottom-game {
    margin-bottom: 5px;
    width: calc(10vw - 20px);
    width: calc(10dvw - 20px);
    height: calc(10vw - 20px);
    height: calc(10dvw - 20px);
  }

  #top-bar {
    width: calc(100% - 10vw);
    width: calc(100% - 10dvw);
  }
}


#inter-ad-container {
  display: none;
  position: fixed;
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
  z-index: 1000;
  /* display: flex;
  flex-flow: row wrap;
  justify-content: center; */
  /* align-items: center; */
  background: #000000;
  color: #fff;
}

#inter-ad-content {
  width: 100%;
  height: 90%;
  position: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  top: 0;
}

.skip {
  position: fixed;
  bottom: 10%;
  right: 0;
}

#skip-btn {
  height: 40px;
  min-width: 100px;
  background-color: black;
  color: white;
  border-color: rgb(184, 184, 184);
  border-width: 1px 0 1px 1px;
  border-style: solid;
  font-size: 16px;
  border-radius: 5px 0 0 5px;
}

.close-ad-button {
  position: absolute;
  top: 0;
  left: 0;
}

#rewardModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 25;
}

#rewardModal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(1, 168, 240, 0.9);
  z-index: 1;
}

#rewardModal #blurred-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(20px);
  opacity: 1;
  z-index: 2;
  pointer-events: none;
}

#rewardModal .modal-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.modal-content .game-icon {
  width: clamp(100px, 20vw, 150px);
  height: clamp(100px, 20vw, 150px);
  border-radius: 16px;
  object-fit: cover;
  margin-bottom: 30px;
}

.modal-content .play-button {
  background-color: #01A8F0;
  color: white;
  font-weight: bold;
  font-size: clamp(15px, 4.5vw, 20px);
  padding: 14px 36px;
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 0 #0184c2;
  cursor: pointer;
  position: relative;
}

.play-button.loading span {
  visibility: hidden;
}

.play-button.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 3px solid white;
  border-top: 3px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

#top-bar {
  position: fixed;
  top: 12px;
  left: 0;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 50;
  pointer-events: none;
}

.nav-pill-single {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px 0 5px;
  height: 45px;
  border: none;
  background: #ffffff;
  border-radius: 0 15px 15px 0;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

.pill-icon {
  display: inline-block;
  width: 25px;
  height: 25px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.pill-back {
  background-image: var(--icon-back);
  width: 15px;
  height: 15px;
  background-size: 20px 20px;
}

.pill-home {
  background-image: var(--icon-home);
  width: 35px;
  height: 35px;
  background-size: 35px 35px;
}

#btn-no-ads {
  pointer-events: auto;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background-color: transparent;
  background-image: var(--icon-noads);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 38px 38px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

/* ---------- Home Page ---------- */
.home-page {
  background: #01A8F0;
  color: #ffffff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.home-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 12px 0;
}

.site-footer {
  margin-top: auto;
  padding: 18px 0 26px;
  background: rgba(220, 240, 255, 0.75);
  color: #0d2b45;
  text-align: center;
  font-size: 16px;
  line-height: 1.6;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.08);
}

.home-wrapper > .site-footer {
  width: calc(100% + 24px);
  margin-left: -12px;
  margin-right: -12px;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.footer-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0c2a44;
}

.footer-links {
  width: 100%;
  max-width: 520px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
}

.footer-links a {
  color: #0d2b45;
  font-weight: 600;
  text-decoration: none;
  padding: 3px 7px;
  font-size: 13px;
  border-radius: 999px;
  background: transparent;
  border: none;
  transition: color 0.15s ease, transform 0.15s ease;
}

.footer-links a:hover {
  color: #0a2035;
  transform: translateY(-1px);
}

.footer-copy {
  margin: 0;
  padding: 0 8px 4px;
  max-width: 820px;
  color: #0c2a44;
}

.footer-separator {
  width: 100%;
  max-width: 520px;
  height: 1px;
  background: rgba(12, 42, 68, 0.2);
  margin: 6px 0 10px;
}

.legal-page {
  max-width: 900px;
  margin: 45px auto 0;
  padding: 24px 16px 48px;
  color: #ffffff;
}

.loading-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #01A8F0;
  color: #ffffff;
  padding: 0;
}

.loading-wrapper {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 0;
}

.loading-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  padding: 22px 18px;
  text-align: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

.loading-icon-wrap {
  width: 108px;
  height: 108px;
  border-radius: 20px;
  margin: 0 auto 12px;
  overflow: hidden;
  border: 2.5px solid #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.loading-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.loading-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
}

.loading-subtitle {
  margin: 0 0 16px;
  font-size: 14px;
  color: #e8f5ff;
}

.loading-bar {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}

.loading-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #ffb703, #ff8f59);
  border-radius: 999px;
  transition: width 0.08s linear;
}

.loading-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
}

.loading-skip {
  background: #ffffff;
  color: #0d2b45;
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.loading-skip:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18);
}

.legal-page h1 {
  margin-top: 0;
  margin-bottom: 12px;
  text-align: center;
}

.legal-page p {
  margin: 0 0 16px;
  line-height: 1.6;
}

.legal-link {
  display: inline-block;
  margin-top: 8px;
  color: #ffffff;
  text-decoration: underline;
}

.home-hero {
  text-align: center;
  margin-bottom: 18px;
}

.home-hero h1 {
  margin: 0 0 6px;
  font-size: 24px;
}

.home-hero p {
  margin: 0;
  color: #e8f5ff;
  font-size: 14px;
}

.games-section {
  margin-bottom: 24px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.section-heading h2 {
  margin: 0;
  font-size: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge-premium {
  background: #ffb703;
  color: #0a3d62;
}

.badge-free {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 767px) and (orientation: landscape) {
  .game-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 768px) {
  .game-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

.game-card {
  display: block;
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

.game-grid .ad-card {
  grid-column: 1 / -1;
}

.game-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.08);
  border: 2.5px solid #ffffff;
}

.game-card.icon-only:hover img {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.empty-state {
  margin: 0;
  color: #e8f5ff;
  font-size: 14px;
}
