:root {
  --bg-cream: #FFFEF7;
  --pink: #FFB7C5;
  --mint: #B5EAD7;
  --lavender: #C7CEEA;
  --yellow: #FFDAC1;
  --text: #4A4A4A;
  --radius-organic: 255px 15px 225px 15px / 15px 225px 15px 255px;
  --radius-organic-alt: 15px 225px 15px 255px / 255px 15px 225px 15px;
  --shadow-soft: 0 4px 15px rgba(0,0,0,0.08);
  --font-main: 'Quicksand', sans-serif;
  --font-alt: 'Comic Neue', cursive;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-cream);
  color: var(--text);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

/* Rich-text list marker alignment (fix bullet indentation/marker protrusion) */
.container-game-description-text ul,
.container-game-description-text ol,
.description-box ul,
.description-box ol,
.game-description ul,
.game-description ol,
.game-desc ul,
.game-desc ol,
#game-description ul,
#game-description ol,
#overview ul,
#overview ol {
  padding-left: 0 !important;
  margin-left: 0 !important;
}

.container-game-description-text ul li,
.description-box ul li,
.game-description ul li,
.game-desc ul li,
#game-description ul li,
#overview ul li {
  list-style-type: disc !important;
  list-style-position: inside !important;
  padding-left: 0 !important;
}

.container-game-description-text ol li,
.description-box ol li,
.game-description ol li,
.game-desc ol li,
#game-description ol li,
#overview ol li {
  list-style-type: decimal !important;
  list-style-position: inside !important;
  padding-left: 0 !important;
}
.brief-comment-game{
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.85rem;
  color: rgba(51, 51, 51, 0.75);
}

img {
  max-width: 100%;
  display: block;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-alt);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

@keyframes float-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

@keyframes bounce-up {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.float-anim {
  animation: float 3s infinite ease-in-out;
}

.wiggle-hover:hover {
  animation: wiggle 0.5s ease-in-out;
}

/* Layout Helpers */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.kawaii-box {
  background: white;
  border-radius: var(--radius-organic);
  box-shadow: var(--shadow-soft);
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pill-btn {
  display: inline-block;
  padding: 10px 25px;
  border-radius: 50px;
  background: var(--pink);
  color: white;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(255, 183, 197, 0.4);
}

.pill-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 15px rgba(255, 183, 197, 0.6);
}

.pill-btn.mint { background: var(--mint); box-shadow: 0 4px 10px rgba(181, 234, 215, 0.4); }
.pill-btn.yellow { background: var(--yellow); box-shadow: 0 4px 10px rgba(255, 218, 193, 0.4); }
.pill-btn.lavender { background: var(--lavender); box-shadow: 0 4px 10px rgba(199, 206, 234, 0.4); }

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--bg-cream);
  z-index: 1000;
  box-shadow: var(--shadow-soft);
  padding: 15px 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo:has(.logo-img):not(:has(span)) {
  line-height: 0;
}

.logo:not(:has(.logo-img)) {
  font-family: var(--font-alt);
  font-size: 1.8rem;
  font-weight: 800;
}

.logo:has(.logo-img) span {
  font-family: var(--font-alt);
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.2;
}

.logo-img {
  height: 40px;
  width: auto;
  max-width: min(200px, 50vw);
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  align-self: center;
}

.cloud-icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-desktop {
  display: none;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
    gap: 15px;
  }
}

.nav-link {
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 600;
  background: rgba(255,255,255,0.5);
}

.nav-link:hover {
  background: var(--pink);
  color: white;
  animation: bounce-up 0.4s ease;
}
.nav-link.active {
  background: var(--pink);
  color: white;
  animation: bounce-up 0.4s ease;
}

.nav-mobile {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: white;
  box-shadow: 0 -4px 15px rgba(0,0,0,0.05);
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  z-index: 999;
}

@media (min-width: 768px) {
  .nav-mobile {
    display: none;
  }
}

.mobile-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text);
}

.mobile-icon {
  font-size: 1.5rem;
  margin-bottom: 2px;
  background: var(--bg-cream);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.mobile-link.active .mobile-icon {
  background: var(--pink);
  color: white;
  transform: translateY(-5px);
}

/* Footer */
footer {
  background: var(--lavender);
  margin-top: 50px;
  position: relative;
  padding-top: 60px;
  padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
  footer {
    padding-bottom: 30px;
  }
}

.footer-wave {
  position: absolute;
  top: -40px;
  left: 0;
  width: 100%;
  height: 41px;
  background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1440 320" xmlns="http://www.w3.org/2000/svg"><path fill="%23C7CEEA" fill-opacity="1" d="M0,224L48,213.3C96,203,192,181,288,181.3C384,181,480,203,576,224C672,245,768,267,864,261.3C960,256,1056,224,1152,197.3C1248,171,1344,149,1392,138.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
  background-size: cover;
  background-repeat: no-repeat;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-col h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-icon {
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: transform 0.3s;
}

.social-icon:hover {
  transform: rotate(15deg) scale(1.1);
}

.copyright {
  text-align: center;
  margin-top: 40px;
  font-size: 0.9rem;
  opacity: 0.8;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 96px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid #fff;
  outline: none;
  background: radial-gradient(circle at 30% 20%, #ffffff 0, #ffffff 25%, var(--mint) 26%, #53d1b3 100%);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px) scale(0.85);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  z-index: 900;
}

.back-to-top svg {
  pointer-events: none;
}

.back-to-top.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.back-to-top:hover {
  background: radial-gradient(circle at 30% 20%, #ffffff 0, #ffffff 25%, var(--pink) 26%, #ff8fb3 100%);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

@media (max-width: 768px) {
  .back-to-top {
    right: 18px;
    bottom: calc(100px + env(safe-area-inset-bottom, 0px));
    width: 50px;
    height: 50px;
  }
}

/* Pages - Index */
.hero {
  padding: 100px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-cream) 0%, #fff0f5 100%);
  position: relative;
  overflow: hidden;
}

.hero-clouds {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.cloud-deco {
  position: absolute;
  font-size: 3rem;
  opacity: 0.8;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 3rem;
  color: var(--pink);
  margin-bottom: 10px;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: #888;
  margin-bottom: 30px;
}

.hero-search {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}

.hero-search-input {
  border: none;
  outline: none;
  padding: 8px 14px;
  border-radius: 999px;
  min-width: 220px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  background: transparent;
}

@media (max-width: 600px) {
  .hero-search {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero-search-input {
    width: 100%;
    min-width: 0;
    text-align: center;
  }
}

.featured-section {
  padding: 40px 0;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 0;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.section-title::after {
  content: '';
  position: absolute;
  right: -30px;
  top: 0;
  width: 24px;
  height: 24px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23FFD700"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  animation: wiggle 2s infinite;
}

.scroll-container {
  display: flex;
  overflow-x: auto;
  gap: 20px;
  padding: 20px 5px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

.games-grid-5 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  padding: 20px 5px;
}

.games-grid-5 .game-card {
  min-width: 0;
  width: 100%;
}

@media (max-width: 1200px) {
  .games-grid-5 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .games-grid-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .games-grid-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

.game-card {
  min-width: 260px;
  background: white;
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.game-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #eee;
}

.card-info {
  padding: 15px;
}

.card-title {
  font-size: 1.1rem;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.tag-pill {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--lavender);
  color: #555;
}

.card-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #FFD700;
}

/* Alternate module layouts */
.games-grid-featured {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
}

.games-grid-featured .game-card {
  grid-column: span 3;
  min-width: 0;
}

.games-grid-featured .game-card:nth-child(1) {
  grid-column: span 6;
}

.games-grid-featured .game-card:nth-child(2) {
  grid-column: span 6;
}

.games-grid-featured .game-card:nth-child(1) .card-img {
  height: 220px;
}

.games-grid-featured .game-card:nth-child(2) .card-img {
  height: 220px;
}

.games-grid-featured .brief-comment-game {
  -webkit-line-clamp: 2;
}

@media (min-width: 769px) {
  .games-grid-featured .game-card:nth-child(n+3) .card-img {
    height: 150px;
  }

  .games-grid-featured .game-card:nth-child(n+3) .card-info {
    padding: 12px;
  }

  .games-grid-featured .game-card:nth-child(n+3) .card-title {
    font-size: 0.95rem;
  }

  .games-grid-featured .game-card:nth-child(n+3) .brief-comment-game {
    -webkit-line-clamp: 1;
  }
}

.games-grid-horizontal {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  grid-auto-flow: dense;
}

.games-grid-horizontal .game-card {
  min-width: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}

.games-grid-horizontal .card-img {
  width: 100%;
  height: 170px;
  min-height: 0;
}

.games-grid-horizontal .card-info {
  padding: 12px 12px 10px;
}

.games-grid-horizontal .brief-comment-game {
  -webkit-line-clamp: 2;
}

.games-grid-horizontal .game-card:nth-child(5n + 1) {
  grid-column: span 2;
}

.games-grid-horizontal .game-card:nth-child(5n + 1) .card-img {
  height: 210px;
}

.games-grid-horizontal .game-card:nth-child(3n) {
  transform: translateY(8px);
}

.games-grid-horizontal .game-card:nth-child(2n) .tag-pill {
  background: #ffe8ef;
}

.games-grid-horizontal .game-card:nth-child(2n+1) .tag-pill {
  background: #e9f7f2;
}

.games-grid-compact {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 14px;
  padding: 12px 4px 6px;
}

.games-grid-compact .game-card {
  grid-column: span 3;
  min-width: 0;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  background: #111;
}

.games-grid-compact .card-img {
  height: 180px;
}

.games-grid-compact .card-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 12px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
}

.games-grid-compact .game-card:nth-child(1) {
  grid-column: span 6;
  grid-row: span 2;
}

.games-grid-compact .game-card:nth-child(2),
.games-grid-compact .game-card:nth-child(3) {
  grid-column: span 3;
}

.games-grid-compact .game-card:nth-child(1) .card-img {
  height: 100%;
  min-height: 260px;
}

.games-grid-compact .card-title {
  font-size: 0.95rem;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.games-grid-compact .card-tags {
  margin-bottom: 6px;
}

.games-grid-compact .tag-pill {
  font-size: 0.65rem;
  padding: 1px 6px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.games-grid-compact .brief-comment-game {
  display: none;
}

.games-grid-compact .card-rating {
  display: flex;
  font-size: 0.82rem;
  color: #ffd66e;
}

.categories-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  padding: 40px 0;
}

.cat-cloud {
  background: white;
  padding: 15px 30px;
  border-radius: 50%;
  box-shadow: var(--shadow-soft);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-cloud:nth-child(odd) { background: var(--pink); color: white; border-radius: 60% 40% 70% 30% / 50% 60% 30% 70%; }
.cat-cloud:nth-child(even) { background: var(--mint); color: #444; border-radius: 40% 60% 30% 70% / 60% 30% 70% 40%; }
.cat-cloud:nth-child(3n) { background: var(--yellow); color: #444; }

.cat-cloud:hover {
  transform: scale(1.1) rotate(3deg);
}

/* Detail Page */
.detail-container {
  padding-top: 100px;
  padding-bottom: 60px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 20px;
}

.game-header {
  display: grid;
  gap: 30px;
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .game-header {
    grid-template-columns: 300px 1fr;
  }
}

.game-cover-wrap {
  position: relative;
}

.game-cover-lg {
  width: 100%;
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

.fav-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.fav-btn:active {
  transform: scale(0.9);
}

.fav-btn.active {
  color: red;
}

.game-meta h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: var(--text);
}

.dev-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #777;
  margin-bottom: 15px;
}

.game-actions {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.game-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
}

.tab-btn {
  padding: 8px 20px;
  background: none;
  border: none;
  font-family: var(--font-main);
  font-weight: 700;
  color: #888;
  cursor: pointer;
  position: relative;
}

.tab-btn.active {
  color: var(--pink);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--pink);
  border-radius: 3px;
}

.tab-content {
  display: none;
  animation: float-in 0.4s ease;
}

.tab-content.active {
  display: block;
}

.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
}

.screenshot-thumb {
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s;
}

.screenshot-thumb:hover {
  transform: scale(1.05);
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.review-item {
  display: flex;
  gap: 15px;
}

.review-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #eee;
}

.review-bubble {
  background: white;
  padding: 15px;
  border-radius: 0 20px 20px 20px;
  box-shadow: var(--shadow-soft);
  flex: 1;
  position: relative;
}

.review-bubble::before {
  content: '';
  position: absolute;
  top: 0;
  left: -10px;
  width: 0;
  height: 0;
  border-top: 15px solid white;
  border-left: 15px solid transparent;
}

/* Tags/Category Page */
.tags-box{
  padding-top: 100px;
}
.tags-layout {
  display: grid;
  gap: 30px;
  padding-top: 20px;
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .tags-layout {
    grid-template-columns: 250px 1fr;
  }
}

.sidebar {
  background: var(--yellow);
  padding: 20px;
  border-radius: var(--radius-organic-alt);
  position: sticky;
  top: 100px;
  height: fit-content;
}

.cat-list li {
  margin-bottom: 10px;
}

.cat-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(255,255,255,0.6);
  border-radius: 15px;
  font-weight: 600;
  transition: all 0.3s;
}

.cat-link:hover {
  transform: rotate(2deg) scale(1.02);
  background: white;
}

.cat-link.active {
  background: white;
  color: var(--pink);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.page-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  opacity: 0.9;
}

.breadcrumb-sep {
  opacity: 0.6;
}

.breadcrumb-current {
  font-weight: 700;
  color: var(--pink);
}

.mobile-cats {
  display: none;
  position: relative;
  margin-bottom: 16px;
}

.mobile-cats-toggle {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 2px solid rgba(0, 0, 0, 0.06);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  font-family: var(--font-alt);
  font-weight: 800;
  color: var(--text);
}

.mobile-cats-panel {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 54px;
  max-height: 60vh;
  overflow: auto;
  background: #ffffff;
  border: 2px solid rgba(0, 0, 0, 0.06);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  padding: 10px;
  z-index: 2001;
}

.mobile-cats-panel.active {
  display: block;
}

.mobile-cats-panel .cat-link {
  border-radius: 14px;
}

.mobile-cats-overlay {
  display: none;
}

.mobile-cats-overlay.active {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 2000;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 30px;
}

.empty-state {
  text-align: center;
  padding: 50px;
  color: #888;
}

/* Legal Pages */
.legal-container {
  padding-top: 120px;
  padding-bottom: 60px;
}

.legal-content {
  background: white;
  border-radius: 30px;
  padding: 40px;
  box-shadow: var(--shadow-soft);
  max-width: 900px;
  margin: 0 auto;
}

.legal-content h1 {
  text-align: center;
  margin-bottom: 40px;
  color: var(--pink);
}

.legal-text p {
  margin-bottom: 15px;
}

.highlight {
  background: var(--yellow);
  padding: 2px 5px;
  border-radius: 4px;
}

/* Contact Form */
.contact-form {
  display: grid;
  gap: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-control {
  width: 100%;
  padding: 12px 20px;
  border-radius: 15px;
  border: 2px solid #eee;
  font-family: var(--font-main);
  transition: all 0.3s;
}

.form-control:focus {
  border-color: var(--mint);
  outline: none;
  transform: scale(1.01);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

@media (max-width: 768px) {
  .games-grid-featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .games-grid-featured .game-card,
  .games-grid-featured .game-card:nth-child(1),
  .games-grid-featured .game-card:nth-child(2) {
    grid-column: span 1;
    grid-row: auto;
  }

  .games-grid-featured .game-card:nth-child(1) .card-img {
    height: 180px;
  }

  .games-grid-horizontal {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .games-grid-horizontal .game-card {
    transform: none !important;
  }

  .games-grid-horizontal .game-card:nth-child(5n + 1) {
    grid-column: span 2;
  }

  .games-grid-horizontal .card-img {
    height: 150px;
  }

  .games-grid-horizontal .game-card:nth-child(5n + 1) .card-img {
    height: 180px;
  }

  .games-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding-bottom: 2px;
  }

  .games-grid-compact .game-card {
    grid-column: span 1;
    grid-row: auto;
  }

  .games-grid-compact .game-card:nth-child(2),
  .games-grid-compact .game-card:nth-child(3) {
    grid-column: span 1;
  }

  .games-grid-compact .card-img {
    height: 170px;
  }

  .games-grid-compact .game-card:nth-child(1) {
    grid-column: span 2;
    grid-row: auto;
  }

  .games-grid-compact .game-card:nth-child(1) .card-img {
    min-height: 0;
    height: 220px;
  }
}

@media (max-width: 560px) {
  .games-grid-horizontal {
    grid-template-columns: 1fr;
  }

  .games-grid-horizontal .game-card:nth-child(5n + 1) {
    grid-column: span 1;
  }

  .games-grid-horizontal .card-img,
  .games-grid-horizontal .game-card:nth-child(5n + 1) .card-img {
    height: 170px;
  }

  .games-grid-compact {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .games-grid-compact .game-card,
  .games-grid-compact .game-card:nth-child(1),
  .games-grid-compact .game-card:nth-child(2),
  .games-grid-compact .game-card:nth-child(3) {
    grid-column: span 1;
  }

  .games-grid-compact .card-img {
    height: 180px;
  }

  .games-grid-compact .game-card:nth-child(1) .card-img {
    height: 200px;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-title { font-size: 2rem; }
  .game-header { grid-template-columns: 1fr; }
  .sidebar { display: none; } /* Handle with JS toggle */
  .sidebar.active {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    height: 100%;
    z-index: 2000;
    border-radius: 0;
    overflow-y: auto;
  }

  .mobile-cats {
    display: block;
  }
}
