/* ============================================================
   SpaceAPK — New Theme (Clean Light, Green Accent)
   ============================================================ */

/* --- Variables --- */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #16a34a;
  --accent-hover: #15803d;
  --accent-light: #dcfce7;
  --radius-card: 12px;
  --radius-btn: 8px;
  --shadow-card: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow-hover: 0 8px 25px rgba(0,0,0,.10);
  --header-h: 64px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

/* --- Reset / Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
ul, ol { list-style: none; padding: 0; margin: 0; }

/* ============================================================
   HEADER
   ============================================================ */
.tn-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  height: var(--header-h);
}
.tn-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}
.tn-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent);
  flex-shrink: 0;
}
.tn-logo img { height: 32px; width: auto; }

/* Search */
.tn-search {
  flex: 1;
  max-width: 520px;
  position: relative;
}
.tn-search form { display: flex; }
.tn-search input {
  width: 100%;
  height: 40px;
  border: 1.5px solid var(--border);
  border-radius: 20px 0 0 20px;
  padding: 0 16px;
  font-size: .9rem;
  font-family: var(--font);
  outline: none;
  background: var(--bg);
  transition: border-color .2s;
}
.tn-search input:focus { border-color: var(--accent); background: #fff; }
.tn-search button {
  height: 40px;
  padding: 0 18px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 0 20px 20px 0;
  cursor: pointer;
  font-size: .85rem;
  font-family: var(--font);
  font-weight: 600;
  transition: background .2s;
}
.tn-search button:hover { background: var(--accent-hover); }

/* Nav */
.tn-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.tn-nav a {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--muted);
  transition: color .2s, background .2s;
}
.tn-nav a:hover { color: var(--accent); background: var(--accent-light); }
.tn-nav a.active { color: var(--accent); background: var(--accent-light); }
.tn-nav a.tn-nav-cta {
  color: #fff;
  background: var(--accent);
}
.tn-nav a.tn-nav-cta:hover,
.tn-nav a.tn-nav-cta.active { color: #fff; background: var(--accent-hover); }

/* Burger */
.tn-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
  flex-direction: column;
  gap: 5px;
}
.tn-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .25s;
}

/* Mobile Drawer */
.tn-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}
.tn-drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.4);
  opacity: 0;
  transition: opacity .25s;
}
.tn-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: var(--surface);
  transform: translateX(100%);
  transition: transform .25s ease;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}
.tn-drawer.open { pointer-events: auto; }
.tn-drawer.open .tn-drawer-overlay { opacity: 1; }
.tn-drawer.open .tn-drawer-panel { transform: translateX(0); }
.tn-drawer-close {
  align-self: flex-end;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.tn-drawer-panel a {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  transition: background .2s;
}
.tn-drawer-panel a:hover { background: var(--bg); color: var(--accent); }
.tn-drawer-panel a.tn-nav-cta { background: var(--accent); color: #fff; text-align: center; }
.tn-drawer-panel a.tn-nav-cta:hover { background: var(--accent-hover); color: #fff; }

/* Search hint dropdown */
.search_hint {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-hover);
  z-index: 50;
  overflow: hidden;
  display: none;
}
.search_hint:not(:empty) { display: block; }

/* ============================================================
   LAYOUT WRAPPER
   ============================================================ */
.tn-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.tn-breadcrumbs {
  padding: 12px 0;
}
.tn-breadcrumbs .over {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  font-size: .825rem;
  color: var(--muted);
}
.tn-breadcrumbs .over span::after {
  content: '/';
  margin: 0 6px;
  opacity: .4;
}
.tn-breadcrumbs .over span:last-child::after { display: none; }
.tn-breadcrumbs a { color: var(--muted); transition: color .15s; }
.tn-breadcrumbs a:hover { color: var(--accent); }

/* ============================================================
   CATEGORY FILTER CHIPS
   ============================================================ */
.tn-cats {
  padding: 16px 0 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tn-cats::-webkit-scrollbar { display: none; }
.tn-cats-inner {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}
.tn-cat-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 500;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.tn-cat-chip:hover,
.tn-cat-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ============================================================
   APP GRID — MAIN / CATEGORY PAGES
   ============================================================ */
.tn-page-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 20px 0 16px;
  color: var(--text);
}
.tn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  padding-bottom: 32px;
}
@media (min-width: 640px)  { .tn-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); } }
@media (min-width: 1024px) { .tn-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); } }

/* App Card */
.tn-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  box-shadow: var(--shadow-card);
}
.tn-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.tn-card a { display: flex; flex-direction: column; height: 100%; }
.tn-card-img {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg);
}
.tn-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.tn-card:hover .tn-card-img img { transform: scale(1.04); }
.tn-card-body {
  padding: 10px 12px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tn-card-name {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tn-card-cat {
  font-size: .75rem;
  color: var(--muted);
}
.tn-card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  color: var(--muted);
}
.tn-card-views::before { content: '👁 '; }
.tn-card-comments { margin-left: auto; }
.tn-card-comments::before { content: '💬 '; }

/* Similar apps grid (post page) */
.tn-similar-apps {
  padding: 8px 0 40px;
}
.tn-similar-apps-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}
.tn-grid--similar {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 900px) {
  .tn-grid--similar { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .tn-grid--similar { grid-template-columns: repeat(2, 1fr); }
}

/* 404 page */
.tn-404 {
  text-align: center;
  padding: 64px 16px 80px;
  max-width: 560px;
  margin: 0 auto;
}
.tn-404-code {
  font-size: 5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
}
.tn-404-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 8px 0 12px;
  color: var(--text);
}
.tn-404-text {
  color: var(--muted);
  margin-bottom: 28px;
}
.tn-404-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.tn-pagination {
  display: flex;
  justify-content: center;
  padding: 24px 0 40px;
}
.tn-pagination .pagination {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.tn-pagination .page-item { display: block; }
.tn-pagination .page-item .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: .875rem;
  font-family: var(--font);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  text-decoration: none;
}
.tn-pagination .page-item.active .page-link {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.tn-pagination .page-item.disabled .page-link {
  opacity: .4;
  cursor: default;
  pointer-events: none;
}
.tn-pagination .page-item .page-link:hover:not(.disabled) {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================================
   POST PAGE — HERO
   ============================================================ */
.tn-post-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
}
.tn-post-hero-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: start;
}
.tn-post-icon {
  width: 100px;
  height: 100px;
  border-radius: 20px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.tn-post-icon img { width: 100%; height: 100%; object-fit: cover; }
.tn-post-info { flex: 1; }
.tn-post-title {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
}
.tn-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  font-size: .85rem;
  color: var(--muted);
}
.tn-post-meta a { color: var(--accent); font-weight: 500; }
.tn-post-meta span { display: flex; align-items: center; gap: 4px; }
.tn-subscribe-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  background: var(--accent-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: .875rem;
}
.tn-subscribe-label { font-weight: 500; color: var(--text); }
.tn-subscribe-form { display: flex; gap: 8px; flex: 1; min-width: 240px; }
.tn-subscribe-form .tn-comment-input { width: auto; flex: 1; padding: 8px 12px; }
.tn-subscribe-form .tn-comment-submit { padding: 8px 18px; }
.tn-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  padding: 12px 28px;
  border-radius: var(--radius-btn);
  font-weight: 700;
  font-size: 1rem;
  transition: background .2s, transform .15s;
  box-shadow: 0 4px 14px rgba(22,163,74,.35);
}
.tn-dl-btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.tn-dl-btn::before { content: '⬇️'; font-size: 1.1rem; }

/* ============================================================
   POST PAGE — TABS
   ============================================================ */
.tn-tabs {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: var(--header-h);
  z-index: 10;
}
.tn-tabs-inner {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.tn-tabs-inner::-webkit-scrollbar { display: none; }
.tn-tab {
  padding: 14px 22px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color .2s, border-color .2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.tn-tab:hover { color: var(--text); }
.tn-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.tn-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  margin-left: 5px;
  vertical-align: middle;
}
.tn-tab.active .tn-tab-badge { background: var(--accent); }

.tn-tab-panel { display: none; padding: 28px 0; }
.tn-tab-panel.active { display: block; }

/* Description */
.tn-description {
  font-size: .95rem;
  line-height: 1.75;
  color: var(--text);
  max-width: 760px;
  white-space: pre-wrap;
}
.tn-description p { margin-bottom: .8em; white-space: normal; }

/* Screenshots — horizontal scroll */
.tn-screenshots {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.tn-screenshots img {
  height: 320px;
  width: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  object-fit: cover;
}

/* Download block */
.tn-download-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 620px;
}
.tn-dl-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  transition: border-color .2s, box-shadow .2s;
}
.tn-dl-item:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(22,163,74,.12); }
.tn-dl-item-icon { font-size: 1.5rem; flex-shrink: 0; }
.tn-dl-item-info { flex: 1; }
.tn-dl-item-name { font-weight: 600; font-size: .95rem; }
.tn-dl-item-url { font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px; }
.tn-dl-item-btn {
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background .2s;
}
.tn-dl-item-btn:hover { background: var(--accent-hover); }

#tab-download .tn-subscribe-box {
  width: 100%;
  max-width: 620px;
  box-sizing: border-box;
  margin-top: 16px;
}

/* ============================================================
   POST PAGE — SIDEBAR / SIMILAR APPS
   ============================================================ */
.tn-post-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  align-items: start;
  padding: 24px 0 48px;
}
@media (max-width: 900px) {
  .tn-post-layout { grid-template-columns: 1fr; }
}
.tn-similar-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}

/* Ad blocks */
.tn-ad {
  display: block;
  overflow: hidden;
  text-align: center;
}
.tn-ad:empty { display: none; }
.tn-ad-header { margin: 16px 0; }
.tn-ad-footer { margin-bottom: 20px; }
.tn-ad-sidebar { margin-bottom: 20px; }
.tn-ad-sidebar {
  width: 100%;
  min-height: 280px;
}
.tn-ad-sidebar .adsbygoogle {
  display: block !important;
  width: 100%;
  min-height: 280px;
}
.tn-ad-article { margin: 20px 0; }
.tn-ad-download { margin: 0 0 16px; }
.tn-ad-comments { margin-bottom: 20px; }
.tn-ad-card {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
}
.tn-ad-card .tn-ad { width: 100%; height: 100%; }
.tn-similar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tn-similar-item a {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: box-shadow .2s, border-color .2s;
}
.tn-similar-item a:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(22,163,74,.1); }
.tn-similar-img {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg);
}
.tn-similar-img img { width: 100%; height: 100%; object-fit: cover; }
.tn-similar-name { font-size: .83rem; font-weight: 600; line-height: 1.3; color: var(--text); }
.tn-similar-cat { font-size: .74rem; color: var(--muted); margin-top: 2px; }

.tn-seo-text {
  font-size: .85rem;
  line-height: 1.7;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 18px;
  margin-top: 8px;
}

/* ============================================================
   ARTICLES (REVIEWS)
   ============================================================ */
.tn-article-hero { padding: 24px 0; }
.tn-article-hero .tn-post-title { max-width: 760px; }
.tn-article-content img,
.tn-article-cover,
.tn-article-img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 0 auto 16px;
}
@media (max-width: 480px) {
  .tn-article-hero .tn-post-title { font-size: 1.2rem; }
}
.tn-post-meta a.tn-article-category {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 14px;
  font-size: .78rem;
  font-weight: 500;
  background: var(--accent);
  color: #fff;
}
.tn-post-meta a.tn-article-category:hover {
  background: var(--accent-hover);
  color: #fff;
}
.tn-article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.tn-article-tag {
  font-size: .82rem;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 4px 10px;
}
.tn-article-tag:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.tn-cat-chip-count {
  margin-left: 4px;
  opacity: .7;
  font-size: .72rem;
}
.tn-cat-chip--tag {
  border-style: dashed;
}

/* ============================================================
   FOOTER
   ============================================================ */
.tn-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 32px 0 24px;
  margin-top: 40px;
  font-size: .83rem;
  color: var(--muted);
}
.tn-footer a { color: var(--muted); text-decoration: none; }
.tn-footer a:hover { color: var(--accent); }

.footer-reviews-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 14px;
}
.footer-reviews {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 0 0 24px;
}
.footer-review-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 240px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s;
}
.footer-review-card:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(22,163,74,.1); }
.footer-review-img {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2, rgba(255,255,255,.04));
}
.footer-review-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.footer-review-title {
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 480px) {
  .footer-review-card { width: 100%; }
}

.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; margin-bottom: 16px; }
.footer-nav a { font-size: .85rem; font-weight: 500; }

.footer-copy { text-align: center; font-size: .78rem; color: var(--muted); line-height: 1.6; }
.footer-copy a { color: var(--muted); }

/* Static pages */
.tn-page { padding: 32px 0 48px; }
.tn-page-title { font-size: 1.6rem; font-weight: 700; margin-bottom: 24px; color: var(--text); }
.tn-page-body { max-width: 720px; line-height: 1.75; color: var(--text); }
.tn-page-body h2 { font-size: 1.15rem; font-weight: 700; margin: 28px 0 10px; color: var(--text); }
.tn-page-body p { margin-bottom: 14px; }
.tn-page-body ul { padding-left: 1.4rem; margin-bottom: 14px; }
.tn-page-body ul li { list-style: disc; margin-bottom: 6px; }

.tn-contact-cards { display: flex; flex-wrap: wrap; gap: 14px; margin: 20px 0 28px; }
.tn-contact-card  { display: flex; align-items: center; gap: 14px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 16px 20px; min-width: 200px; }
.tn-contact-icon  { font-size: 1.4rem; line-height: 1; }
.tn-contact-label { font-size: .75rem; color: var(--muted); margin-bottom: 2px; }
.tn-contact-card a { font-weight: 600; color: var(--accent); }
.tn-contact-card a:hover { color: var(--accent-hover); }

.tn-contact-form { max-width: 520px; display: flex; flex-direction: column; gap: 10px; }

/* ============================================================
   MAIL MODAL (keep functional)
   ============================================================ */
.mailto-modal {
  display: none;
  position: fixed;
  z-index: 300;
  inset: 0;
  background: rgba(0,0,0,.5);
  align-items: center;
  justify-content: center;
}
.mailto-modal.active { display: flex; }
.mailto-modal-content {
  background: var(--surface);
  border-radius: 16px;
  padding: 32px;
  width: 90%;
  max-width: 480px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
}
.mailto-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--muted);
}
.inmail {
  display: block;
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: var(--font);
  font-size: .9rem;
  margin-top: 6px;
  outline: none;
  transition: border-color .2s;
}
.inmail:focus { border-color: var(--accent); }
.inmail_textarea { height: 100px; resize: vertical; }

/* ============================================================
   ALL CATEGORIES CLOUD
   ============================================================ */
.tn-all-cats {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 36px 0 44px;
  margin-top: 8px;
}
.tn-all-cats-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
}
.tn-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tn-cloud-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 500;
  border: 1.5px solid var(--border);
  color: var(--accent);
  background: var(--surface);
  transition: background .18s, color .18s, border-color .18s;
  white-space: nowrap;
}
.tn-cloud-tag:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
/* Main category — filled accent */
.tn-cloud-tag--main {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 700;
}
.tn-cloud-tag--main:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .tn-nav { display: none; }
  .tn-burger { display: flex; }
  .tn-search { max-width: none; flex: 1; min-width: 0; }

  /* Header: logo shrink */
  .tn-logo img { height: 26px; width: auto; }

  /* Search compact on mobile */
  .tn-search input { font-size: .85rem; padding: 0 10px; }
  .tn-search button { padding: 0 12px; font-size: .8rem; }

  /* Breadcrumbs */
  .tn-breadcrumbs .over { font-size: .78rem; }

  /* Post hero */
  .tn-post-hero-inner { grid-template-columns: 72px 1fr; gap: 12px; }
  .tn-post-icon { width: 72px; height: 72px; border-radius: 14px; }
  .tn-post-title { font-size: 1.1rem; }
  .tn-post-meta { font-size: .78rem; gap: 8px; }
  .tn-dl-btn { padding: 10px 20px; font-size: .9rem; }

  /* Tabs */
  .tn-tab { padding: 12px 14px; font-size: .83rem; }

  /* Screenshots */
  .tn-screenshots img { height: 200px; }

  /* Download items */
  .tn-dl-item { padding: 10px 12px; gap: 10px; }
  .tn-dl-item-url { max-width: 160px; }

  /* All cats cloud — wraps naturally, no changes needed */
}

@media (max-width: 480px) {
  .tn-header-inner { gap: 8px; padding: 0 12px; }
  .tn-logo img { height: 22px; }

  /* 2-column grid on small phones */
  .tn-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .tn-card-body { padding: 8px; }
  .tn-card-name { font-size: .8rem; }

  /* Post layout: sidebar below content */
  .tn-post-layout { grid-template-columns: 1fr; }
  .tn-post-hero { padding: 16px 0; }
  .tn-post-hero-inner { grid-template-columns: 60px 1fr; gap: 10px; }
  .tn-post-icon { width: 60px; height: 60px; border-radius: 12px; }
  .tn-post-title { font-size: 1rem; }

  /* Download button full width */
  .tn-dl-btn { width: 100%; justify-content: center; }

  /* Download items vertical on tiny screens */
  .tn-dl-item { flex-wrap: wrap; }
  .tn-dl-item-btn { width: 100%; text-align: center; }
  #tab-download .tn-subscribe-box {
    margin-top: 14px;
    padding: 10px 12px;
  }
  #tab-download .tn-subscribe-label {
    width: 100%;
  }
  #tab-download .tn-subscribe-form {
    flex-basis: 100%;
    min-width: 0;
    width: 100%;
    flex-direction: column;
  }
  #tab-download .tn-subscribe-form .tn-comment-input,
  #tab-download .tn-subscribe-form .tn-comment-submit {
    width: 100%;
  }

  .tn-all-cats { padding: 20px 0 28px; }
  .tn-cloud { gap: 6px; }
  .tn-cloud-tag { font-size: .78rem; padding: 5px 10px; }

  /* Pagination compact */
  .tn-pagination .page-item .page-link { min-width: 32px; height: 32px; font-size: .8rem; padding: 0 8px; }
}

/* ============================================================
   Comments
   ============================================================ */
.tn-comments {
  margin: 40px 0;
  padding: 0;
}
.tn-comments-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}
.tn-comment-notice {
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-btn);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: .9rem;
}
.tn-comment {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.tn-comment--reply {
  margin-left: 48px;
  margin-top: 10px;
}
.tn-comment-avatar {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}
.tn-comment--reply .tn-comment-avatar {
  width: 30px;
  height: 30px;
  font-size: .85rem;
  background: var(--border);
  color: var(--muted);
}
.tn-comment-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 12px 14px;
  flex: 1;
}
.tn-comment-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.tn-comment-meta strong {
  font-size: .9rem;
  color: var(--text);
}
.tn-comment-meta span {
  font-size: .78rem;
  color: var(--muted);
}
.tn-comment-text {
  font-size: .9rem;
  color: var(--text);
  line-height: 1.5;
  margin: 0;
}
.tn-no-comments {
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 20px;
}

/* Form */
.tn-comment-form-wrap {
  margin-top: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
}
.tn-comment-form-wrap h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}
.tn-comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tn-comment-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 10px 14px;
  font-family: var(--font);
  font-size: .9rem;
  color: var(--text);
  background: var(--bg);
  resize: vertical;
  outline: none;
  transition: border-color .2s;
}
.tn-comment-input:focus {
  border-color: var(--accent);
}
.tn-comment-submit {
  align-self: flex-start;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-btn);
  padding: 10px 24px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.tn-comment-submit:hover { background: var(--accent-hover); }
.tn-comment-error {
  color: #dc2626;
  font-size: .85rem;
  margin: 0;
}

@media (max-width: 480px) {
  .tn-comment--reply { margin-left: 20px; }
}

/* ============================================================
   PUSH SUBSCRIBE BUTTON
   ============================================================ */
.tn-push-btn {
  display: none;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  transition: background .2s, transform .2s;
}
.tn-push-btn.visible { display: flex; }
.tn-push-btn.tn-push-btn--subscribed { background: var(--surface); color: var(--accent); border: 2px solid var(--accent); }
.tn-push-btn:hover { transform: translateY(-2px); }

.tn-newsletter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.tn-newsletter-label { font-size: .9rem; color: var(--text); font-weight: 600; }
.tn-newsletter-success { font-size: .9rem; color: var(--accent); font-weight: 600; }
.tn-newsletter-form { display: flex; gap: 8px; flex-wrap: wrap; }
.tn-newsletter-input {
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 9px 14px;
  font-size: .85rem;
  min-width: 220px;
  background: var(--bg);
  color: var(--text);
}
.tn-newsletter-submit {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-btn);
  padding: 9px 20px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.tn-newsletter-submit:hover { background: var(--accent-hover); }
.tn-push-btn:hover { background: var(--accent-hover); transform: translateY(-2px); }
@media (max-width: 480px) {
  .tn-push-btn { right: 12px; bottom: 12px; padding: 10px 14px; font-size: .8rem; }
}

/* Mobile width fixes for post recommendations and footer articles */
@media (max-width: 900px) {
  .tn-post-layout,
  .tn-post-layout > *,
  .tn-post-layout aside,
  .tn-similar-list,
  .tn-similar-item,
  .tn-similar-item a {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .tn-post-layout aside {
    width: 100%;
    overflow: hidden;
  }

  .tn-similar-list {
    width: 100%;
  }

  .tn-similar-item a > div:last-child {
    min-width: 0;
  }

  .tn-similar-name,
  .tn-similar-cat {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 560px) {
  .footer-reviews {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    gap: 10px;
  }

  .footer-review-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
  }

  .footer-review-title {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

/* Normalize mobile widget widths */
.tn-similar-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-reviews {
  padding: 0;
}

.footer-review-card {
  flex: 0 1 240px;
  box-sizing: border-box;
}

@media (max-width: 560px) {
  .tn-similar-title,
  .tn-similar-list,
  .footer-reviews-title,
  .footer-reviews {
    margin-left: 0;
    margin-right: 0;
  }

  .tn-similar-item a,
  .footer-review-card {
    width: 100%;
  }

  .footer-review-card {
    flex-basis: 100%;
  }
}
