/*
Theme Name:  AppsTorrent
Theme URI:   https://appstorrent.org
Description: AppsTorrent — macOS software download theme. Custom post types: game, program, extension, os.
Version:     1.0.0
Author:      AppsTorrent
Text Domain: appstorrent
License:     GPL-2.0-or-later
*/

/* ═══════════════════════════════════════════════════
   CSS CUSTOM PROPERTIES
   ═══════════════════════════════════════════════════ */
:root {
  --bg:          #1e1e1e;
  --s1:          #262626;
  --s2:          #2e2e2e;
  --s3:          #363636;
  --s4:          #4e4e4e;
  --muted:       #8e8e8e;
  --blue:        #0080ff;
  --blue-h:      #409fff;
  --green:       #00ab00;
  --green-h:     #29b829;
  --red:         #ff5050;
  --orange:      #f90;
  --header-h:    56px;
  --sidebar-w:   260px;
  --content-max: 1400px;
  --radius:      12px;
  --tr:          all .2s ease;
}

/* ═══════════════════════════════════════════════════
   RESET
   ═══════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { height: 100%; scroll-behavior: smooth; }
/* Base font — set on body so it cascades normally.
   Do NOT use html* with !important — that overrides Font Awesome's font-family
   which FA sets with !important on .fa,.fas,.far etc elements. */
body  {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}
ol, ul  { list-style: none; }
hr      { background: var(--s2); border: 0; height: 1px; }
img     { max-width: 100%; height: auto; display: block; }
a       { color: var(--blue-h); cursor: pointer; text-decoration: none; transition: var(--tr); }
a:hover { color: var(--blue-h); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 3px; }
a:focus, a:active { outline: 0; }
button { cursor: pointer; }

/* Scrollbar */
::-webkit-scrollbar              { width: 5px; height: 5px; }
::-webkit-scrollbar-track        { background: var(--bg); }
::-webkit-scrollbar-thumb        { background: var(--s3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover  { background: var(--s4); }

.screen-reader-text {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px,1px,1px,1px);
  clip-path: inset(50%);
  word-wrap: normal; white-space: nowrap;
}
/* Skip link — must be FOCUSABLE (PageSpeed Lighthouse requirement) */
.skip-link {
  position: absolute;
  top: -100px;       /* off-screen by default */
  left: 12px;
  z-index: 99999;
  background: var(--blue);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 8px 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus {
  top: 0;            /* slides down into view when focused via keyboard */
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════
   HEADER  (fixed top bar, full width)
   ═══════════════════════════════════════════════════ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h); z-index: 9000;
  background: var(--s1);
  border-bottom: 1px solid var(--s2);
}
.header-inner {
  display: flex; align-items: center; gap: 12px;
  height: 100%; padding: 0 20px;
  max-width: var(--content-max); margin: 0 auto;
}

/* Logo */
.header-logo-link {
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0; text-decoration: none; min-width: 0;
}
.header-logo-link:hover  { text-decoration: none; }
.header-site-icon        { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; flex-shrink: 0; }
.header-site-name        { font-size: 16px; font-weight: 700; color: #fff; white-space: nowrap; }

/* Search bar */
.header-search      { flex: 1; max-width: 440px; }
.header-search form { position: relative; display: flex; align-items: center; }
.header-search .search-icon {
  position: absolute; left: 11px; color: var(--muted); pointer-events: none; flex-shrink: 0;
}
.header-search input[type="search"] {
  width: 100%; background: var(--bg); border: 1px solid var(--s3); border-radius: 99px;
  padding: 8px 14px 8px 34px; color: #fff; font-size: 13px; outline: none;
  transition: border-color .2s;
}
.header-search input[type="search"]:focus       { border-color: var(--blue); }
.header-search input[type="search"]::placeholder { color: var(--muted); }
.header-spacer  { flex: 1; }

/* ═══════════════════════════════════════════════════
   PAGE SHELL  (sidebar + main)
   ═══════════════════════════════════════════════════ */
.site-shell {
  display: flex;
  margin-top: var(--header-h);
  min-height: calc(100vh - var(--header-h));
  overflow-x: hidden; /* prevent any child from breaking out */
  max-width: 100vw;
}

/* ═══════════════════════════════════════════════════
   SIDEBAR  (left navigation)
   ═══════════════════════════════════════════════════ */
.cm-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--s1);
  border-right: 1px solid var(--s2);
  /* smooth transition for hide/show */
  transition: width .25s ease, transform .25s ease;
}
.container-inner {
  display: flex; flex-direction: column;
  height: 100%; padding: 16px 0;
  min-width: var(--sidebar-w);
}

/* Sidebar brand */
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 0 18px 16px; text-decoration: none;
}
.sidebar-brand:hover { text-decoration: none; }
.sidebar-brand-icon {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.sidebar-brand-icon img  { width: 22px; height: 22px; object-fit: contain; }
.sidebar-brand-text      { font-size: 14px; font-weight: 700; color: #fff; white-space: nowrap; }

/* Nav items */
.nav-menu ul, .nav-menu > ul { padding: 0; margin: 0; }
.nav-menu li { list-style: none; }
.nav-menu li a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 18px; color: var(--muted); font-size: 13.5px; font-weight: 500;
  text-decoration: none; transition: background .15s, color .15s;
  white-space: nowrap;
}
.nav-menu li a:hover,
.nav-menu li.current-menu-item > a,
.nav-menu li.current-menu-parent > a {
  background: rgba(0,128,255,.1); color: #fff; text-decoration: none;
}
.nav-menu li a img        { width: 18px; height: 18px; object-fit: contain; opacity: .65; flex-shrink: 0; }
.nav-menu li.current-menu-item > a img  { opacity: 1; }
.nav-menu .body-2         { font-size: 13.5px; }

/* Dropdown */
.nav-combi          { position: relative; }
.nav-combi > a      { flex: 1; }
.nav-dropbtn {
  background: none; border: none; color: var(--muted); cursor: pointer;
  padding: 8px 12px; display: flex; align-items: center; transition: color .15s;
}
.nav-dropbtn:hover  { color: #fff; }
.nav-dropdown       { display: none; background: rgba(0,0,0,.15); }
.nav-dropdown.show  { display: block; }
.nav-dropdown li a  { padding-left: 46px; font-size: 13px; }

/* Sidebar footer */
.sidebar-footer {
  margin-top: auto; padding: 14px 18px;
  border-top: 1px solid var(--s2);
}
.sidebar-footer .don { font-size: 11px; line-height: 1.7; }
.sidebar-footer a    { color: var(--muted); }
.sidebar-footer a:hover { color: #fff; }

/* ═══════════════════════════════════════════════════
   MAIN CONTENT AREA
   ═══════════════════════════════════════════════════ */
.cm-main {
  flex: 1;
  min-width: 0;
  padding: 20px 24px 48px;
  max-width: 100%;
  overflow-x: hidden; /* critical: clips child overflow */
  width: 0; /* flex item trick: allows it to shrink below content size */
}

/* ═══════════════════════════════════════════════════
   FRONT PAGE
   ═══════════════════════════════════════════════════ */
.home-section-box { margin-bottom: 36px; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--s2);
  gap: 8px;
}
.section-title-text {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 700; color: #fff;
  white-space: nowrap;
}
.section-title-text img { opacity: .8; width: 18px; height: 18px; flex-shrink: 0; }
.btn-see-all {
  font-size: 12px; color: var(--blue-h);
  background: rgba(0,128,255,.1); border-radius: 99px;
  padding: 5px 14px; text-decoration: none; transition: background .15s;
  white-space: nowrap; flex-shrink: 0;
}
.btn-see-all:hover { background: rgba(0,128,255,.2); text-decoration: none; }

/* ═══════════════════════════════════════════════════
   CARD GRID  (app tiles)
   ═══════════════════════════════════════════════════ */
/* ── Card grid — fills the content area width properly ── */
.modern-grid, .card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

/* ── Card — vertical layout matching real appstorrent.org style ── */
.modern-card, .soft-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  background: var(--s1);
  border-radius: var(--radius);
  border: 1px solid var(--s2);
  padding: 16px 14px 14px;
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
  overflow: hidden;
  min-width: 0;
  position: relative;
}
.modern-card:hover, .soft-item:hover {
  border-color: var(--blue);
  background: var(--s2);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  text-decoration: none;
}

/* ── Card icon — large, square, centered ── */
.card-icon-wrap {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  margin-bottom: 12px;
}
.card-icon-wrap img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}
.placeholder-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: var(--s3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.placeholder-icon::after {
  content: '';
  width: 28px; height: 28px;
  background: var(--s4);
  border-radius: 6px;
}

/* ── Card text ── */
.card-info {
  flex: 1;
  min-width: 0;
  width: 100%;
}
.card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
  margin-bottom: 5px;
  word-break: break-word;
}
.card-ver {
  font-size: 11.5px;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}

/* ── Card badges (NEW / UPDATED) ── */
.card-badge {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 2px 8px;
  border-radius: 10px;
  line-height: 1.7;
  white-space: nowrap;
  margin-top: 2px;
}
.card-badge-new {
  background: linear-gradient(135deg,#00c853,#69f0ae);
  color: #003300;
  animation: card-badge-pulse 2.5s ease-in-out infinite;
}
@keyframes card-badge-pulse {
  0%,100% { box-shadow: 0 0 6px rgba(0,200,83,.4); }
  50%      { box-shadow: 0 0 12px rgba(0,200,83,.7); }
}
.card-badge-updated {
  background: linear-gradient(135deg,#00d9ff,#0099bb);
  color: #001a22;
}
@media(prefers-reduced-motion:reduce) { .card-badge-new { animation:none; } }

/* ═══════════════════════════════════════════════════
   ARCHIVE / CATEGORY
   ═══════════════════════════════════════════════════ */
.page-grid          { grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); }
.pagination-wrap    { margin-top: 24px; text-align: center; }
.pagination-wrap ul { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.pagination-wrap li a,
.pagination-wrap li span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px;
  border-radius: 8px; font-size: 13px; font-weight: 600;
  background: var(--s1); border: 1px solid var(--s2); color: var(--muted);
  text-decoration: none; transition: background .15s, color .15s;
}
.pagination-wrap li span.current { background: var(--blue); color: #fff; border-color: var(--blue); }
.pagination-wrap li a:hover      { background: var(--s2); color: #fff; text-decoration: none; }
.no-posts-msg { color: var(--muted); font-size: 14px; padding: 16px 0; }

/* ═══════════════════════════════════════════════════
   SINGLE POST  (2-column grid)
   ═══════════════════════════════════════════════════ */

/* Background blur effect */
.bg_cover         { position: relative; }
.bg_cover::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: var(--bg-img, none) center/cover no-repeat;
  filter: blur(80px) brightness(.25);
  opacity: .6;
}

/* Breadcrumb */
.page-breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: 5px;
  font-size: 12px; color: var(--muted);
  padding: 10px 0 6px; position: relative; z-index: 1;
}
.page-breadcrumb a              { color: var(--muted); transition: color .15s; }
.page-breadcrumb a:hover        { color: #fff; text-decoration: none; }
.page-breadcrumb span[aria-current] { color: var(--muted); }

/* Post title row */
.title.page.main-title { position: relative; z-index: 1; }

/* Main 2-column layout */
.main-post {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  position: relative; z-index: 1;
  align-items: start;
}
.main-post .content { min-width: 0; }

/* Right sidebar panel */
.right           { width: 300px; flex-shrink: 0; }
.right-container {
  background: var(--s1); border-radius: var(--radius); border: 1px solid var(--s2);
  padding: 16px; margin-bottom: 12px;
}
.block-info { display: flex; flex-direction: column; gap: 8px; }

/* Details / requirements box */
.requirements-box {
  background: var(--s1); border-radius: var(--radius); border: 1px solid var(--s2);
  padding: 16px; margin-bottom: 12px;
}
.requirements-box h3   { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.req-grid-container    { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.req-grid-item         { display: flex; align-items: flex-start; gap: 10px; }
.req-icon-box {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(0,128,255,.12);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.req-info-box { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.req-label    { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.req-value    { font-size: 12px; color: #fff; font-weight: 600; word-break: break-word; line-height: 1.3; }

/* Download links */
.download-links-grid { display: flex; flex-direction: column; gap: 8px; }

/* ═══════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════ */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: none;
  font-size: 14px; font-weight: 700; cursor: pointer;
  text-decoration: none; transition: var(--tr); line-height: 1;
  white-space: nowrap;
}
.button:hover               { text-decoration: none; }
.button.blue                { background: var(--blue);  color: #fff; }
.button.blue:hover          { background: var(--blue-h);color: #fff; }
.button.green,.button.btn-green { background: var(--green); color: #fff; }
.button.green:hover         { background: var(--green-h); color: #fff; }
.button.gray                { background: var(--s3); color: #fff; }
.button.gray:hover          { background: var(--s4); color: #fff; }
.button.big-slider          { padding: 12px 20px; font-size: 14px; border-radius: var(--radius); width: 100%; }
.button.w100                { width: 100%; }

/* ═══════════════════════════════════════════════════
   TABS
   ═══════════════════════════════════════════════════ */
.tabs-nav-container  { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tabs-nav-container::-webkit-scrollbar { display: none; }
.tabs-nav {
  display: flex; list-style: none; padding: 0;
  border-bottom: 1px solid var(--s4); min-width: max-content;
}
.tab-link {
  background: transparent; border: none; border-bottom: 2px solid transparent;
  color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 13px 18px; font-family: inherit;
  transition: color .15s, border-color .15s; white-space: nowrap;
}
.tab-link.active,
.tab-link:focus-visible { color: #fff; border-bottom-color: var(--blue); outline: none; }
.tab-content        { display: none; }
.tab-content.active { display: block; }

/* ═══════════════════════════════════════════════════
   ENTRY CONTENT
   ═══════════════════════════════════════════════════ */
.entry-content {
  color: var(--muted); font-size: 14px; line-height: 1.75;
}
.entry-content h1,.entry-content h2,.entry-content h3 { color: #fff; margin: 1.1em 0 .5em; }
.entry-content p          { margin-bottom: .9em; }
.entry-content strong     { color: #fff; }
.entry-content a          { color: var(--blue-h); }
.entry-content img        { border-radius: 8px; margin: 6px 0; max-width: 100%; }
.entry-content ul,.entry-content ol { padding-left: 18px; margin-bottom: .9em; }
.entry-content li         { margin-bottom: .35em; }
.entry-content pre,.entry-content code { background: var(--s2); border-radius: 5px; padding: 2px 6px; font-size: 12px; }
.entry-content blockquote { border-left: 3px solid var(--blue); padding-left: 14px; margin: 14px 0; }

/* ═══════════════════════════════════════════════════
   SPOILER / COLLAPSIBLE
   ═══════════════════════════════════════════════════ */
.spoiler-block {
  background: var(--s1); border-radius: var(--radius); border: 1px solid var(--s2);
  margin-top: 12px; overflow: hidden;
}
.spoiler-body { padding: 0 18px 16px; }

/* ═══════════════════════════════════════════════════
   FAQ ACCORDION
   ═══════════════════════════════════════════════════ */
.faq-block   { padding: 0; }
.faq-list    { display: flex; flex-direction: column; }
.faq-question { display: block; }
/* Height animated by JS via scrollHeight */

/* ═══════════════════════════════════════════════════
   BLOCK-FAV / TECH INFO / RELATED
   ═══════════════════════════════════════════════════ */
.block-fav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-top: 1px solid var(--s2); margin-top: 10px;
  gap: 8px; flex-wrap: wrap;
}
.fav-button:hover,.fav-button.fav-active { color: var(--blue-h); opacity: 1 !important; }
.fav-button.fav-active svg { fill: currentColor; }
.tech-info    { padding: 8px 0; }
.tech-wrapper { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.related-news { margin-top: 14px; }
.plugins-mini a:hover { background: var(--s2) !important; }

/* ═══════════════════════════════════════════════════
   SCREENSHOTS / SWIPER
   ═══════════════════════════════════════════════════ */
.screenshots      { border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.swiper-container { width: 100%; }
.swiper-button-prev,.swiper-button-next {
  background: rgba(0,0,0,.6); border-radius: 50%;
  width: 34px !important; height: 34px !important; color: #fff !important;
}
.swiper-button-prev::after,.swiper-button-next::after { font-size: 13px !important; }
.swiper-pagination-bullet        { background: #fff !important; opacity: .45 !important; }
.swiper-pagination-bullet-active { opacity: 1 !important; }

/* Lightbox */
.cm-lightbox {
  display: none; position: fixed; inset: 0; z-index: 99999;
  background: rgba(0,0,0,.92); align-items: center; justify-content: center;
}
.cm-lightbox.active { display: flex; }
.cm-lightbox img    { max-width: 94vw; max-height: 92vh; border-radius: 8px; object-fit: contain; }
.lb-close {
  position: absolute; top: 18px; right: 18px;
  background: rgba(255,255,255,.1); border: none; color: #fff;
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ═══════════════════════════════════════════════════
   SEARCH PAGE
   ═══════════════════════════════════════════════════ */
.cm-header { padding-bottom: 14px; border-bottom: 1px solid var(--s2); margin-bottom: 18px; }
.cm-header-search form { position: relative; display: flex; align-items: center; max-width: 480px; }
.cm-header-search .search-icon { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.cm-header-search input[type="search"] {
  width: 100%; background: var(--s1); border: 1px solid var(--s2); border-radius: 99px;
  padding: 9px 14px 9px 36px; color: #fff; font-size: 13px; outline: none;
}
.cm-header-search input:focus { border-color: var(--blue); }

/* ═══════════════════════════════════════════════════
   404
   ═══════════════════════════════════════════════════ */
.page-404    { text-align: center; padding: 60px 20px; }
.error-num   { font-size: 100px; font-weight: 900; color: var(--s3); line-height: 1; margin-bottom: 16px; }
.page-404 h1 { color: #fff; font-size: 24px; margin-bottom: 10px; }
.page-404 p  { color: var(--muted); margin-bottom: 20px; }

/* ═══════════════════════════════════════════════════
   DOWNLOAD PAGE
   ═══════════════════════════════════════════════════ */
.dl-page-wrap   { max-width: 580px; margin: 0 auto; padding: 20px 0 40px; }
.dl-breadcrumb  {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted); margin-bottom: 16px;
}
.dl-breadcrumb a    { color: var(--muted); }
.dl-breadcrumb a:hover { color: #fff; }
.dl-card        { background: var(--s1); border-radius: 14px; border: 1px solid var(--s2); overflow: hidden; }
.dl-card-body   { padding: 20px; }
.dl-app-info    { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.dl-app-icon    { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; flex-shrink: 0; }
.dl-app-icon-placeholder {
  width: 64px; height: 64px; border-radius: 14px; background: var(--s2);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dl-app-title   { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 6px; line-height: 1.2; }
.dl-meta-pills  { display: flex; flex-wrap: wrap; gap: 5px; }
.dl-pill        { background: var(--s2); border-radius: 99px; padding: 3px 10px; font-size: 11px; color: var(--muted); }
.dl-action      { display: flex; justify-content: center; width: 100%; }
.dl-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: var(--radius); font-size: 15px; font-weight: 700;
  color: #fff; text-decoration: none; transition: filter .15s; width: 100%;
}
.dl-btn:hover   { filter: brightness(1.1); text-decoration: none; color: #fff; }
.dl-multi       { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.dl-official-link { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.dl-official-link:hover { color: #fff; }
.dl-card-footer {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  padding: 12px 20px; background: var(--bg); border-top: 1px solid var(--s2); font-size: 12px;
}
.dl-foot-item   { display: flex; align-items: center; gap: 5px; color: var(--muted); }
.dl-foot-secure { color: var(--green); }
.dl-foot-label  { color: var(--s4); }
.dl-alt-section {
  padding: 12px 20px; border-top: 1px solid var(--s2);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.dl-alt-label   { font-size: 12px; color: var(--muted); }
.dl-alt-btn {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px;
  color: var(--blue-h); background: rgba(0,128,255,.1); padding: 5px 12px; border-radius: 99px;
}
.dl-alt-btn:hover  { background: rgba(0,128,255,.2); text-decoration: none; }
.dl-no-link        { color: var(--muted); font-size: 14px; padding: 20px; text-align: center; }
.dl-back-link      { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.dl-back-link:hover { color: #fff; }

/* ═══════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════ */
.site-footer {
  background: var(--s1); border-top: 1px solid var(--s2);
  padding: 18px 24px;
}
.footer-inner {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 12px; justify-content: space-between;
  max-width: var(--content-max); margin: 0 auto;
}
.footer-logo       { display: flex; align-items: center; gap: 8px; }
.footer-logo img   { width: 22px; height: 22px; border-radius: 5px; }
.footer-logo span  { font-size: 13px; font-weight: 700; color: #fff; }
ul.footer-menu     { display: flex; flex-wrap: wrap; gap: 3px 14px; list-style: none; padding: 0; }
ul.footer-menu li a { font-size: 12px; color: var(--muted); }
ul.footer-menu li a:hover { color: #fff; text-decoration: none; }
.footer-copy       { font-size: 11px; color: var(--s4); }

/* ═══════════════════════════════════════════════════
   LANGUAGE SWITCHER
   ═══════════════════════════════════════════════════ */
.lang-switcher { position: relative; flex-shrink: 0; }
.lang-trigger {
  display: flex; align-items: center; gap: 5px; cursor: pointer;
  padding: 5px 9px; border-radius: 7px; border: 1px solid var(--s2);
  background: var(--s1); transition: border-color .15s; user-select: none;
}
.lang-trigger:hover { border-color: var(--s4); }
.lang-code          { font-size: 12px; font-weight: 600; color: #fff; }
.lang-chevron       { color: var(--muted); transition: transform .2s; }
.lang-trigger[aria-expanded="true"] .lang-chevron { transform: rotate(180deg); }
.dropdown-lang-content {
  display: none; position: absolute; top: calc(100% + 5px); right: 0;
  background: var(--s1); border: 1px solid var(--s2); border-radius: 10px;
  padding: 4px; min-width: 170px; z-index: 9999;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
}
.dropdown-lang-content.show { display: block; }
.dropdown-lang-content [data-google-lang] {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 7px; font-size: 13px; color: var(--muted);
  cursor: pointer; transition: background .12s, color .12s; text-decoration: none;
}
.dropdown-lang-content [data-google-lang]:hover            { background: var(--s2); color: #fff; }
.dropdown-lang-content [data-google-lang].language__active { color: var(--blue-h); background: rgba(0,128,255,.1); }

/* ═══════════════════════════════════════════════════
   MOBILE MENU TOGGLE + SLIDE NAV
   ═══════════════════════════════════════════════════ */
.mobile-menu-toggle {
  display: none; background: none; border: 1px solid var(--s2); color: var(--muted);
  border-radius: 8px; padding: 7px; cursor: pointer;
  align-items: center; justify-content: center; flex-shrink: 0;
}
.mobile-menu-toggle:hover { color: #fff; border-color: var(--s4); }
.mobile-nav-panel {
  background: var(--s1); border-bottom: 1px solid var(--s2);
  padding: 12px 16px;
}
.mobile-menu-list         { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; padding: 0; }
.mobile-menu-list li a {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 12px; border-radius: 8px; font-size: 13px; color: var(--muted);
  text-decoration: none; transition: background .12s, color .12s;
}
.mobile-menu-list li a:hover { background: var(--s2); color: #fff; text-decoration: none; }
.mobile-lang-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* ═══════════════════════════════════════════════════
   MISC UTILITIES
   ═══════════════════════════════════════════════════ */
.spoiler-content { display: none; }
.spoiler-btn {
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer; color: var(--blue-h); font-size: 13px;
  background: none; border: none; padding: 4px 0; font-family: inherit;
}
.notranslate, [translate="no"] { -webkit-user-select: text; user-select: text; }

/* ═══════════════════════════════════════════════════
   RESPONSIVE — 1280px  large tablet / small laptop
   ═══════════════════════════════════════════════════ */
@media (max-width: 1280px) {
  :root { --sidebar-w: 230px; }
  .main-post { grid-template-columns: 1fr 280px; gap: 18px; }
  .right      { width: 280px; }
  .modern-grid,.card-grid { grid-template-columns: repeat(auto-fill, minmax(190px,1fr)); gap: 12px; }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE — 1024px  iPad landscape / small laptop
   ═══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  :root { --sidebar-w: 200px; }
  .cm-main { padding: 18px 18px 40px; }
  .main-post { grid-template-columns: 1fr 260px; gap: 16px; }
  .right     { width: 260px; }
  .req-grid-container { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE — 900px  tablet portrait / hide sidebar
   ═══════════════════════════════════════════════════ */
@media (max-width: 900px) {
  /* Show hamburger, hide desktop sidebar */
  .mobile-menu-toggle { display: inline-flex; }
  .cm-sidebar         { display: none; }

  /* Single post: 1-column, right sidebar on top */
  .main-post { grid-template-columns: 1fr; gap: 14px; }
  .right     { width: 100%; order: -1; }
  .right-container { padding: 14px; }

  /* Right sidebar block-info: 2-col button grid */
  .block-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  /* Green download CTA spans full width */
  .block-info > .button:first-child { grid-column: 1 / -1; }

  /* Details grid 2 cols */
  .req-grid-container { grid-template-columns: 1fr 1fr; gap: 10px; }

  /* Cards */
  .modern-grid,.card-grid { grid-template-columns: repeat(auto-fill, minmax(170px,1fr)); gap: 12px; }

  /* Header */
  .header-search { display: none; }
  .cm-main { padding: 14px 16px 36px; }
  .dl-page-wrap { padding: 14px 0 36px; }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE — 768px  tablet / large phone
   ═══════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .cm-main { padding: 12px 14px 32px; }

  /* Cards: 3 columns on tablets */
  .modern-grid,.card-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }

  /* Block-info: single col */
  .block-info { grid-template-columns: 1fr; }

  /* Details: single col */
  .req-grid-container { grid-template-columns: 1fr; }

  /* Section header compact */
  .section-title-text { font-size: 14px; }

  /* Post header adjustments */
  .page-breadcrumb { font-size: 11px; }

  /* Spoilers */
  .spoiler-block { margin-top: 10px; }
  .spoiler-body  { padding: 0 14px 14px; }

  /* FAQ */

  /* Download page */
  .dl-card-body  { padding: 16px; }
  .dl-app-icon,.dl-app-icon-placeholder { width: 56px; height: 56px; border-radius: 12px; }
  .dl-app-title  { font-size: 18px; }
  .dl-card-footer { padding: 12px 16px; }
  .dl-alt-section { padding: 12px 16px; }

  /* Footer: stack */
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE — 600px  phone landscape / large phone
   ═══════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .cm-main { padding: 10px 12px 28px; }

  /* Cards: 2 columns */
  .modern-grid,.card-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .card-icon-wrap img,.placeholder-icon { width: 54px; height: 54px; }

  /* Modals: full-width on phone */
  #GroupButton,#OlderVersions {
    width: 96vw !important;
    padding: 20px 16px !important;
  }

  /* Screenshots */
  .screenshots img { height: 220px !important; object-fit: cover; }

  /* Related posts truncate */
  .plugins-mini span { max-width: 100px !important; }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE — 480px  phone portrait
   ═══════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .cm-main { padding: 10px 10px 24px; }

  /* Header */
  .header-inner    { padding: 0 12px; gap: 8px; }
  .header-site-name { font-size: 14px; }

  /* Cards */
  .modern-grid,.card-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .modern-card,.soft-item { padding: 12px 10px 10px; }
  .card-icon-wrap img,.placeholder-icon { width: 48px; height: 48px; border-radius: 12px; }
  .card-title { font-size: 12.5px; }

  /* Buttons */
  .button.big-slider { padding: 11px 14px; font-size: 13px; }

  /* FAQ */

  /* Spoiler */
  .spoiler-body { padding: 0 12px 12px; }

  /* Screenshots */
  .screenshots img { height: 200px !important; }

  /* Requirements */
  .req-icon-box  { width: 28px; height: 28px; }
  .req-value     { font-size: 12px; }
  .req-label     { font-size: 10px; }

  /* Download page */
  .dl-app-title  { font-size: 16px; }
  .dl-pill       { font-size: 10px; padding: 3px 8px; }
  .dl-btn        { padding: 12px 16px; font-size: 14px; }

  /* Modal: bottom sheet on small phones */
  #GroupButton,#OlderVersions {
    width: 100vw !important;
    border-radius: 16px 16px 0 0 !important;
    top: auto !important; bottom: 0 !important;
    left: 0 !important; transform: none !important;
    max-height: 88vh !important;
    padding: 20px 16px 32px !important;
  }

  /* Breadcrumb */
  .page-breadcrumb { font-size: 10px; gap: 3px; }

  /* Tech wrapper */
  .tech-wrapper { gap: 8px 12px; }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE — 360px  very small phone (Galaxy S, Moto G)
   ═══════════════════════════════════════════════════ */
@media (max-width: 360px) {
  .cm-main { padding: 8px 8px 20px; }
  .header-inner { padding: 0 10px; gap: 6px; }
  .header-site-name { display: none; } /* only show icon on tiny screens */
  .modern-grid,.card-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .modern-card,.soft-item { padding: 10px 8px 8px; }
  .card-icon-wrap img,.placeholder-icon { width: 44px; height: 44px; border-radius: 10px; }
  .card-title { font-size: 12px; }
  .button.big-slider { font-size: 13px; padding: 10px 12px; }
}

/* ═══════════════════════════════════════════════════
   LANDSCAPE PHONE
   ═══════════════════════════════════════════════════ */
@media (max-height: 500px) and (orientation: landscape) {
  .cm-sidebar { height: calc(100vh - var(--header-h)); }
  #GroupButton,#OlderVersions {
    top: 3vh !important; max-height: 92vh !important;
  }
}

/* ═══════════════════════════════════════════════════
   HIGH-DPI / RETINA SCREENS
   ═══════════════════════════════════════════════════ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .card-icon-wrap img { image-rendering: -webkit-optimize-contrast; }
}

