/* =====================================================
   STEPPA.IN — Main CSS (h5ninja-inspired design)
   Mobile-first, fully responsive
   ===================================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&family=Roboto+Condensed:wght@700&display=swap');

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  overflow-x: hidden;
  width: 100%;
}
body {
  font-family: 'Roboto', sans-serif;
  background: #f2f3f5;
  color: #222;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ---- CSS Variables ---- */
:root {
  --green:   #3dbb85;
  --green-d: #2da372;
  --blue:    #1976d2;
  --dark:    #1a1a2e;
  --dark2:   #16213e;
  --orange:  #ff9800;
  --red:     #e53935;
  --bg:      #f2f3f5;
  --card-bg: #ffffff;
  --border:  #e0e0e0;
  --text1:   #1a1a1a;
  --text2:   #555;
  --text3:   #888;
  --radius:  10px;
  --radius-sm: 6px;
  --shadow:  0 2px 8px rgba(0,0,0,.09);
  --shadow-h: 0 6px 24px rgba(0,0,0,.14);
  --trans:   .2s ease;
  --container: 1180px;
}

/* ---- Container ---- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 16px; }

/* =====================================================
   HEADER
   ===================================================== */
.site-header {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.5px;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: 'Roboto Condensed', sans-serif;
}
.site-logo span.logo-icon {
  background: var(--green);
  color: #fff;
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}

/* Header Search */
.header-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}
.header-search input {
  width: 100%;
  height: 38px;
  border-radius: 20px;
  border: none;
  padding: 0 16px 0 40px;
  font-size: .9rem;
  background: rgba(255,255,255,.12);
  color: #fff;
  outline: none;
  transition: var(--trans);
}
.header-search input::placeholder { color: rgba(255,255,255,.5); }
.header-search input:focus { background: rgba(255,255,255,.2); }
.header-search .search-ico {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,.6);
  font-size: .9rem;
  pointer-events: none;
}
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-h);
  overflow: hidden;
  display: none;
  z-index: 999;
}
.search-dropdown.show { display: block; }
.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  transition: background var(--trans);
  border-bottom: 1px solid var(--border);
}
.search-result-item:hover { background: #f5f5f5; }
.search-result-item img { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.search-result-info .name { font-size: .88rem; font-weight: 500; color: var(--text1); }
.search-result-info .meta { font-size: .78rem; color: var(--text3); }
.search-result-item .no-results { font-size: .88rem; color: var(--text3); padding: 4px 0; }

/* Nav links (desktop) */
.header-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.header-nav a {
  color: rgba(255,255,255,.75);
  font-size: .85rem;
  padding: 6px 12px;
  border-radius: 20px;
  white-space: nowrap;
  transition: var(--trans);
  font-weight: 500;
}
.header-nav a:hover, .header-nav a.active { background: rgba(255,255,255,.15); color: #fff; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: var(--trans);
}

/* =====================================================
   CATEGORY NAV BAR (below header)
   ===================================================== */
.cat-bar {
  background: var(--dark2);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.cat-bar-inner {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding: 8px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cat-bar-inner::-webkit-scrollbar { display: none; }
.cat-link {
  color: rgba(255,255,255,.65);
  font-size: .82rem;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 20px;
  white-space: nowrap;
  transition: var(--trans);
  flex-shrink: 0;
}
.cat-link:hover, .cat-link.active {
  background: var(--green);
  color: #fff;
}

/* =====================================================
   MOBILE SIDEBAR DRAWER
   ===================================================== */
.overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 1990;
}
.overlay.show { display: block; }
.mobile-sidebar {
  position: fixed;
  top: 0; left: -280px;
  width: 280px; height: 100vh;
  background: var(--dark);
  z-index: 2000;
  overflow-y: auto;
  transition: left .3s ease;
  display: flex; flex-direction: column;
}
.mobile-sidebar.open { left: 0; }
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-logo { color: #fff; font-weight: 700; font-size: 1.2rem; }
.sidebar-close { color: rgba(255,255,255,.7); font-size: 1.4rem; line-height: 1; padding: 4px 8px; }
.sidebar-search {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-search input {
  width: 100%;
  padding: 9px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: .88rem;
  outline: none;
}
.sidebar-search input::placeholder { color: rgba(255,255,255,.4); }
.sidebar-section-title {
  color: rgba(255,255,255,.4);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 16px 16px 6px;
  font-weight: 600;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  color: rgba(255,255,255,.75);
  font-size: .9rem;
  transition: var(--trans);
}
.sidebar-link:hover, .sidebar-link.active {
  background: rgba(255,255,255,.08);
  color: #fff;
}
.sidebar-link .ico { font-size: 1rem; width: 20px; text-align: center; }
.sidebar-link .count {
  margin-left: auto;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.6);
  font-size: .72rem;
  padding: 2px 7px;
  border-radius: 20px;
}

/* =====================================================
   HERO BANNER (homepage)
   ===================================================== */
.hero-section {
  background: linear-gradient(135deg, var(--dark) 0%, #0f3460 60%, #533483 100%);
  padding: 40px 0 32px;
  text-align: center;
  color: #fff;
}
.hero-title {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 10px;
  font-family: 'Roboto Condensed', sans-serif;
}
.hero-title .hl { color: var(--green); }
.hero-sub {
  color: rgba(255,255,255,.75);
  font-size: clamp(.88rem, 2vw, 1rem);
  max-width: 560px;
  margin: 0 auto 20px;
}
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}
.hero-stat .num {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--green);
  line-height: 1;
}
.hero-stat .lbl { font-size: .78rem; color: rgba(255,255,255,.6); margin-top: 2px; }

/* =====================================================
   SECTIONS & GRID
   ===================================================== */
.section { padding: 24px 0; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}
.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text1);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::before {
  content: '';
  display: block;
  width: 4px; height: 20px;
  background: var(--green);
  border-radius: 2px;
}
.view-all {
  font-size: .83rem;
  color: var(--green);
  font-weight: 600;
  padding: 5px 12px;
  border: 1.5px solid var(--green);
  border-radius: 20px;
  transition: var(--trans);
  white-space: nowrap;
}
.view-all:hover { background: var(--green); color: #fff; }

/* Game Grid — 5 cols desktop */
.games-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
/* Game Card */
.game-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--trans), box-shadow var(--trans);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.game-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); }
.game-card-thumb {
  aspect-ratio: 1/1;
  overflow: hidden;
  background: #eee;
  flex-shrink: 0;
}
.game-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.game-card:hover .game-card-thumb img { transform: scale(1.05); }
.game-card-body { padding: 8px 10px 10px; flex: 1; display: flex; flex-direction: column; }
.game-card-name {
  font-size: .83rem;
  font-weight: 600;
  color: var(--text1);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 3px;
}
.game-card-dev {
  font-size: .72rem;
  color: var(--text3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.game-card-rating {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: .72rem;
  color: var(--text3);
  margin-top: auto;
}
.stars-sm { color: var(--orange); font-size: .75rem; letter-spacing: -1px; }
.game-card-badge {
  position: absolute;
  top: 6px; left: 6px;
  background: var(--green);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
}
.game-card-badge.new { background: var(--blue); }
.game-card-badge.hot { background: var(--red); }

/* Horizontal scroll row (featured) */
.scroll-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.scroll-row::-webkit-scrollbar { display: none; }
.scroll-row .game-card { min-width: 140px; width: 140px; flex-shrink: 0; }

/* =====================================================
   ARCHIVE / CATEGORY PAGE
   ===================================================== */
.archive-header {
  background: linear-gradient(135deg, var(--dark) 0%, #0f3460 100%);
  padding: 28px 0 22px;
  color: #fff;
}
.archive-header h1 { font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 700; }
.archive-header p { color: rgba(255,255,255,.7); font-size: .9rem; margin-top: 4px; }
.archive-count-badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  color: rgba(255,255,255,.85);
  font-size: .8rem;
  padding: 3px 10px;
  border-radius: 20px;
  margin-top: 8px;
}

/* Filter/sort bar */
.filter-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  position: sticky;
  top: 60px;
  z-index: 100;
}
.filter-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.filter-label { font-size: .83rem; color: var(--text2); font-weight: 500; white-space: nowrap; }
.filter-select {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: .82rem;
  background: #fff;
  color: var(--text1);
  cursor: pointer;
  outline: none;
}
.filter-select:focus { border-color: var(--green); }
.filter-tab {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 500;
  border: 1.5px solid var(--border);
  color: var(--text2);
  transition: var(--trans);
}
.filter-tab.active, .filter-tab:hover { border-color: var(--green); color: var(--green); background: rgba(61,187,133,.08); }

/* Layout: main + sidebar */
.layout-wrap {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 20px;
  align-items: start;
  padding: 20px 0 40px;
  min-width: 0;
}
.layout-wrap main, .layout-wrap aside {
  min-width: 0;
}
.sidebar-widget {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 16px;
}
.widget-head {
  background: var(--dark);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.widget-body { padding: 8px 0; }
.widget-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: .84rem;
  color: var(--text2);
  transition: background var(--trans);
  border-bottom: 1px solid #f5f5f5;
}
.widget-link:hover { background: #f8f8f8; color: var(--green); }
.widget-link .ico { font-size: .9rem; }
.widget-link .cnt {
  margin-left: auto;
  background: #f0f0f0;
  font-size: .72rem;
  padding: 1px 7px;
  border-radius: 10px;
  color: var(--text3);
}

/* =====================================================
   SINGLE GAME PAGE
   ===================================================== */
.game-header {
  background: linear-gradient(135deg, var(--dark) 0%, #0f3460 100%);
  padding: 28px 0;
  color: #fff;
}
.game-header-inner {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.game-icon-wrap {
  flex-shrink: 0;
}
.game-icon-xl {
  width: 110px; height: 110px;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
  border: 3px solid rgba(255,255,255,.2);
}
.game-meta-col { flex: 1; min-width: 0; }
.game-title-xl {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}
.game-developer {
  color: rgba(255,255,255,.65);
  font-size: .88rem;
  margin-bottom: 10px;
}
.game-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.game-tag {
  display: inline-block;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.85);
  font-size: .75rem;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
}
.game-tag.genre { background: var(--green); color: #fff; }
.game-tag.free { background: #27ae60; color: #fff; }
.game-tag.paid { background: #e67e22; color: #fff; }
.game-tag.offline { background: var(--blue); color: #fff; }

/* Quick stats row */
.game-quick-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  background: rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.qs-item { text-align: center; min-width: 60px; }
.qs-val { font-size: 1rem; font-weight: 700; color: #fff; line-height: 1.1; }
.qs-lbl { font-size: .68rem; color: rgba(255,255,255,.55); margin-top: 2px; text-transform: uppercase; letter-spacing: .5px; }

/* Download button */
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 30px;
  transition: background var(--trans), transform var(--trans);
  box-shadow: 0 4px 14px rgba(61,187,133,.4);
  cursor: pointer;
}
.btn-download:hover { background: var(--green-d); transform: translateY(-1px); }
.btn-download .play-ico { font-size: 1.1rem; }

/* Single game body layout */
.single-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  padding: 24px 0 40px;
  align-items: start;
  min-width: 0;
}
.single-main, .single-sidebar {
  min-width: 0;
}

/* Content sections */
.content-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}
.content-section h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text1);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  line-height: 1.4;
  word-wrap: break-word;
}
.content-section .prose {
  font-size: .9rem;
  color: var(--text2);
  line-height: 1.75;
}
.content-section .prose p { margin-bottom: 10px; }
.content-section .prose ul { list-style: disc; padding-left: 18px; }
.content-section .prose ul li { margin-bottom: 4px; }

/* Details table */
.details-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.details-table tr { border-bottom: 1px solid #f5f5f5; }
.details-table td {
  padding: 9px 4px;
  font-size: .86rem;
  word-break: break-all;
  word-wrap: break-word;
}
.details-table td:first-child { color: var(--text3); width: 120px; }
.details-table td:last-child { font-weight: 500; color: var(--text1); }

/* Star Rating */
.rating-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stars-lg { color: var(--orange); font-size: 1.2rem; letter-spacing: -1px; }
.rating-score { font-size: 1.4rem; font-weight: 700; color: var(--text1); }
.rating-count { font-size: .82rem; color: var(--text3); }

/* Screenshots */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.screenshot-img {
  border-radius: var(--radius-sm);
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 9/16;
  background: #eee;
}
.screenshot-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.screenshot-img:hover img { transform: scale(1.04); }

/* Sidebar for single page */
.single-sidebar { position: sticky; top: 80px; }
.download-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
}
.download-card .dc-icon {
  width: 80px; height: 80px;
  border-radius: 18px;
  object-fit: cover;
  margin: 0 auto 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.download-card .dc-name { font-size: .95rem; font-weight: 700; margin-bottom: 3px; }
.download-card .dc-dev { font-size: .8rem; color: var(--text3); margin-bottom: 8px; }
.download-card .dc-rating { justify-content: center; margin-bottom: 14px; }
.download-card .btn-download { width: 100%; justify-content: center; }
.download-card .btn-download-sm {
  display: block;
  text-align: center;
  background: rgba(61,187,133,.1);
  color: var(--green);
  font-size: .82rem;
  font-weight: 600;
  padding: 8px;
  border-radius: 20px;
  margin-top: 8px;
  transition: var(--trans);
}
.download-card .btn-download-sm:hover { background: var(--green); color: #fff; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%;
  text-align: left;
  padding: 12px 0;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  white-space: normal;
}
.faq-q-text {
  flex: 1;
  min-width: 0;
  line-height: 1.4;
  text-align: left;
}
.faq-q .arr { font-size: 1rem; color: var(--text3); transition: transform .2s; flex-shrink: 0; }
.faq-q.open .arr { transform: rotate(180deg); }
.faq-a {
  display: none;
  font-size: .86rem;
  color: var(--text2);
  line-height: 1.7;
  padding-bottom: 12px;
}
.faq-a.open { display: block; }

/* =====================================================
   LOAD MORE / PAGINATION
   ===================================================== */
.load-more-wrap { text-align: center; padding: 28px 0; }
.btn-load-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 36px;
  background: var(--card-bg);
  border: 2px solid var(--green);
  color: var(--green);
  font-size: .9rem;
  font-weight: 700;
  border-radius: 30px;
  transition: var(--trans);
}
.btn-load-more:hover { background: var(--green); color: #fff; }
.btn-load-more .spin { display: none; width: 16px; height: 16px; border: 2px solid var(--green); border-top-color: transparent; border-radius: 50%; }
.btn-load-more.loading .spin { display: block; animation: spin .7s linear infinite; }
.btn-load-more.loading { opacity: .7; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,.7);
  padding: 36px 0 20px;
  margin-top: 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 20px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.footer-tagline { font-size: .83rem; line-height: 1.65; margin-bottom: 14px; }
.footer-col h4 { color: #fff; font-size: .9rem; font-weight: 700; margin-bottom: 12px; }
.footer-col ul li { margin-bottom: 7px; }
.footer-col ul li a { font-size: .83rem; transition: color var(--trans); }
.footer-col ul li a:hover { color: var(--green); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .8rem;
}
.footer-bottom a:hover { color: var(--green); }

/* =====================================================
   LIGHTBOX
   ===================================================== */
.lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.lightbox.show { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: var(--radius); }
.lightbox-close {
  position: absolute;
  top: 16px; right: 16px;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  padding: 4px 12px;
  cursor: pointer;
}

/* =====================================================
   TOAST
   ===================================================== */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #333;
  color: #fff;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: .88rem;
  opacity: 0;
  pointer-events: none;
  transition: all .3s ease;
  z-index: 9998;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =====================================================
   UTILITIES
   ===================================================== */
.badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
}
.badge-free { background: #e8f5e9; color: #2e7d32; }
.badge-paid { background: #fff3e0; color: #e65100; }
.badge-offline { background: #e3f2fd; color: #1565c0; }
.badge-new { background: #f3e5f5; color: #6a1b9a; }

.divider { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

.text-center { text-align: center; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }

/* =====================================================
   SEARCH RESULTS / PAGE
   ===================================================== */
.search-page-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.search-page-header h1 { font-size: 1.2rem; font-weight: 700; }
.search-page-header p { color: var(--text3); font-size: .88rem; margin-top: 4px; }

/* Page (Contact, Privacy, Terms) */
.page-content {
  max-width: 780px;
  margin: 36px auto;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 36px;
}
.page-content h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 16px; }
.page-content h2 { font-size: 1.1rem; font-weight: 700; margin: 24px 0 10px; }
.page-content p { font-size: .92rem; color: var(--text2); line-height: 1.75; margin-bottom: 12px; }
.page-content ul { list-style: disc; padding-left: 20px; margin-bottom: 12px; }
.page-content ul li { font-size: .92rem; color: var(--text2); margin-bottom: 4px; }

/* Contact Form */
.contact-form .form-group { margin-bottom: 16px; }
.contact-form label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 5px; }
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  background: #fff;
  transition: border-color var(--trans);
  outline: none;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--green); }
.contact-form textarea { min-height: 130px; resize: vertical; }
.btn-submit {
  background: var(--green);
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  padding: 11px 32px;
  border-radius: 30px;
  transition: background var(--trans);
}
.btn-submit:hover { background: var(--green-d); }

/* =====================================================
   TRENDING LIST (homepage)
   ===================================================== */
.trending-list { display: flex; flex-direction: column; gap: 0; }
.trending-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background var(--trans);
}
.trending-item:hover { background: #f5f5f5; }
.trending-num {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text3);
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}
.trending-num.top { color: var(--green); }
.trending-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #eee;
}
.trending-info { flex: 1; min-width: 0; }
.trending-info .name { font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trending-info .dev { font-size: .72rem; color: var(--text3); }
.trending-installs { font-size: .75rem; color: var(--text3); flex-shrink: 0; }

/* =====================================================
   RESPONSIVE BREAKPOINTS
   ===================================================== */

/* Tablet — 1024px */
@media (max-width: 1024px) {
  .games-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .layout-wrap { grid-template-columns: 1fr 220px; }
  .single-layout { grid-template-columns: 1fr 240px; }
}

/* Small Tablet — 768px */
@media (max-width: 768px) {
  .games-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .header-nav { display: none; }
  .hamburger { display: flex; }
  .header-search { max-width: 100%; flex: 1; }
  .layout-wrap { grid-template-columns: 1fr; }
  .single-layout { grid-template-columns: 1fr; }
  .single-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .screenshots-grid { grid-template-columns: repeat(2, 1fr); }
  .download-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    text-align: left;
    padding: 16px;
  }
  .download-card .dc-icon {
    grid-column: 1;
    grid-row: 1;
    width: 64px; height: 64px;
    margin: 0;
    flex-shrink: 0;
  }
  .download-card .dc-info {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .download-card .dc-actions {
    grid-column: 1 / span 2;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  .download-card .dc-rating { justify-content: flex-start; }
  .download-card .btn-download { width: 100%; justify-content: center; }
  .page-content { margin: 16px; padding: 20px; }
}

/* Mobile — 600px */
@media (max-width: 600px) {
  .games-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .game-card-body { padding: 8px 10px 10px; }
  .game-card-name { font-size: .83rem; }
  .game-card-dev { font-size: .72rem; }
  .hero-section { padding: 24px 0 20px; }
  .hero-stats { gap: 20px; }

  /* Header Wrap to prevent squishing and horizontal scroll */
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 16px;
    gap: 8px 16px;
  }
  .site-logo {
    order: 1;
  }
  .hamburger {
    order: 2;
    margin-left: auto;
  }
  .header-search {
    order: 3;
    width: 100%;
    max-width: 100%;
    flex: none;
    margin-top: 2px;
    margin-bottom: 4px;
  }
}

/* Mobile Phones — 480px (Horizontal Game Card - One Game Per Row) */
@media (max-width: 480px) {
  .games-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .game-card {
    flex-direction: row;
    align-items: center;
    padding: 10px 14px;
    gap: 14px;
    border-radius: var(--radius);
  }
  .game-card-thumb {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    aspect-ratio: 1/1;
    flex-shrink: 0;
  }
  .game-card-body {
    padding: 0;
    margin: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .game-card-name {
    font-size: .92rem;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
  }
  .game-card-dev {
    font-size: .75rem;
    margin-bottom: 3px;
  }
  .game-card-rating {
    margin-top: 0;
    font-size: .75rem;
  }
  .game-card-badge {
    top: 4px;
    left: 4px;
    font-size: .6rem;
    padding: 1px 5px;
  }
  
  .scroll-row .game-card {
    min-width: 120px;
    width: 120px;
    flex-direction: column;
    padding: 0;
    gap: 0;
  }
  .scroll-row .game-card .game-card-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    border-radius: var(--radius) var(--radius) 0 0;
  }
  .scroll-row .game-card .game-card-body {
    padding: 8px 10px 10px;
  }

  .header-inner { height: auto; padding: 8px 16px; }
  .game-header-inner { flex-direction: column; align-items: center; text-align: center; }
  .game-meta-col { width: 100%; }
  .game-icon-xl { width: 90px; height: 90px; border-radius: 18px; }
  .game-quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 6px;
    padding: 12px;
    width: 100%;
    margin-top: 14px;
  }
  .game-quick-stats .qs-val { font-size: 0.88rem; }
  .game-quick-stats .qs-lbl { font-size: 0.62rem; }
  .qs-item {
    min-width: 0;
    text-align: center;
  }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 4px; }
  .single-layout { grid-template-columns: 1fr; }
}

/* =====================================================
   BREADCRUMB
   ===================================================== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: .8rem;
  color: rgba(255,255,255,.55);
  margin-bottom: 10px;
}
.breadcrumb a { color: rgba(255,255,255,.65); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb .sep { color: rgba(255,255,255,.3); }
.breadcrumb .current { color: rgba(255,255,255,.85); }

/* =====================================================
   EMPTY/NOT FOUND STATES
   ===================================================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text3);
}
.empty-state .ico { font-size: 3rem; margin-bottom: 12px; }
.empty-state h3 { font-size: 1.1rem; font-weight: 600; color: var(--text2); margin-bottom: 6px; }

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .4s ease forwards; }

/* =====================================================
   HOMEPAGE CUSTOM VISUAL GRID (MINT THEME)
   ===================================================== */
body.home {
  background: #a3f7e9;
}
.homepage-games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 16px 0;
  min-width: 0;
}
.game-card-visual {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  background: #fff;
}
.game-card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.game-card-visual:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}
.game-card-visual:hover img {
  transform: scale(1.03);
}
.game-card-visual.card-large {
  grid-column: span 2;
  grid-row: span 2;
}

@media (min-width: 600px) {
  .homepage-games-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-flow: row dense;
  }
}
@media (min-width: 1024px) {
  .homepage-games-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
    grid-auto-flow: row dense;
  }
}
