/* Google Font: Prompt */
@import url('https://fonts.googleapis.com/css2?family=Prompt:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --primary-blue: #0284c7;
  --primary-light: #38bdf8;
  --primary-soft: #e0f2fe;
  --accent-cyan: #06b6d4;
  --accent-pink: #f43f5e;
  --dark-text: #1e293b;
  --muted-text: #64748b;
  --border-color: #e2e8f0;
  --card-bg: #ffffff;
}

* {
  font-family: 'Prompt', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #f0f9ff;
  color: var(--dark-text);
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #7dd3fc;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #0284c7;
}

/* Glassmorphism Navigation */
.glass-nav {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Keep every customer-facing page on the same desktop header geometry as home. */
@media (min-width: 768px) {
  body:not(.home-storefront-page):not(.admin-page) > header.sticky {
    width: 100%;
    border-bottom-color: #e0f2fe !important;
  }
  body:not(.home-storefront-page):not(.admin-page) > header.sticky > div.w-full {
    height: 58px !important;
    min-height: 58px !important;
    padding: 0 clamp(12px, 2.4vw, 34px) !important;
    gap: 12px !important;
  }
  body:not(.home-storefront-page):not(.admin-page) > header.sticky > div.w-full > a:first-child {
    gap: 12px !important;
    flex-shrink: 0;
  }
  body:not(.home-storefront-page):not(.admin-page) > header.sticky > div.w-full > a:first-child > div:first-child {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    padding: 0 !important;
    border-radius: 12px !important;
    overflow: hidden;
  }
  body:not(.home-storefront-page):not(.admin-page) > header.sticky > div.w-full > a:first-child > div:first-child img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
  body:not(.home-storefront-page):not(.admin-page) > header.sticky > div.w-full > a:first-child span.text-2xl {
    font-size: 20px !important;
    line-height: 1.2 !important;
  }
  body:not(.home-storefront-page):not(.admin-page) > header.sticky > div.w-full > a:first-child > div:last-child > div:first-child > span:first-child > span {
    color: #0ea5e9 !important;
  }

  body:not(.home-storefront-page):not(.admin-page) > header.sticky nav {
    gap: clamp(8px, 1.5vw, 22px) !important;
    font-size: 12px !important;
    white-space: nowrap;
  }
  body:not(.home-storefront-page):not(.admin-page) > header.sticky .storefront-search-wrap {
    width: clamp(220px, 20vw, 340px);
    flex: 0 1 clamp(220px, 20vw, 340px);
    min-width: 0;
  }
}

.storefront-search-wrap { position: relative; z-index: 60; min-width: 0; }
.storefront-search-wrap > .storefront-search { width: 100%; }
.storefront-search-panel { position: absolute; top: calc(100% + 9px); left: 0; z-index: 1000; width: min(410px, calc(100vw - 24px)); max-height: min(72vh, 510px); overflow: auto; padding: 10px; border: 1px solid #dce8f4; border-radius: 16px; background: #fff; color: #1e293b; box-shadow: 0 20px 50px rgba(15, 23, 42, .2); }
.storefront-search-panel[hidden] { display: none; }
.storefront-search-heading { display: flex; align-items: center; gap: 8px; padding: 7px 8px 9px; color: #334155; font-size: 12px; font-weight: 800; }
.storefront-search-heading i { color: #38bdf8; }
.storefront-search-result { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 58px; padding: 7px 8px; border: 0; border-radius: 11px; background: transparent; color: inherit; text-align: left; cursor: pointer; transition: background-color .16s ease, transform .16s ease; }
.storefront-search-result:hover, .storefront-search-result:focus-visible { background: rgba(56, 189, 248, .14); outline: none; }
.storefront-search-result:active { transform: scale(.99); }
.storefront-search-result img { flex: 0 0 42px; width: 42px; height: 42px; border: 1px solid #dbeafe; border-radius: 10px; background: #f1f5f9; object-fit: cover; }
.storefront-search-result-copy { display: grid; min-width: 0; flex: 1; gap: 2px; }
.storefront-search-result-name { overflow: hidden; color: #172b45; font-size: 12px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.storefront-search-result-subtitle { overflow: hidden; color: #71839b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.storefront-search-result-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; border: 1px solid #d5efff; border-radius: 999px; background: #eff9ff; color: #0284c7; font-size: 9px; font-weight: 750; white-space: nowrap; }
.storefront-search-empty { padding: 18px 9px; color: #71839b; font-size: 11px; text-align: center; }
.storefront-search-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; padding: 11px 9px 7px; border-top: 1px solid #e8eef5; color: #0284c7; font-size: 11px; font-weight: 800; text-decoration: none; }
.storefront-search-footer:hover { color: #0369a1; }

.sky-shadow {
  box-shadow: 0 10px 25px -5px rgba(56, 189, 248, 0.18), 0 8px 10px -6px rgba(56, 189, 248, 0.1);
}

.sky-shadow-lg {
  box-shadow: 0 20px 35px -10px rgba(14, 165, 233, 0.28);
}

/* Hero Background and Patterns */
.banner-bg {
  background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 50%, #bae6fd 100%);
  position: relative;
  overflow: hidden;
}

.banner-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 15% 30%, rgba(255, 255, 255, 0.4) 0%, transparent 25%),
    radial-gradient(circle at 85% 70%, rgba(255, 255, 255, 0.35) 0%, transparent 30%),
    radial-gradient(circle at 50% 90%, rgba(2, 132, 199, 0.25) 0%, transparent 45%);
  pointer-events: none;
}

/* Responsive game top-up hero: separate desktop/mobile artwork and overlaid search. */
.game-topup-hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: clamp(170px, 21vw, 390px);
  margin: 0 0 4rem;
  border-radius: 24px;
}

.game-topup-hero__art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  background: #e7f7ff;
  box-shadow: 0 12px 28px rgb(2 132 199 / 12%);
}

.game-topup-hero__art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 54%;
}

.game-topup-hero__copy {
  position: absolute;
  z-index: 1;
  top: 43%;
  left: 5.5%;
  width: 54%;
  transform: translateY(-50%);
  color: #102d59;
}

.game-topup-hero__copy h1 {
  margin: 0;
  font-size: clamp(30px, 3.3vw, 64px);
  font-weight: 900;
  line-height: .94;
  letter-spacing: -.045em;
}

.game-topup-hero__copy h1 span {
  display: block;
}

.game-topup-hero__copy h1 span:last-child {
  color: #078fdd;
}

.game-topup-hero__copy p {
  margin: 10px 0 0;
  color: #183b68;
  font-size: clamp(11px, 1vw, 16px);
  font-weight: 600;
  line-height: 1.4;
}

.game-topup-hero__search {
  position: absolute;
  z-index: 2;
  right: 3%;
  bottom: -22px;
  left: 3%;
}

.game-topup-hero__password-trap {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.game-topup-hero__search-icon {
  position: absolute;
  top: 50%;
  left: 20px;
  z-index: 1;
  color: #0ea5e9;
  font-size: 15px;
  transform: translateY(-50%);
  pointer-events: none;
}

.game-topup-hero__search #gameSearchInput {
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 22px 0 52px;
  border: 1px solid #d7edfa !important;
  border-radius: 999px;
  outline: none;
  background: #fff !important;
  box-shadow: 0 8px 22px rgb(14 116 190 / 12%);
  color: #263d5d !important;
  font-size: 13px;
  font-weight: 500;
}

.game-topup-hero__search #gameSearchInput::placeholder {
  color: #8ca2bd !important;
  opacity: 1;
}

.game-topup-hero__search #gameSearchInput:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgb(56 189 248 / 18%), 0 8px 22px rgb(14 116 190 / 12%);
}

@media (max-width: 767px) {
  .game-topup-hero {
    height: auto;
    aspect-ratio: 2.12 / 1;
    margin-bottom: 3.5rem;
    border-radius: 17px;
  }

  .game-topup-hero__art img {
    object-position: center;
  }

  .game-topup-hero__copy {
    top: 44%;
    left: 6%;
    width: 61%;
  }

  .game-topup-hero__copy h1 {
    font-size: clamp(18px, 6.1vw, 26px);
    line-height: .98;
    letter-spacing: -.04em;
  }

  .game-topup-hero__copy p {
    max-width: 90%;
    margin-top: 7px;
    font-size: clamp(9px, 3vw, 12px);
    line-height: 1.3;
  }

  .game-topup-hero__search {
    right: 5%;
    bottom: -19px;
    left: 5%;
  }

  .game-topup-hero__search-icon {
    left: 16px;
    font-size: 14px;
  }

  .game-topup-hero__search #gameSearchInput {
    height: 45px;
    padding-right: 16px;
    padding-left: 42px;
    font-size: 12px;
  }
}


/* Card Hover effect */
.game-card {
  position: relative;
  isolation: isolate;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.28s ease, border-color 0.28s ease;
}

.game-card::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: -6% auto -6% -80%;
  width: 62%;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(112deg,
    transparent 12%,
    rgba(255, 255, 255, 0.08) 34%,
    rgba(255, 255, 255, 0.62) 49%,
    rgba(125, 211, 252, 0.2) 56%,
    transparent 76%);
  filter: blur(1px);
  mix-blend-mode: screen;
}

@keyframes game-card-shine {
  from { opacity: 0; transform: translateX(-8%) skewX(-18deg); }
  18% { opacity: 1; }
  to { opacity: 0; transform: translateX(410%) skewX(-18deg); }
}

@media (hover: hover) and (pointer: fine) {
  .game-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 38px -12px rgba(14, 165, 233, 0.48),
                0 0 0 1px rgba(56, 189, 248, 0.45),
                0 0 22px rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
  }

  .game-card:hover::after,
  .game-card:focus-visible::after {
    animation: game-card-shine 0.9s ease-out both;
  }

  .game-card:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 3px;
  }
}

@media (hover: none) {
  .game-card::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .game-card,
  .game-card::after { transition: none !important; animation: none !important; }
}

/* Wave Footer & Decorative Waves */
.scallop-bottom {
  background-image: radial-gradient(circle at 16px 16px, #ffffff 16px, transparent 16px);
  background-size: 32px 32px;
  height: 16px;
}

/* Hide scrollbar for carousel but keep functionality */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Animations */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(1deg); }
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.5; }
}

.pulse-dot {
  animation: pulse-dot 1.8s infinite ease-in-out;
}

/* Infinite Marquee Ticker */
@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.animate-marquee {
  display: flex;
  width: max-content;
  animation: marquee-scroll 32s linear infinite;
}

.animate-marquee:hover {
  animation-play-state: paused;
}

/* Nav Dropdown Hover */
.nav-dropdown-wrapper {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 50;
}

.nav-dropdown-wrapper:hover .nav-dropdown-menu,
.nav-dropdown-wrapper:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
