/* ============================================================
   SoftwareHub Italia — Main Stylesheet
   Original Colors (White + Dark Navy + Red) — Better Design
   ============================================================ */

/* ---- CSS VARIABLES ---- */
:root {
  /* Dark Theme — Original Site Colors */
  --navy:       #161a1d;
  --navy-deep:  #0f1214;
  --navy-light: #2a2f33;
  --red:        #e74c3c;
  --red-dark:   #c0392b;
  --red-light:  #ff6b5b;
  --white:      #ffffff;
  --bg:         #1f2326;
  --bg2:        #272c30;
  --card:       #2a2f33;
  --border:     #363c40;
  --text:       #e8eaeb;
  --text-muted: #8c9299;
  --text-light: #5c636a;
  --shadow:     0 2px 12px rgba(0,0,0,0.3);
  --shadow-md:  0 4px 24px rgba(0,0,0,0.5);
  --radius:     10px;
  --radius-sm:  6px;
  --radius-lg:  14px;
  --transition: 0.2s ease;
  --font:       'Outfit', sans-serif;
  --mono:       'JetBrains Mono', monospace;
  --header-h:   62px;
}

[data-theme="light"] {
  --bg:         #f5f5f7;
  --bg2:        #ebebed;
  --card:       #ffffff;
  --border:     #e0e0e8;
  --text:       #1a1a2a;
  --text-muted: #6b6b80;
  --text-light: #9898a8;
  --shadow:     0 2px 12px rgba(0,0,0,0.08);
  --shadow-md:  0 4px 24px rgba(0,0,0,0.12);
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; transition: background var(--transition), color var(--transition); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }
ul, ol { list-style: none; }
input, select, textarea { font-family: var(--font); }

/* ---- CONTAINER ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  background: var(--navy-deep);
  color: #a0a0c0;
  text-align: center;
  font-size: 13px;
  padding: 8px 20px;
  border-bottom: 1px solid #ffffff10;
}
.topbar a {
  color: #7eb6ff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition);
}
.topbar a:hover { color: #fff; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--navy);
  border-bottom: 3px solid var(--red);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Logo */
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-icon {
  width: 38px; height: 38px;
  background: var(--red);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition);
}
.logo-icon.sm { width: 28px; height: 28px; border-radius: 6px; }
.logo:hover .logo-icon { background: var(--red-dark); }
.logo-name { display: block; font-size: 17px; font-weight: 700; color: #fff; line-height: 1.2; }
.logo-sub  { display: block; font-size: 11px; color: #8888aa; line-height: 1; }

/* Nav */
.main-nav { flex: 1; }
.nav-list { display: flex; align-items: center; gap: 2px; }
.has-dropdown { position: relative; }
.nav-link {
  display: flex; align-items: center; gap: 4px;
  color: #c8c8e0;
  font-size: 14px; font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255,255,255,0.08); }
.nav-link .arrow { transition: transform var(--transition); flex-shrink: 0; opacity: .6; }
.has-dropdown:hover .arrow { transform: rotate(180deg); }

/* Dropdown */
.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--navy-light);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 8px;
  min-width: 220px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: dropIn 0.15s ease;
}
.has-dropdown:hover .dropdown { display: block; }

.mega-drop { min-width: 280px; display: none; }
.has-dropdown:hover .mega-drop { display: block; }
.mega-col { padding: 4px; }
.mega-head { font-size: 11px; font-weight: 600; color: #7070a0; text-transform: uppercase; letter-spacing: .8px; padding: 4px 10px 8px; }

.drop-item {
  display: flex; align-items: center; gap: 10px;
  color: #c0c0d8;
  font-size: 13.5px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.drop-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.drop-icon { width: 20px; text-align: center; font-size: 14px; }

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Header Right */
.header-right { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: #a0a0c0;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.icon-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.hamburger span { display: block; width: 22px; height: 2px; background: #c0c0d8; border-radius: 2px; transition: all 0.25s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Header Search */
.header-search {
  background: var(--navy-deep);
  border-top: 1px solid rgba(255,255,255,0.06);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.header-search.open { max-height: 80px; }
.search-wrap { max-width: 1200px; margin: 0 auto; padding: 12px 20px; }
.search-inner {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 0 14px;
  transition: border-color var(--transition);
}
.search-inner:focus-within { border-color: var(--red); }
.search-inner svg { color: #7070a0; flex-shrink: 0; }
.search-inner input {
  flex: 1;
  background: none; border: none; outline: none;
  color: #fff;
  font-size: 15px;
  padding: 11px 0;
}
.search-inner input::placeholder { color: #6060a0; }
.search-btn {
  background: var(--red); color: #fff;
  font-size: 13px; font-weight: 600;
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  flex-shrink: 0;
}
.search-btn:hover { background: var(--red-dark); }
.search-close {
  color: #7070a0; font-size: 16px;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color var(--transition);
  flex-shrink: 0;
}
.search-close:hover { color: #fff; }

/* Live Search Results */
.live-results {
  background: var(--navy-light);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  margin-top: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.live-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  color: #c0c0d8;
  font-size: 14px;
  transition: background var(--transition);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.live-item:last-child { border-bottom: none; }
.live-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.live-item img { width: 36px; height: 36px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.live-item-title { font-weight: 500; }
.live-item-meta  { font-size: 12px; color: #7070a0; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb-nav { background: var(--bg2); border-bottom: 1px solid var(--border); padding: 9px 0; }
.breadcrumb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); }
.breadcrumb li + li::before { content: '›'; margin-right: 6px; opacity: .5; }
.breadcrumb a { color: var(--text-muted); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb [aria-current="page"] { color: var(--text); font-weight: 500; }

/* ============================================================
   HERO SEARCH (Homepage)
   ============================================================ */
.hero {
  background: var(--navy);
  padding: 56px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: var(--red);
}
.hero h1 { font-size: 32px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.hero h1 span { color: var(--red); }
.hero p { color: #a0a0c0; font-size: 16px; margin-bottom: 28px; }
.hero-search {
  max-width: 620px; margin: 0 auto;
  display: flex;
  background: rgba(255,255,255,0.06);
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s;
}
.hero-search:focus-within { border-color: var(--red); }
.hero-search input {
  flex: 1; background: none; border: none; outline: none;
  color: #fff; font-size: 16px; padding: 14px 18px;
}
.hero-search input::placeholder { color: #7070a0; }
.hero-search button {
  background: var(--red); color: #fff;
  font-size: 15px; font-weight: 600;
  padding: 0 28px;
  transition: background var(--transition);
}
.hero-search button:hover { background: var(--red-dark); }

/* Category chips */
.cat-chips { display: flex; justify-content: center; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.cat-chip {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #a0a0c0; font-size: 13px; font-weight: 500;
  padding: 6px 16px; border-radius: 20px;
  transition: all var(--transition);
}
.cat-chip:hover, .cat-chip.active {
  background: rgba(231,76,60,0.15);
  border-color: var(--red); color: #fff;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.page-wrap {
  max-width: 1200px; margin: 0 auto; padding: 32px 20px;
  display: grid;
  grid-template-columns: 1fr 290px;
  gap: 28px;
  align-items: start;
}
.page-wrap.no-sidebar { grid-template-columns: 1fr; max-width: 860px; }

/* Section header */
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-title {
  font-size: 17px; font-weight: 700;
  display: flex; align-items: center; gap: 10px;
}
.section-title::before {
  content: '';
  display: inline-block; width: 4px; height: 20px;
  background: var(--red); border-radius: 2px;
}
.see-all { color: var(--red); font-size: 13px; font-weight: 500; transition: opacity var(--transition); }
.see-all:hover { opacity: .7; }

/* ============================================================
   POST CARDS
   ============================================================ */
.posts-list { display: flex; flex-direction: column; gap: 14px; }

.post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex; gap: 14px;
  transition: border-color var(--transition), box-shadow var(--transition), transform 0.15s;
  box-shadow: var(--shadow);
}
.post-card:hover {
  border-color: var(--red);
  box-shadow: 0 4px 20px rgba(231,76,60,0.12);
  transform: translateY(-1px);
}
.post-thumb {
  width: 100px; height: 68px;
  border-radius: var(--radius-sm);
  object-fit: cover; flex-shrink: 0;
  background: var(--bg2);
}
.post-thumb-placeholder {
  width: 100px; height: 68px;
  background: var(--navy);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: rgba(255,255,255,0.3); font-size: 28px;
}
.post-body { flex: 1; min-width: 0; }
.post-tags { display: flex; gap: 5px; margin-bottom: 7px; flex-wrap: wrap; }

/* Badges */
.badge {
  font-family: var(--mono);
  font-size: 10px; font-weight: 500;
  padding: 2px 7px; border-radius: 4px;
  color: #fff; letter-spacing: .4px;
}
.badge-win   { background: #e74c3c; }
.badge-mac   { background: #3498db; }
.badge-linux { background: #27ae60; }
.badge-game  { background: #f39c12; }
.badge-adobe { background: #e74c3c; }
.badge-new   { background: var(--navy); color: #a0a0c0; border: 1px solid var(--border); }

.post-title {
  font-size: 15px; font-weight: 600; line-height: 1.4;
  color: var(--text);
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  margin-bottom: 6px;
  transition: color var(--transition);
}
.post-card:hover .post-title { color: var(--red); }

.post-meta { display: flex; gap: 14px; font-size: 12px; color: var(--text-muted); flex-wrap: wrap; }
.post-meta span { display: flex; align-items: center; gap: 4px; }
.meta-size    { color: #e67e22; }
.meta-version { color: #27ae60; font-family: var(--mono); }
.meta-views   { color: var(--text-muted); }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: 20px; }

.sidebar-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.sidebar-head {
  background: var(--navy);
  color: #fff;
  font-size: 13px; font-weight: 600;
  padding: 11px 16px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 2px solid var(--red);
  text-transform: uppercase; letter-spacing: .6px;
}
.sidebar-body { padding: 12px; }

/* Popular posts */
.popular-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.popular-item:hover { background: var(--bg); }
.popular-num {
  font-size: 11px; font-weight: 700; color: var(--red);
  font-family: var(--mono);
  width: 18px; flex-shrink: 0; text-align: center;
}
.popular-thumb { width: 42px; height: 30px; object-fit: cover; border-radius: 4px; flex-shrink: 0; background: var(--bg2); }
.popular-title { font-size: 13px; font-weight: 500; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Category list */
.cat-list-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  font-size: 14px;
}
.cat-list-item:hover { background: var(--bg); color: var(--red); }
.cat-count {
  font-size: 11px; font-family: var(--mono);
  background: var(--bg2);
  padding: 2px 7px; border-radius: 10px;
  color: var(--text-muted);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 32px; flex-wrap: wrap; }
.page-btn {
  min-width: 38px; height: 38px; padding: 0 10px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  color: var(--text-muted);
  background: var(--card);
  transition: all var(--transition);
}
.page-btn:hover { border-color: var(--red); color: var(--red); }
.page-btn.active { background: var(--red); border-color: var(--red); color: #fff; }
.page-btn:disabled { opacity: .4; pointer-events: none; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer-telegram {
  background: #0088cc;
  padding: 20px 0;
}
.tg-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  flex-wrap: wrap;
}
.tg-left { display: flex; align-items: center; gap: 14px; }
.tg-left strong { display: block; color: #fff; font-size: 15px; font-weight: 600; }
.tg-left p { color: rgba(255,255,255,0.8); font-size: 13px; margin-top: 2px; }
.tg-btn {
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.4);
  color: #fff; font-weight: 600; font-size: 14px;
  padding: 10px 24px; border-radius: var(--radius);
  transition: all var(--transition);
  white-space: nowrap;
}
.tg-btn:hover { background: rgba(255,255,255,0.3); border-color: #fff; }

.site-footer { background: var(--navy); }
.footer-main { padding: 48px 0 32px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; }

.footer-logo {
  display: flex; align-items: center; gap: 10px;
  color: #fff; font-size: 16px; font-weight: 700;
  margin-bottom: 12px;
}
.footer-desc { color: #7070a0; font-size: 14px; line-height: 1.6; margin-bottom: 16px; }
.footer-cc { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #6060a0; }

.footer-heading { color: #fff; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .7px; margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: #7070a0; font-size: 14px; transition: color var(--transition); }
.footer-col a:hover { color: var(--red); }

.footer-bottom { padding: 16px 0; }
.footer-bottom-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
  font-size: 12px; color: #5050a0;
}
.footer-right { display: flex; align-items: center; gap: 8px; }
.footer-right a { color: #5050a0; transition: color var(--transition); }
.footer-right a:hover { color: var(--red); }
.footer-right span { opacity: .4; }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
  position: fixed; bottom: 28px; right: 28px;
  width: 42px; height: 42px;
  background: var(--red);
  color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(231,76,60,0.4);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  transform: translateY(10px);
  z-index: 999;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { background: var(--red-dark); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .page-wrap { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; }
  .hamburger { display: flex; }
  .main-nav.open {
    display: block;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--navy);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 12px;
    z-index: 999;
  }
  .nav-list { flex-direction: column; align-items: stretch; }
  .dropdown { position: static; background: rgba(0,0,0,0.2); box-shadow: none; border: none; margin-top: 4px; }
  .has-dropdown:hover .dropdown { display: none; }
  .has-dropdown.open .dropdown { display: block; }
}
@media (max-width: 600px) {
  .hero h1 { font-size: 22px; }
  .hero { padding: 36px 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .tg-cta { flex-direction: column; text-align: center; }
  .page-wrap { padding: 20px 16px; }
}

/* ============================================================
   POST PAGE
   ============================================================ */
.post-article { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: visible; margin-bottom: 28px; box-shadow: var(--shadow); }
.post-header { padding: 24px; border-bottom: 1px solid var(--border); }
.post-hero-thumb { width: 100%; max-height: 280px; overflow: hidden; border-radius: var(--radius); margin-bottom: 20px; }
.post-hero-thumb img { width: 100%; height: 280px; object-fit: cover; }
.post-page-title { font-size: 22px; font-weight: 700; line-height: 1.3; margin-bottom: 14px; }
.post-info-row { display: flex; flex-wrap: wrap; gap: 10px; }
.info-chip { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-muted); background: var(--bg); border: 1px solid var(--border); padding: 4px 10px; border-radius: 6px; }
.info-chip strong { color: var(--text); }

/* Description */
.post-description { padding: 24px; font-size: 15px; line-height: 1.75; color: var(--text); border-bottom: 1px solid var(--border); }
.post-content { padding: 24px; font-size: 15px; line-height: 1.75; border-bottom: 1px solid var(--border); }
.post-content h2 { font-size: 18px; font-weight: 700; margin: 20px 0 10px; }
.post-content h3 { font-size: 16px; font-weight: 600; margin: 16px 0 8px; }
.post-content ul, .post-content ol { margin: 10px 0 10px 24px; }
.post-article .post-content ul,
.post-article .post-content ol { list-style: revert !important; margin: 10px 0 10px 24px; padding-left: 8px; }
.post-article .post-content ul { list-style: disc !important; }
.post-article .post-content ol { list-style: decimal !important; }
.post-article .post-content ul ul { list-style: circle !important; margin-top: 4px; }
.post-article .post-content li { margin-bottom: 6px; display: list-item !important; }
.post-article .post-description ul,
.post-article .post-description ol { list-style: revert !important; margin: 10px 0 10px 24px; padding-left: 8px; }
.post-article .post-description ul { list-style: disc !important; }
.post-article .post-description ol { list-style: decimal !important; }
.post-article .post-description li { margin-bottom: 4px; display: list-item !important; }
.post-content code { background: var(--bg2); padding: 2px 6px; border-radius: 4px; font-family: var(--mono); font-size: 13px; }
.post-content pre { background: var(--navy); color: #e8e8f0; padding: 16px; border-radius: var(--radius); overflow-x: auto; margin: 16px 0; }
.post-content a { color: var(--red); text-decoration: underline; }
.post-excerpt { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }

/* Download Box */
.download-box { margin: 0; border-top: 3px solid var(--red); }
.download-box-head { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; padding: 16px 24px; border-bottom: 1px solid var(--border); background: var(--bg); }
.mirror-count { font-size: 12px; font-weight: 400; color: var(--text-muted); background: var(--bg2); padding: 2px 8px; border-radius: 10px; border: 1px solid var(--border); margin-left: auto; }
.mirrors-list { padding: 16px 24px; display: flex; flex-direction: column; gap: 10px; }
.mirror-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color var(--transition); }
.mirror-item:hover { border-color: var(--red); }
.mirror-info { display: flex; align-items: center; gap: 10px; flex: 1; }
.mirror-label { font-size: 14px; font-weight: 500; }
.mirror-type-badge { font-family: var(--mono); font-size: 10px; padding: 2px 6px; border-radius: 4px; }
.mirror-direct  { background: #e74c3c22; color: #e74c3c; border: 1px solid #e74c3c33; }
.mirror-torrent { background: #f39c1222; color: #f39c12; border: 1px solid #f39c1233; }
.mirror-magnet  { background: #9b59b622; color: #9b59b6; border: 1px solid #9b59b633; }
.mirror-external{ background: #3498db22; color: #3498db; border: 1px solid #3498db33; }
.mirror-actions { display: flex; align-items: center; gap: 8px; }
.dl-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--red); color: #fff; font-size: 13px; font-weight: 600; padding: 8px 18px; border-radius: var(--radius-sm); transition: background var(--transition); white-space: nowrap; }
.dl-btn:hover { background: var(--red-dark); }
.copy-link-btn { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-muted); transition: all var(--transition); }
.copy-link-btn:hover { color: var(--red); border-color: var(--red); }
.password-hint { margin: 0 24px 16px; padding: 10px 14px; background: #f39c1212; border: 1px solid #f39c1233; border-radius: var(--radius-sm); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.password-hint code { background: var(--bg); padding: 2px 8px; border-radius: 4px; font-family: var(--mono); color: var(--red); font-size: 13px; }
.no-mirrors { padding: 24px; text-align: center; color: var(--text-muted); font-size: 14px; }
.download-footer { padding: 12px 24px; border-top: 1px solid var(--border); text-align: center; }
.download-footer a { font-size: 13px; color: var(--text-muted); display: inline-flex; align-items: center; gap: 5px; transition: color var(--transition); }
.download-footer a:hover { color: var(--red); }

/* Post Telegram CTA */
.post-tg-cta { margin: 0; padding: 16px 24px; background: #0088cc15; border-top: 1px solid #0088cc33; }
.post-tg-cta a { display: flex; align-items: center; justify-content: center; gap: 8px; color: #0088cc; font-size: 14px; font-weight: 500; transition: opacity var(--transition); }
.post-tg-cta a:hover { opacity: .8; }

/* Info Table */
.info-table { width: 100%; font-size: 13px; border-collapse: collapse; }
.info-table td { padding: 7px 4px; border-bottom: 1px solid var(--border); }
.info-table tr:last-child td { border-bottom: none; }
.info-table td:first-child { color: var(--text-muted); width: 45%; }
.info-table td:last-child { font-weight: 500; }

/* Related Posts */
.related-section { margin-top: 28px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.related-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color var(--transition), transform 0.15s; }
.related-card:hover { border-color: var(--red); transform: translateY(-2px); }
.related-thumb { width: 100%; height: 90px; object-fit: cover; background: var(--bg2); }
.related-info { padding: 10px; }
.related-tags { margin-bottom: 5px; }
.related-title { font-size: 13px; font-weight: 600; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.related-meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ============================================================
   CATEGORY PAGE
   ============================================================ */
.cat-header { background: var(--navy); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; border-bottom: 3px solid var(--red); }
.cat-title { font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.cat-desc  { color: #8888a8; font-size: 14px; margin-bottom: 10px; }
.cat-stats { font-size: 13px; color: #6060a0; }
.sub-cats  { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.08); }
.sub-cat   { background: rgba(255,255,255,0.08); color: #a0a0c0; font-size: 13px; padding: 5px 14px; border-radius: 20px; transition: all var(--transition); border: 1px solid transparent; }
.sub-cat:hover, .sub-cat.active { background: rgba(231,76,60,0.2); border-color: var(--red); color: #fff; }

/* Filters Bar */
.filters-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; padding: 12px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.filter-group, .sort-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-label { font-size: 12px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .5px; }
.filter-chip { font-size: 12px; padding: 4px 12px; border-radius: 16px; background: var(--bg); border: 1px solid var(--border); color: var(--text-muted); transition: all var(--transition); }
.filter-chip:hover, .filter-chip.active { background: var(--red); border-color: var(--red); color: #fff; }
.sort-select { background: var(--bg); border: 1px solid var(--border); color: var(--text); font-size: 13px; padding: 5px 10px; border-radius: var(--radius-sm); outline: none; cursor: pointer; }

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state h2 { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 15px; }

/* Cat list active */
.cat-list-item.active { background: var(--bg); color: var(--red); }

/* ============================================================
   SEARCH PAGE
   ============================================================ */
.search-header { margin-bottom: 24px; }
.search-title { font-size: 22px; font-weight: 700; }
.search-count { font-size: 14px; color: var(--text-muted); margin-top: 4px; }
.search-page-form .search-inner { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 14px; display: flex; align-items: center; gap: 10px; }
.search-page-form .search-inner:focus-within { border-color: var(--red); }
.search-page-form input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 15px; padding: 13px 0; }
.search-page-form input::placeholder { color: var(--text-muted); }

/* Ad Zone */
.ad-zone { margin: 20px 0; text-align: center; }

@media (max-width: 700px) {
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .filters-bar  { flex-direction: column; align-items: flex-start; }
  .post-page-title { font-size: 18px; }
}