:root {
  --green: #009e61;
  --green-hover: #00805e;
  --blue: #00a3e0;
  --green-light: #26d07c;
  --corporate-gradient: linear-gradient(95deg, #00a3e0 14%, #26d07c 85%);
  --corporate-gradient-reverse: linear-gradient(230deg, #00a3e0 14%, #26d07c 85%);
  --dark: #141415;
  --body: #3b3d40;
  --muted: #70737a;
  --white: #fff;
  --bg: #f5f5f5;
  --border: #e0e0e0;
  --border-dark: #bdbdbd;
  --star: #ffb901;
  --link: #0074df;
  --sidebar-w: 260px;
  --header-h: 64px;
  --footer-bg: #14335a;
  --radius: 8px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', Arial, sans-serif;
  background: var(--white);
  color: var(--body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: 'Montserrat', 'Inter', Arial, sans-serif;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.3;
}

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

/* ========== HEADER ========== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  height: var(--header-h);
  box-shadow: 0 2px 4px rgba(0,0,0,.15);
}
.header .container {
  position: relative;
  max-width: none;
  margin: 0;
  padding: 0 12px;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--corporate-gradient);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
}
.logo-text {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--dark);
}

/* Search */
.header .container > .logo { justify-self: start; }
.search-form {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, 34vw);
  max-width: 100%;
  display: flex;
}
@media (max-width: 1200px) {
  .search-form { width: min(400px, 32vw); }
}
@media (max-width: 1050px) {
  .search-form { width: min(320px, 30vw); }
  .apps-menu-btn > span { display: none; }
  .header-nav .nav-login, .header-nav .nav-register { padding: 7px 10px; font-size: .8rem; }
  .header-nav .nav-login svg, .header-nav .nav-register svg { display: none; }
}
.search-input {
  flex: 1;
  height: 42px;
  border: 1px solid var(--border-dark);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  padding: 0 16px;
  font-size: .9rem;
  font-family: inherit;
  outline: none;
  background: var(--white);
  color: var(--dark);
  transition: border-color .2s;
}
.search-input:focus { border-color: var(--green-light); }
.search-input::placeholder { color: var(--muted); }

.search-btn {
  height: 42px;
  padding: 0 24px;
  background: var(--corporate-gradient);
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--white);
  font-size: .9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .25s;
  flex-shrink: 0;
  white-space: nowrap;
}
.search-btn:hover { background: var(--corporate-gradient-reverse); }
.search-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}
.search-toggle svg { width: 22px; height: 22px; fill: var(--dark); }

/* Nav */
.header .container > * { min-width: 0; }
.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-self: end;
  min-width: 0;
  max-width: 100%;
  flex-shrink: 1;
  overflow: visible;
  white-space: nowrap;
  scrollbar-width: none;
}
.header-nav::-webkit-scrollbar { display: none; }
.header-nav a {
  color: var(--dark);
  font-size: .875rem;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color .2s, color .2s;
}
.header-nav a:hover,
.header-nav a.active {
  border-bottom-color: var(--dark);
  text-decoration: none;
}

/* ========== SIDEBAR ========== */
.layout {
  display: flex;
  max-width: none;
  margin: 0;
  min-height: calc(100vh - var(--header-h));
}
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  background: var(--white);
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.sidebar-title {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  padding: 0 20px 12px;
}
.sidebar-list { list-style: none; }
.sidebar-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--body);
  font-size: .875rem;
  text-decoration: none;
  transition: background .15s;
}
.sidebar-list li a:hover {
  background: var(--bg);
  text-decoration: none;
}
.sidebar-list li a.active {
  background: var(--bg);
  color: var(--dark);
  font-weight: 600;
  border-left: 3px solid var(--green);
  padding-left: 17px;
}
.sidebar-icon { font-size: 1.1rem; width: 24px; text-align: center; }
.sidebar-icon-img { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
.cat-card-img { width: 44px; height: 44px; object-fit: contain; margin-bottom: 10px; }
.sidebar-count {
  margin-left: auto;
  font-size: .75rem;
  color: var(--muted);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 10px;
}

/* ========== MAIN CONTENT ========== */
.main {
  flex: 1;
  min-width: 0;
  padding: 16px;
  background: var(--white);
}

/* ========== HERO ========== */
.hero {
  background: linear-gradient(90deg, #005c4d 0%, #175982 50%, #186798 75%, #1b699c 100%);
  border-radius: var(--radius);
  padding: 56px 48px;
  margin-bottom: 40px;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,158,97,.15) 0%, transparent 60%);
  pointer-events: none;
}
.hero h1 {
  color: var(--white);
  font-size: 2.5rem;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.hero p {
  font-size: 1.125rem;
  opacity: .9;
  position: relative;
  z-index: 1;
}

/* ========== SECTION ========== */
.section { margin-bottom: 48px; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.section-head h2 {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-head h2 span, .section-head h1 span {
  background: var(--corporate-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.see-all {
  font-size: .875rem;
  color: var(--link);
  font-weight: 500;
}

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

.app-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--dark);
  transition: transform .2s cubic-bezier(.55,0,.1,1), box-shadow .2s cubic-bezier(.55,0,.1,1);
  position: relative;
}
.app-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  text-decoration: none;
}

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg);
  position: relative;
}
.app-icon { position: relative; }
.app-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; border-radius: 14px; padding: 6px; }
.icon-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  background: var(--corporate-gradient);
  color: var(--white);
  border-radius: var(--radius);
}

.app-body { flex: 1; min-width: 0; }
.app-category {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--dark);
  margin-bottom: 4px;
}
.app-title {
  font-size: .875rem;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.app-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.app-rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: .875rem;
  color: var(--dark);
}
.star { color: var(--star); font-size: .9rem; }
.app-license {
  font-size: .8125rem;
  font-weight: 600;
}
.app-license.free { color: var(--green); }
.app-license.paid { color: var(--muted); }

/* ========== TOP DOWNLOAD LIST ========== */
.top-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.top-list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  transition: transform .2s cubic-bezier(.55,0,.1,1), box-shadow .2s cubic-bezier(.55,0,.1,1);
  text-decoration: none;
  color: var(--dark);
}
.top-list-item:last-child { border-bottom: none; }
.top-list-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  text-decoration: none;
}
.top-list-rank {
  width: 32px;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.top-list-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  flex-shrink: 0;
}
.top-list-icon { position: relative; }
.top-list-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; border-radius: var(--radius); padding: 4px; }
.top-list-info { flex: 1; min-width: 0; }
.top-list-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.top-list-license {
  font-size: .8125rem;
  font-weight: 600;
  width: 80px;
  text-align: center;
  flex-shrink: 0;
}
.top-list-license.free { color: var(--green); }
.top-list-license.paid { color: var(--muted); }
.top-list-rating {
  display: flex;
  align-items: center;
  gap: 3px;
  width: 60px;
  flex-shrink: 0;
  font-size: .875rem;
}
.top-list-downloads {
  font-size: .875rem;
  color: var(--muted);
  width: 100px;
  text-align: right;
  flex-shrink: 0;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
  text-decoration: none;
}
.btn-download:hover { background: var(--green-hover); text-decoration: none; }

.btn-download-lg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s;
  text-decoration: none;
}
.btn-download-lg:hover { background: var(--green-hover); text-decoration: none; }

/* ========== CATEGORY GRID ========== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--dark);
  text-align: center;
  transition: transform .2s, box-shadow .2s;
}
.cat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
  text-decoration: none;
}
.cat-card-icon { font-size: 2.5rem; margin-bottom: 10px; }
.cat-card-name {
  font-size: .875rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.cat-card-count {
  font-size: .75rem;
  color: var(--muted);
}

/* ========== BREADCRUMB ========== */
.breadcrumb {
  font-size: .875rem;
  color: var(--muted);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--link); }
.breadcrumb span { color: var(--muted); }

/* ========== APP DETAIL ========== */
.detail-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 32px;
}
.detail-head {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin-bottom: 28px;
}
.detail-icon {
  width: 128px;
  height: 128px;
  border-radius: 20px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg);
}
.detail-icon { position: relative; }
.detail-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; border-radius: 20px; padding: 12px; }
.detail-icon-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  background: var(--corporate-gradient);
  color: var(--white);
  border-radius: 20px;
}
.detail-info { flex: 1; }
.detail-info h1 {
  font-size: 1.75rem;
  margin-bottom: 6px;
}
.detail-dev {
  font-size: .875rem;
  color: var(--muted);
  margin-bottom: 14px;
}
.detail-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.detail-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 1rem;
  font-weight: 600;
}
.detail-rating .star { font-size: 1.1rem; }
.detail-downloads {
  font-size: .9rem;
  color: var(--muted);
}
.detail-version {
  font-size: .8125rem;
  color: var(--muted);
  background: var(--bg);
  padding: 3px 10px;
  border-radius: 4px;
}
.detail-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.platform-badge {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.platform-badge.windows { background: #e0f2fe; color: #0284c7; }
.platform-badge.android { background: #dcfce7; color: #16a34a; }
.platform-badge.ios { background: #f3e8ff; color: #9333ea; }
.platform-badge.web { background: #fef3c7; color: #d97706; }
.platform-badge.mac { background: #fce7f3; color: #db2777; }
.license-badge {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: .75rem;
  font-weight: 600;
}
.license-badge.free { background: #dcfce7; color: var(--green); }
.license-badge.paid { background: var(--bg); color: var(--muted); }

.detail-body h2 {
  font-size: 1.125rem;
  margin-bottom: 12px;
}
.detail-body p {
  color: var(--body);
  line-height: 1.7;
  margin-bottom: 20px;
}

/* ========== TAGS ========== */
.tag-gradient {
  display: inline-flex;
  padding: 2px;
  background: var(--corporate-gradient-reverse);
  border-radius: var(--radius);
  text-decoration: none;
  transition: background .25s;
}
.tag-gradient:hover {
  background: transparent;
  text-decoration: none;
}
.tag-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--white);
  border-radius: 6px;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600;
  font-size: .875rem;
  color: var(--dark);
}
.tag-gradient:hover .tag-inner {
  background: transparent;
  color: var(--white);
}

/* ========== PAGINATION ========== */
.pagination { margin-top: 32px; }
.soft-pagination { display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; }
.pg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  font-size: .875rem;
  font-weight: 600;
  color: var(--dark);
  text-decoration: none;
  transition: all .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
a.pg-btn:hover {
  border-color: var(--green);
  color: var(--green);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,158,97,.18);
  text-decoration: none;
}
.pg-btn.pg-active {
  background: var(--corporate-gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,163,224,.3);
}
.pg-btn.pg-disabled {
  opacity: .4;
  cursor: not-allowed;
  box-shadow: none;
}
.pg-dots { color: var(--muted); font-weight: 700; letter-spacing: 2px; }
.pg-info {
  text-align: center;
  margin-top: 14px;
  font-size: .82rem;
  color: var(--muted);
  background: var(--bg);
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  padding: 6px 18px;
  border-radius: 20px;
}

/* ========== EMPTY STATE ========== */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
  font-size: 1rem;
}

/* ========== FOOTER ========== */
.footer {
  background: var(--footer-bg);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(276deg, #1e4a7a -3%, #14335a 55%, #0b1e38 110%);
  pointer-events: none;
}
.footer-inner {
  position: relative;
  z-index: 1;
  max-width: none;
  margin: 0;
  padding: 48px 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
}
.footer h4 {
  font-size: 1rem;
  color: var(--white);
  margin-bottom: 14px;
}
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 8px; }
.footer ul li a {
  color: rgba(255,255,255,.85);
  font-size: .875rem;
  text-decoration: none;
  transition: color .2s;
}
.footer ul li a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 20px 24px;
  border-top: 1px solid rgba(255,255,255,.15);
  font-size: .8125rem;
  color: rgba(255,255,255,.7);
}

/* ========== SCROLL SECTIONS ========== */
.scroll-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.scroll-row::-webkit-scrollbar { height: 4px; }
.scroll-row::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.scroll-row > * { scroll-snap-align: start; flex-shrink: 0; width: 260px; }

/* ========== SPLIT LAYOUT UTILITIES ========== */
.split-side { display: grid; grid-template-columns: 1fr 340px; gap: 32px; }
.split-half { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.split-main { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .main { padding: 24px 16px; }
  .hero { padding: 40px 28px; }
  .hero h1 { font-size: 1.75rem; }
  .top-list-downloads { display: none; }
  .hamburger { display: block; }
  .sidebar {
    position: fixed; top: var(--header-h); left: 0;
    width: min(320px, 88vw);
    height: auto; max-height: 72vh;
    padding: 16px 0 20px;
    z-index: 200;
    border-right: none;
    border-radius: 0 0 14px 0;
    background: var(--white);
    box-shadow: 0 12px 32px rgba(0,0,0,0.25);
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .sidebar.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .sidebar-overlay.show { opacity: 1; pointer-events: auto; }
  .split-side, .split-half, .split-main { grid-template-columns: 1fr; }
  .app-grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .header { height: auto; }
  .header .container { display: flex; flex-wrap: wrap; padding: 8px 12px; gap: 8px 12px; }
  .hamburger { order: 1; }
  .header .container > .logo { order: 2; }
  .logo-text { display: none; }
  .search-toggle { display: flex; order: 3; }
  .search-form { display: none; order: 4; flex-basis: 100%; width: 100%; }
  .search-form.open { display: flex; }
  .header-nav { display: flex; order: 5; flex-basis: 100%; overflow-x: auto; gap: 16px; padding: 4px 0 2px; font-size: .82rem; white-space: nowrap; justify-self: stretch; }
  .header-nav::-webkit-scrollbar { display: none; }
  .search-input { height: 38px; font-size: .85rem; }
  .search-btn { height: 38px; padding: 0 16px; }
  .hero { padding: 28px 20px; }
  .hero h1 { font-size: 1.35rem; }
  .hero p { font-size: .95rem; }
  .hero-slide { min-height: 240px; }
  .hero-slide-content { padding: 32px 20px; }
  .hero-slide-content h1, .hero-slide-content .hero-h1 { font-size: 1.35rem; }
  .hero-slide-content p { font-size: .9rem; }
  .hero-arrow { width: 36px; height: 36px; font-size: 1rem; }
  .hero-prev { left: 8px; }
  .hero-next { right: 8px; }
  .app-grid { grid-template-columns: 1fr; }
  .app-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-card { padding: 20px 16px; }
  .detail-card h1, .detail-info h1 { font-size: 1.35rem; }
  .detail-icon { width: 96px; height: 96px; }
  .detail-columns { grid-template-columns: 1fr; }
  .detail-sidebar { flex-direction: column; }
  .detail-head { flex-direction: column; align-items: center; text-align: center; }
  .detail-stats { justify-content: center; }
  .detail-badges { justify-content: center; }
  .share-row { justify-content: center; }
  .spec-table th { width: 120px; }
  .spec-table th, .spec-table td { padding: 8px 10px; font-size: .82rem; }
  .stats-band { grid-template-columns: repeat(2, 1fr); padding: 24px 16px; }
  .stat-num { font-size: 1.5rem; }
  .top-list { padding: 12px; }
  .top-list-item { flex-wrap: wrap; gap: 10px; }
  .top-list-rank { display: none; }
  .top10-list .top-list-rank { display: flex; }
  .toast-container { left: 16px; right: 16px; max-width: none; }
  .top-list-license { display: none; }
  .top-list-rating { display: none; }
  .footer-inner { padding: 32px 16px; gap: 24px; }
  .footer-links-col { display: none; }
  .breadcrumb { font-size: .8rem; }
  .section-head h2 { font-size: 1.1rem; }
  .form-row { grid-template-columns: 1fr; }
  .scroll-row > * { width: 230px; }
}

@media (max-width: 480px) {
  .main { padding: 16px 12px; }
  .detail-card { padding: 24px 18px !important; }
  .auth-page { padding: 16px 12px; }
  .auth-card { padding: 32px 20px; }
  .detail-card .btn-download-lg { width: 100%; justify-content: center; }
  .app-grid-4 { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cat-card { padding: 16px 8px; }
  .cat-card-icon { font-size: 2rem; }
  .hero-slide-content .hero-btn, .hero-btn { padding: 10px 24px; font-size: .9rem; }
  .btn-download-lg { padding: 11px 20px; font-size: .92rem; }
  .detail-icon { width: 84px; height: 84px; }
  .review-form { padding: 14px; }
  .star-input label { font-size: 1.5rem; }
  .back-to-top { bottom: 16px; right: 16px; width: 42px; height: 42px; }
  .announcement-bar { font-size: .75rem; }
  .search-input::placeholder { font-size: .8rem; }
  .footer-bottom { font-size: .75rem; }
  .pagination { flex-wrap: wrap; }
}

/* ========== ANNOUNCEMENT BAR ========== */
.announcement-bar { background: var(--dark); color: #fff; text-align: center; font-size: .82rem; padding: 8px 16px; }
.announcement-bar a { color: #fff; text-decoration: underline; }
.announcement-bar a:hover { color: var(--green-light); }

/* ========== LOGO IMAGE ========== */
.logo-img { max-height: 40px; max-width: 180px; object-fit: contain; }

/* ========== FOOTER LOGO ========== */
.footer-logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: #fff; font-family: 'Montserrat', Arial, sans-serif; font-weight: 600; font-size: 1.15rem; margin-bottom: 14px; }
.footer-logo:hover { text-decoration: none; }
.footer-logo img { max-height: 36px; max-width: 150px; object-fit: contain; }

.footer-bottom .credit-link { color: #fff; font-weight: 600; text-decoration: underline; }
.footer-bottom .credit-link:hover { color: var(--green-light); }
.footer-bottom-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.footer-bottom-brand { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px; }
.footer-bottom-brand strong { color: rgba(255,255,255,.92); }
.footer-tagline, .footer-credit { color: rgba(255,255,255,.55); }
.footer-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; }
.footer-trust span { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; color: rgba(255,255,255,.65); }
.footer-trust svg { width: 14px; height: 14px; fill: var(--green-light); opacity: .9; }
@media (max-width: 768px) {
  .footer-trust { gap: 6px 12px; }
}

/* ========== SOCIAL ICONS ========== */
.social-icons { display: flex; gap: 8px; }
.social-icons a { width: 34px; height: 34px; border: 2px solid rgba(255,255,255,.85); border-radius: 50%; display: flex; align-items: center; justify-content: center; text-decoration: none; transition: all .2s; }
.social-icons a svg { width: 15px; height: 15px; fill: #fff; transition: fill .2s; }
.social-icons a:hover { background: #fff; border-color: #fff; text-decoration: none; transform: translateY(-2px); }
.social-icons a:hover svg { fill: var(--footer-bg); }

/* ========== HERO SLIDER ========== */
.hero-slider { position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 40px; }
.hero-track { display: flex; transition: transform 0.6s ease-in-out; }
.hero-slide { position: relative; min-width: 100%; min-height: 320px; display: flex; align-items: center; justify-content: center; background-size: cover; background-position: center; background-color: #175982; background-image: linear-gradient(90deg, #005c4d 0%, #175982 50%, #1b699c 100%); }
.hero-slide:nth-child(2n) { background-image: linear-gradient(90deg, #1b699c 0%, #175982 50%, #005c4d 100%); }
.hero-slide:nth-child(3n) { background-image: linear-gradient(90deg, #005c4d 0%, #26d07c 60%, #175982 100%); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.25) 60%, rgba(0,0,0,0.1) 100%); }
.hero-slide-content { position: relative; z-index: 1; text-align: center; color: #fff; padding: 56px 48px; max-width: 800px; }
.hero-slide-content h1, .hero-slide-content .hero-h1 { color: #fff; font-size: 2.5rem; margin-bottom: 12px; text-shadow: 0 2px 8px rgba(0,0,0,0.4); font-family: 'Montserrat', Arial, sans-serif; font-weight: 600; line-height: 1.3; }
.hero-slide-content p { font-size: 1.125rem; opacity: 0.92; margin-bottom: 20px; text-shadow: 0 1px 4px rgba(0,0,0,0.4); }
.hero-btn { display: inline-block; padding: 12px 32px; background: var(--green); color: #fff; text-decoration: none; border-radius: var(--radius); font-weight: 600; font-size: 1rem; transition: background 0.2s; }
.hero-btn:hover { background: var(--green-hover); text-decoration: none; }
.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border: none; border-radius: 50%; background: rgba(255,255,255,0.25); color: #fff; font-size: 1.2rem; cursor: pointer; transition: background 0.2s; display: flex; align-items: center; justify-content: center; }
.hero-arrow:hover { background: rgba(255,255,255,0.45); }
.hero-prev { left: 16px; }
.hero-next { right: 16px; }
.hero-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; gap: 8px; }
.hero-dot { width: 10px; height: 10px; border: none; border-radius: 50%; background: rgba(255,255,255,0.4); cursor: pointer; padding: 0; transition: all 0.25s; }
.hero-dot.active { background: #fff; width: 28px; border-radius: 6px; }

/* ========== STATS BAND ========== */
.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; background: linear-gradient(95deg, #00a3e0 14%, #26d07c 85%); border-radius: var(--radius); padding: 32px 24px; margin-bottom: 40px; }
.stat-item { text-align: center; color: #fff; }
.stat-num { font-family: 'Montserrat', Arial, sans-serif; font-weight: 700; font-size: 2rem; line-height: 1.2; }
.stat-item .stat-label { font-size: .82rem; opacity: .9; text-transform: uppercase; letter-spacing: .06em; }

/* ========== TOP 10 RANK MEDALS ========== */
.top10-list .top-list-rank { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1rem; background: var(--bg); color: var(--muted); flex-shrink: 0; }
.top10-list .rank-1 { background: linear-gradient(135deg, #ffd700, #ffaa00); color: #fff; font-weight: 700; box-shadow: 0 2px 8px rgba(255,183,1,.5); }
.top10-list .rank-2 { background: linear-gradient(135deg, #e5e7eb, #9ca3af); color: #fff; font-weight: 700; }
.top10-list .rank-3 { background: linear-gradient(135deg, #f59e0b, #b45309); color: #fff; font-weight: 700; }

/* ========== 4-COLUMN APP GRID ========== */
.app-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ========== SHOP PRODUCT CARDS (e-commerce) ========== */
.shop-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.shop-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.shop-img { position: relative; display: block; aspect-ratio: 4/3; overflow: hidden; background: linear-gradient(135deg, #e8f0fe, #f5f5f5); }
.shop-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.shop-card:hover .shop-img img { transform: scale(1.06); }
.shop-img-fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: 'Montserrat', Arial, sans-serif; font-size: 3rem; font-weight: 700; color: #fff;
  background: var(--corporate-gradient);
}
.shop-img img { z-index: 1; }
.shop-price {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  background: linear-gradient(95deg, #00a3e0, #26d07c); color: #fff;
  font-weight: 700; font-size: 1.05rem; padding: 6px 16px; border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.shop-cat-tag {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: rgba(0,0,0,.55); color: #fff; font-size: .7rem; font-weight: 600;
  padding: 3px 10px; border-radius: 12px; text-transform: uppercase; letter-spacing: .04em;
}
.shop-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.shop-title { font-size: .95rem; line-height: 1.35; }
.shop-title a { color: var(--dark); text-decoration: none; }
.shop-title a:hover { color: var(--link); }
.shop-desc { font-size: .8rem; color: var(--muted); line-height: 1.5; flex: 1; }
.shop-actions { display: flex; gap: 8px; margin-top: 4px; }
.shop-btn {
  flex: 1; text-align: center; padding: 10px 0; border-radius: 8px;
  font-size: .85rem; font-weight: 600; text-decoration: none; transition: all .2s;
}
.shop-btn:hover { text-decoration: none; }
.shop-preview { border: 1.5px solid var(--border); color: var(--dark); background: #fff; }
.shop-preview:hover { border-color: var(--dark); }
.shop-buy { background: var(--green); color: #fff; border: 1.5px solid var(--green); }
.shop-buy:hover { background: var(--green-hover); border-color: var(--green-hover); }

/* ========== AUTO-SCROLL CAROUSEL (4 per view) ========== */
.auto-scroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.auto-scroll::-webkit-scrollbar { height: 4px; }
.auto-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.auto-scroll > * { flex: 0 0 calc(25% - 9px); min-width: 220px; scroll-snap-align: start; }
@media (max-width: 1024px) { .auto-scroll > * { flex-basis: calc(33.333% - 8px); } }
@media (max-width: 768px) { .auto-scroll > * { flex-basis: calc(50% - 6px); min-width: 0; } }
@media (max-width: 480px) { .auto-scroll > * { flex-basis: 78%; } }

/* ========== HAMBURGER + MOBILE DRAWER ========== */
.hamburger { display: none; background: none; border: none; font-size: 1.4rem; color: var(--dark); cursor: pointer; padding: 4px 8px; }
.sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.35); backdrop-filter: blur(2px); z-index: 150; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }

/* ========== BACK TO TOP ========== */
.back-to-top { position: fixed; bottom: 24px; right: 24px; width: 46px; height: 46px; border: none; border-radius: 50%; background: var(--green); color: #fff; font-size: 1.2rem; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.25); z-index: 120; opacity: 0; visibility: hidden; transform: translateY(12px); transition: all 0.3s; display: flex; align-items: center; justify-content: center; }
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--green-hover); }

/* ========== TOASTS ========== */
.toast-container { position: fixed; top: 76px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; max-width: 340px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: var(--radius); font-size: .875rem; box-shadow: 0 8px 24px rgba(0,0,0,0.18); animation: toastIn 0.3s ease; background: #fff; border-left: 4px solid var(--green); color: var(--dark); }
.toast.error { border-left-color: #dc2626; }
.toast.hide { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }

/* ========== SHARE BUTTONS ========== */
.share-row { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.share-label { font-size: .85rem; color: var(--muted); }
.share-btn { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .95rem; font-weight: 700; color: var(--body); background: #fff; cursor: pointer; text-decoration: none; transition: all 0.2s; font-family: inherit; }
.share-btn:hover { background: var(--dark); color: #fff; border-color: var(--dark); text-decoration: none; }

/* ========== SCROLL REVEAL ========== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ========== DETAIL PRO LAYOUT ========== */
.detail-columns { display: grid; grid-template-columns: 1fr 300px; gap: 28px; }
.detail-main { min-width: 0; }
.detail-sidebar { display: flex; flex-direction: column; gap: 16px; }
.side-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; background: #fff; }
.side-card h3 { font-size: .95rem; margin-bottom: 14px; }
.side-download { text-align: center; background: linear-gradient(180deg, #f8fafc 0%, #fff 100%); }
.side-icon { position: relative; width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 16px; overflow: hidden; background: var(--bg); }
.side-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 8px; }
.side-title { font-weight: 600; font-size: 1rem; color: var(--dark); }
.side-meta { font-size: .8rem; color: var(--muted); margin: 4px 0 14px; }
.side-btn { width: 100%; justify-content: center; }
.side-safe { font-size: .75rem; color: var(--green); margin-top: 10px; font-weight: 500; }
.quick-facts { list-style: none; }
.quick-facts li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #f0f0f0; font-size: .85rem; }
.quick-facts li:last-child { border-bottom: none; }
.quick-facts span { color: var(--muted); }
.quick-facts strong { color: var(--dark); }

/* ========== SPECS TABLE ========== */
.spec-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: .875rem; }
.spec-table th, .spec-table td { padding: 10px 14px; border: 1px solid var(--border); text-align: left; }
.spec-table th { background: var(--bg); color: var(--dark); font-weight: 600; width: 180px; }
.spec-table tr:nth-child(even) td { background: #fafafa; }

/* ========== HIGHLIGHTS ========== */
.highlight-list { list-style: none; margin-bottom: 20px; display: flex; flex-direction: column; gap: 10px; }
.highlight-list li { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--body); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; }
.highlight-list li span { color: var(--green); font-weight: 700; flex-shrink: 0; }

/* ========== AD SLOTS ========== */
.ad-slot { display: flex; justify-content: center; align-items: center; margin: 16px 0; max-width: none; padding: 0 12px; overflow: hidden; }
.ad-slot:empty { display: none; }
.ad-sidebar { display: block; margin: 20px; padding: 0; }
.ad-footer { margin-bottom: 0; }

/* ========== SEARCH DROPDOWN ========== */
.search-dropdown { position: absolute; top: 46px; left: 0; right: 0; background: var(--white); border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.15); z-index: 200; overflow: hidden; }
.search-dropdown a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; text-decoration: none; color: var(--dark); border-bottom: 1px solid #f0f0f0; }
.search-dropdown a:last-child { border-bottom: none; }
.search-dropdown a:hover, .search-dropdown a.sd-active { background: var(--bg); text-decoration: none; }
.search-dropdown .sd-icon { width: 36px; height: 36px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; color: #fff; background: var(--corporate-gradient); flex-shrink: 0; overflow: hidden; }
.search-dropdown .sd-icon img { width: 100%; height: 100%; object-fit: cover; }
.search-dropdown .sd-title { font-size: .85rem; font-weight: 600; }
.search-dropdown .sd-cat { font-size: .75rem; color: var(--muted); }
.search-dropdown .sd-empty { padding: 14px; text-align: center; color: var(--muted); font-size: .85rem; }

/* ========== FORM GROUP (frontend) ========== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .85rem; font-weight: 500; color: var(--dark); margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); font-size: .875rem; font-family: inherit; outline: none; transition: border-color .2s; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--green-light); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-check { display: flex; align-items: center; gap: 8px; font-size: .875rem; }
.form-check input { width: auto; }

/* ========== REVIEWS ========== */
.review-form { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }
.star-input { display: flex; align-items: center; gap: 4px; flex-direction: row-reverse; justify-content: flex-end; margin-bottom: 12px; }
.star-input input { display: none; }
.star-input label { font-size: 1.75rem; color: #ddd; cursor: pointer; transition: color .15s; line-height: 1; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--star); }
.review-input { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); font-size: .875rem; font-family: inherit; margin-bottom: 12px; outline: none; }
.review-input:focus { border-color: var(--green-light); }
.review-textarea { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); font-size: .875rem; font-family: inherit; margin-bottom: 16px; outline: none; resize: vertical; }
.review-textarea:focus { border-color: var(--green-light); }
.review-list { display: flex; flex-direction: column; gap: 16px; }
.review-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; }
.review-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.review-head strong { font-size: .9rem; color: var(--dark); }
.review-stars span { color: #ddd; font-size: .9rem; }
.review-stars span.on { color: var(--star); }
.review-date { font-size: .75rem; color: var(--muted); margin-left: auto; }
.review-title { font-size: .9rem; font-weight: 600; color: var(--dark); margin-bottom: 4px; }
.review-body { font-size: .875rem; color: var(--body); line-height: 1.6; }

/* ========== APP DETAIL / EDITORIAL RESPONSIVE ========== */
.detail-card, .detail-body, .detail-main, .detail-info, .detail-columns { min-width: 0; max-width: 100%; }
.detail-stats, .detail-badges, .share-row, .quick-facts li { flex-wrap: wrap; }
.detail-body h1, .detail-body h2, .detail-body h3, .detail-info h1, .spec-table td, .highlight-list li { overflow-wrap: anywhere; }
.spec-table { table-layout: fixed; }
.spec-table td, .spec-table th { word-break: break-word; }
.proscons-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.preview-grid img { width: 100%; height: auto; }
.preview-note { font-size: .75rem; color: var(--muted); margin-top: 8px; }
.test-notes { line-height: 1.7; }
.review-meta { font-size: .78rem; color: var(--muted); margin-top: 8px; }
.btn-download-lg { max-width: 100%; white-space: normal; text-align: center; }
.breadcrumb { overflow-wrap: anywhere; }

@media (max-width: 768px) {
  .detail-card { width: 100% !important; }
  .detail-columns { grid-template-columns: 1fr !important; gap: 16px; }
  .detail-head { gap: 14px; }
  .proscons-grid { grid-template-columns: 1fr; gap: 10px; }
  .preview-grid { grid-template-columns: 1fr; }
  .side-card { padding: 16px; }
  .spec-table th { width: 110px; }
  .review-meta { text-align: center; }
  .detail-body p, .test-notes { font-size: .9rem; }
  .share-row { gap: 6px; }
}

@media (max-width: 480px) {
  .detail-card { padding: 16px 12px !important; }
  .detail-icon, .detail-icon img { width: 72px; height: 72px; }
  .detail-info h1 { font-size: 1.2rem; }
  .detail-stats, .detail-badges { justify-content: flex-start; gap: 6px 10px; }
  .btn-download-lg { width: 100%; justify-content: center; }
  .spec-table th, .spec-table td { padding: 8px; font-size: .78rem; }
  .spec-table th { width: 92px; }
  .app-grid-4, .app-grid { grid-template-columns: 1fr; }
  .preview-grid { grid-template-columns: 1fr; }
  .top-list-item { gap: 8px; }
}

/* ========== MOBILE NAVBAR (logo | auth / categories | centered search) ========== */
.cat-menu-label { display: none; }

@media (max-width: 768px) {
  .header .container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas:
      "logo logo auth"
      "cats spacer search"
      "form form form";
    align-items: center;
    column-gap: 8px;
    row-gap: 6px;
    padding: 8px 12px;
  }
  .header .container > .logo { grid-area: logo; justify-self: start; min-width: 0; }
  .header .header-nav {
    grid-area: auth;
    justify-self: end;
    display: flex;
    width: auto;
    max-width: none;
    overflow: visible;
    padding: 0;
    gap: 8px;
    align-items: center;
    white-space: nowrap;
  }
  .header .hamburger {
    grid-area: cats;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    font-size: .8rem;
    font-weight: 600;
    color: var(--dark);
  }
  .cat-menu-icon { font-size: 1.05rem; line-height: 1; }
  .cat-menu-label { display: inline; }
  .header .search-toggle {
    grid-area: search;
    justify-self: end;
    margin: 0;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 8px;
  }
  .header .search-form { grid-area: form; position: relative; left: auto; transform: none; width: 100%; display: none; margin-top: 2px; }
  .header .search-form.open { display: flex; }
  .header-links, .header .nav-admin { display: none !important; }
  .header .nav-login { font-size: .82rem; font-weight: 600; padding: 6px 2px; }
  .header .nav-register {
    background: var(--green);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: .82rem;
  }
  .header .nav-register:hover { color: #fff; text-decoration: none; }
  .header .nav-logout button { font-size: .82rem; font-weight: 600; }
}

@media (max-width: 480px) {
  .header .hamburger { padding: 6px 8px; gap: 4px; }
  .cat-menu-label { font-size: .74rem; }
  .header .nav-login, .header .nav-register { font-size: .78rem; }
  .header .nav-register { padding: 7px 10px; }
  .header .search-toggle { width: 34px; height: 34px; }
}

/* ========== SOFT CATEGORY DRAWER ========== */
.sidebar-title.section-label { margin: 14px 18px 8px; padding: 0; font-size: .68rem; color: #64748b; }
.sidebar-list { padding: 0 10px; }
.sidebar-list li { margin-bottom: 6px; }
.sidebar-list li a {
  border-radius: 12px;
  padding: 9px 10px;
  gap: 11px;
  border-left: none;
  background: #fff;
  color: #334155;
  font-weight: 500;
  transition: background .18s ease, transform .18s ease;
}
.sidebar-list li a:hover { background: #f1f8f6; transform: translateX(2px); text-decoration: none; }
.cat-tile {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #eef6f4;
  color: #0f766e;
  overflow: hidden;
}
.cat-tile .sidebar-icon-img { width: 24px; height: 24px; object-fit: contain; background: #fff; border-radius: 6px; padding: 2px; }
.cat-tile .sidebar-icon { font-size: 1.02rem; line-height: 1; }
.cat-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-count {
  margin-left: auto;
  background: #eef6f4;
  color: #0f766e;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .72rem;
}
.sidebar-list li a.active { background: #e6f4f1; color: #0f766e; font-weight: 600; border-left: 3px solid #0d9488; padding-left: 7px; }
.sidebar-list li a.active .cat-tile, .sidebar-list li a.active .sidebar-count { background: #d9efe9; }
.platform-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.platform-list li { margin-bottom: 0; }
.platform-list li a { padding: 8px; gap: 8px; }
.platform-list .cat-tile { width: 28px; height: 28px; flex-basis: 28px; border-radius: 8px; }
.platform-list .sidebar-icon { font-size: .95rem; }
.platform-list .cat-name { font-size: .8rem; }

/* ========== NAVBAR: APPS MENU + AUTH BUTTONS ========== */
.apps-menu { position: relative; }
.apps-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  color: var(--dark);
  font-size: .86rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.apps-menu-btn > svg { width: 16px; height: 16px; fill: var(--green); }
.apps-menu-btn .apps-chevron { width: 13px; height: 13px; fill: var(--muted); transition: transform .2s ease; }
.apps-menu.open .apps-chevron { transform: rotate(180deg); }
.apps-menu-btn:hover { background: #f0fdfa; border-color: var(--green); }
.apps-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 460px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(15,23,42,.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
  z-index: 300;
}
.apps-menu.open .apps-menu-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.apps-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 6px 12px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.apps-panel-head strong { display: block; font-size: .92rem; color: var(--dark); }
.apps-panel-head span { display: block; font-size: .74rem; color: var(--muted); }
.apps-panel-head a { font-size: .78rem; font-weight: 600; color: var(--green); text-decoration: none; white-space: nowrap; }
.apps-panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 330px; overflow-y: auto; }
.apps-panel-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; color: var(--dark); text-decoration: none; }
.apps-panel-item:hover { background: #f1f8f6; text-decoration: none; }
.apps-panel-icon { width: 34px; height: 34px; flex: 0 0 34px; display: flex; align-items: center; justify-content: center; border-radius: 9px; background: #eef6f4; color: #0f766e; font-size: .68rem; font-weight: 700; overflow: hidden; }
.apps-panel-icon img { width: 100%; height: 100%; object-fit: contain; padding: 4px; background: #fff; }
.apps-panel-info { min-width: 0; display: flex; flex-direction: column; }
.apps-panel-info strong { font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apps-panel-info small { font-size: .7rem; color: var(--muted); }
.apps-panel-all { display: block; text-align: center; margin-top: 10px; padding: 9px; border-radius: 9px; background: #eef6f4; color: #0f766e; font-size: .82rem; font-weight: 600; text-decoration: none; }
.header-nav .nav-login {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border: 1px solid var(--border); border-radius: 9px;
  background: #fff; color: var(--dark); font-size: .86rem; font-weight: 600; text-decoration: none;
  transition: background .2s ease, border-color .2s ease;
}
.header-nav .nav-login svg { width: 15px; height: 15px; fill: var(--green); }
.header-nav .nav-login:hover { background: #f0fdfa; border-color: var(--green); text-decoration: none; }
.header-nav .nav-register {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 9px;
  background: linear-gradient(135deg, #0d9488, #059669);
  color: #fff; font-size: .86rem; font-weight: 600; text-decoration: none;
  box-shadow: 0 4px 12px rgba(13,148,136,.25);
  transition: transform .2s ease, box-shadow .2s ease;
}
.header-nav .nav-register svg { width: 15px; height: 15px; stroke: #fff; }
.header-nav .nav-register:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(13,148,136,.35); color: #fff; text-decoration: none; }
.header-nav .nav-logout button { border: 1px solid var(--border); border-radius: 9px; padding: 8px 14px; background: #fff; font-size: .86rem; font-weight: 600; cursor: pointer; font-family: inherit; }

@media (max-width: 768px) {
  .apps-menu { display: none !important; }
  .header .nav-login { padding: 6px 2px; font-size: .82rem; border: none; background: none; }
  .header .nav-register { padding: 8px 12px; font-size: .82rem; box-shadow: none; }
  .header .nav-login svg, .header .nav-register svg { display: none; }
}
