/* =========================================================
   Reset & Base
   ========================================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  background: #f9f4ff;
  color: #1a1230;
  line-height: 1.5;
  max-width: 600px;
  margin: 0 auto;
}

/* =========================================================
   Layout
   ========================================================= */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 14px;
}

/* =========================================================
   Header / Footer
   ========================================================= */
.site-header {
  background: #1a1230;
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-footer {
  background: #1a1230;
  border-top: none;
  margin-top: 48px;
  padding: 28px 0;
  font-size: 13px;
  color: #7c6fa0;
  text-align: center;
}

/* =========================================================
   Logo
   ========================================================= */
.logo {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #ffffff;
  padding: 14px 0;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  line-height: 1;
  text-transform: uppercase;
}

/* =========================================================
   Typography
   ========================================================= */
h1, h2, h3, h4 {
  font-weight: 700;
  color: #1a1230;
}

h2 {
  font-size: 22px;
  margin: 28px 0 12px;
}

p {
  color: #4a4060;
}

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

a:active {
  opacity: 0.7;
}

/* =========================================================
   Images
   ========================================================= */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =========================================================
   Navigation
   ========================================================= */
.header-nav {
  background: #231840;
  border-top: 1px solid #2e2255;
}

.nav-scroll {
  display: flex;
  gap: 6px;
  padding: 10px 12px;

  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;

  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav-scroll::-webkit-scrollbar {
  display: none;
}

.nav-item {
  font-size: 13px;
  font-weight: 700;
  color: #a090c8;
  padding: 5px 14px;
  border-radius: 20px;
  flex-shrink: 0;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.nav-item.active {
  color: #1a1230;
  background: #d4b8ff;
}

/* =========================================================
   Utility
   ========================================================= */
.hidden {
  display: none !important;
}

.center {
  text-align: center;
}

/* =========================================================
   Ad Slot
   ========================================================= */
.ad-slot {
  margin: 20px 0;
  text-align: center;
}

/* =========================================================
   Category Title
   ========================================================= */
.category-title {
  font-size: 16px;
  font-weight: 800;
  color: #1a1230;
  margin: 28px 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-title::after {
  content: "";
  flex: 1;
  height: 1.5px;
  background: #e0d4f7;
  border-radius: 2px;
}

/* =========================================================
   Game Grid
   ========================================================= */
.game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.game-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  border: 1.5px solid #e8dff8;
  transition: transform 0.12s;
}

.game-card:active {
  transform: scale(0.96);
}

.game-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.game-card-info {
  padding: 8px 10px 10px;
}

.game-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #1a1230;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-card-meta {
  font-size: 11px;
  color: #9b8fba;
  margin-top: 2px;
}

/* =========================================================
   Static Pages
   ========================================================= */
.container-page {
  max-width: 720px;
  margin: 32px auto 56px;
  padding: 0 16px;
  min-height: 450px;
}

.container-page h1 {
  font-size: 34px;
  font-weight: 800;
  color: #1a1230;
  margin-bottom: 24px;
}

.container-page p {
  font-size: 16px;
  line-height: 1.75;
  color: #374151;
  margin-bottom: 18px;
}

.container-page a {
  color: #7c3aed;
  font-weight: 600;
  text-decoration: underline;
}

.container-page p:last-child {
  font-size: 14px;
  color: #9b8fba;
  margin-top: 32px;
}

/* =========================================================
   Game Detail Page
   ========================================================= */
.game-detail {
  text-align: center;
}

.game-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
}

.game-cover {
  width: 190px;
  height: 190px;
  object-fit: cover;
  border-radius: 28px;
  margin-bottom: 16px;
  border: 3px solid #e8dff8;
}

.game-title-main {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 10px;
  color: #1a1230;
}

.game-rating {
  color: #f0a030;
  font-size: 20px;
  margin-bottom: 18px;
  letter-spacing: 2px;
}

.btn-play {
  display: inline-block;
  background: #7c3aed;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  padding: 15px 52px;
  border-radius: 999px;
  margin-bottom: 36px;
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.btn-play:active {
  background: #6d28d9;
}

.game-description {
  text-align: left;
}

.game-description h2 {
  font-size: 18px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1a1230;
}

.game-description p {
  font-size: 15px;
  line-height: 1.75;
  color: #4a4060;
}

/* =========================================================
   Popular Section
   ========================================================= */
.popular-section {
  margin-top: 48px;
}

.popular-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 16px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.popular-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

/* =========================================================
   Mobile tweaks
   ========================================================= */
@media (max-width: 768px) {
  .container {
    padding: 0 10px;
  }

  .logo {
    font-size: 22px;
  }

  h2 {
    font-size: 18px;
  }

  .container-page {
    margin-top: 20px;
  }

  .container-page h1 {
    font-size: 26px;
  }

  .container-page p {
    font-size: 15px;
  }

  .game-cover {
    width: 150px;
    height: 150px;
  }
}