/* -------------------------------
   GLOBAL VARIABLES
--------------------------------*/
:root {
  --bg: #ffffff;
  --text: #111;
  --subtext: #555;
  --border: #e5e5e5;
  --card-bg: #fff;
  --card-shadow: rgba(0,0,0,0.06);
  --primary: #5a30ff;
  --tag-new: #1976ff;
  --tag-mod: #ff3d4f;
  --radius: 14px;
  --font: 'Inter', sans-serif;
}

/* -------------------------------
   RESET & BASE
--------------------------------*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font);
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

/* Improve readability */
p, li {
  font-size: 16px;
}

/* -------------------------------
   TOP BAR
--------------------------------*/
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.menu-icon,
.search-icon {
  font-size: 22px;
  cursor: pointer;
  padding: 8px;
  color: #222;
  transition: 0.2s;
}

.menu-icon:active,
.search-icon:active {
  transform: scale(0.9);
}

.logo {
  height: 70px;
  width: auto;
}

/* -------------------------------
   SIDE NAV
--------------------------------*/
.side-nav {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100%;
  background: #fff;
  box-shadow: 2px 0 8px rgba(0,0,0,0.1);
  transition: 0.3s ease;
  padding: 25px;
  z-index: 200;
}

.side-nav.open {
  left: 0;
}

.side-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.side-nav h3 {
  font-size: 20px;
  font-weight: 600;
}

.close-nav {
  font-size: 22px;
  cursor: pointer;
}

.side-nav a {
  display: block;
  padding: 12px 0;
  text-decoration: none;
  color: #222;
  font-size: 15px;
  border-bottom: 1px solid #f5f5f5;
  transition: 0.25s;
}

.side-nav a:hover {
  padding-left: 6px;
  color: var(--primary);
}

/* -------------------------------
   CONTAINER & TEXT
--------------------------------*/
.container {
  padding: 24px 18px;
  max-width: 1100px;
  margin: auto;
}

/* High-trust SEO heading system */
h1 {
  font-size: 30px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 10px;
  color: #111;
  letter-spacing: -0.3px;
}

h2.section-title {
  font-size: 26px;
  font-weight: 700;
  margin-top: 20px;
  margin-bottom: 6px;
  text-align: center;
  color: #121212;
}

p.section-sub {
  margin: 8px auto 24px;
  color: #666;
  font-size: 16px;
  font-weight: 400;
  text-align: center;
  max-width: 600px;
  line-height: 1.6;
}

/* -------------------------------
   APP GRID
--------------------------------*/
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px;
}

.app-card {
  background: var(--card-bg);
  padding: 14px;
  border-radius: var(--radius);
  box-shadow: 0 2px 10px var(--card-shadow);
  cursor: pointer;
  transition: 0.25s;
  border: 1px solid #f7f7f7;
}

.app-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px var(--card-shadow);
}

.app-img-wrap {
  position: relative;
  width: 100%;
  height: 130px;
  background: #f5f6ff;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.app-img {
  width: 82px;
  height: 82px;
  object-fit: cover;
  border-radius: 15px;
}

/* App tags */
.tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  border-radius: 50px;
}

.tag.mod {
  left: auto;
  right: 10px;
  background: var(--tag-mod);
}

.tag.new {
  background: var(--tag-new);
}

.app-name {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 600;
}

.app-cat {
  font-size: 13px;
  color: #666;
  margin-top: 2px;
}

.info-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  font-size: 13px;
  color: #444;
}

/* -------------------------------
   BUTTON
--------------------------------*/
.view-all {
  margin: 32px auto;
  display: block;
  text-align: center;
  background: var(--primary);
  color: #fff;
  padding: 13px 28px;
  border-radius: 12px;
  width: max-content;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(90,48,255,0.35);
  transition: 0.25s;
}

.view-all:hover {
  transform: translateY(-2px);
}

/* -------------------------------
   CATEGORIES
--------------------------------*/
.categories {
  margin-top: 40px;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.cat-card {
  border: 1px solid var(--border);
  padding: 18px;
  border-radius: var(--radius);
  text-align: center;
  background: #fafafa;
  cursor: pointer;
  transition: 0.25s;
}

.cat-card:hover {
  background: #f2f0ff;
  transform: translateY(-2px);
}

.cat-title {
  font-size: 15px;
  font-weight: 600;
}

.cat-sub {
  font-size: 12px;
  margin-top: 4px;
  color: #666;
}

/* -------------------------------
   POPULAR DOWNLOADS
--------------------------------*/
.downloads {
  margin-top: 40px;
}

.downloads ul {
  margin-top: 12px;
  padding-left: 20px;
}

.downloads li {
  margin: 8px 0;
  font-size: 15px;
  line-height: 1.6;
}

.downloads a {
  color: var(--primary);
  text-decoration: none;
}

/* -------------------------------
   FOOTER
--------------------------------*/
footer {
  margin-top: 55px;
  padding: 40px 18px;
  background: #111;
  color: #fff;
  text-align: center;
  font-size: 15px;
}

footer a {
  color: #fff;
  text-decoration: none;
  margin: 0 10px;
  font-size: 15px;
  opacity: 0.9;
}

footer a:hover {
  opacity: 1;
}

/* -------------------------------
   MOBILE RESPONSIVE
--------------------------------*/
@media (max-width: 480px) {
  .app-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  p.section-sub {
    max-width: 95%;
  }

  h2.section-title {
    font-size: 22px;
  }
}
