/* ============================================================
   KaranPCs — Main Stylesheet
   Green Theme · Dark Mode · Fully Responsive
   ============================================================ */

/* ─── Variables ─────────────────────────────────────────── */
:root {
  --green:        #4caf50;
  --green-dark:   #388e3c;
  --green-darker: #2e7d32;
  --green-light:  #66bb6a;
  --green-logo:   #00e676;
  --green-bg:     #f1f8f1;
  --green-pale:   #e8f5e9;

  --bg-outer:     #2e7d32;
  --bg-body:      #f5f5f5;
  --bg-white:     #ffffff;
  --bg-card:      #ffffff;
  --bg-header:    #1a1a1a;
  --bg-footer:    #1a1a1a;
  --bg-sidebar:   #ffffff;
  --bg-hero:      #e8f5e8;

  --text-primary:   #1a1a2e;
  --text-secondary: #444444;
  --text-muted:     #777777;
  --text-nav:       #dddddd;
  --text-link:      #2e7d32;

  --border:       #e0e0e0;
  --border-green: #c8e6c9;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.08);
  --shadow-md:    0 4px 12px rgba(0,0,0,.10);
  --shadow-lg:    0 8px 24px rgba(0,0,0,.12);

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  20px;

  --header-h:   60px;
  --sidebar-w:  290px;
  --content-w:  1200px;

  --font-body:  'Inter', -apple-system, sans-serif;
  --font-head:  'Space Grotesk', 'Inter', sans-serif;

  --transition: .2s ease;
}

/* Dark Mode */
body.dark-mode {
  --bg-outer:     #0a1a0a;
  --bg-body:      #111811;
  --bg-white:     #1a2a1a;
  --bg-card:      #1e2e1e;
  --bg-header:    #0d140d;
  --bg-footer:    #0d140d;
  --bg-sidebar:   #1a2a1a;
  --bg-hero:      #162416;
  --text-primary:   #e8f5e8;
  --text-secondary: #a5c8a5;
  --text-muted:     #6a8a6a;
  --text-nav:       #cccccc;
  --text-link:      #66bb6a;
  --border:       #2a3d2a;
  --border-green: #2a4a2a;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.3);
  --shadow-md:    0 4px 12px rgba(0,0,0,.4);
}

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg-outer);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
}
a { color: var(--text-link); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ─── Typography ─────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-head);
  color: var(--text-primary);
  line-height: 1.3;
  font-weight: 700;
}

/* ─── Layout ─────────────────────────────────────────────── */
.container {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 20px;
}

.page-wrap {
  max-width: var(--content-w);
  margin: 20px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 24px;
  align-items: start;
}

.main-content {
  min-width: 0;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* ─── HEADER ─────────────────────────────────────────────── */
.site-header {
  background: var(--bg-header);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,.5);
  height: var(--header-h);
}

.header-inner {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Logo */
.site-logo { display: flex; align-items: center; flex-shrink: 0; }
.logo-text {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  color: var(--green-logo) !important;
  letter-spacing: -0.5px;
  text-shadow: 0 0 20px rgba(0,230,118,.25);
}

/* Nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.main-nav::-webkit-scrollbar { display: none; }
.main-nav > a {
  color: var(--text-nav);
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
}
.main-nav > a:hover,
.main-nav > a.active {
  color: var(--green-logo);
  background: rgba(76,175,80,.1);
}

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-has-drop {
  color: var(--text-nav);
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}
.nav-has-drop:hover { color: var(--green-logo); background: rgba(76,175,80,.1); }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--bg-header);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-md);
  min-width: 180px;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  box-shadow: var(--shadow-lg);
  z-index: 100;
}
.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  color: var(--text-nav);
  font-size: 13px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.dropdown-menu a:hover { background: rgba(76,175,80,.1); color: var(--green-logo); }
.dropdown-menu a i { width: 16px; text-align: center; font-size: 13px; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-nav);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── HERO (Homepage) ────────────────────────────────────── */
.hero-section {
  background: var(--bg-hero);
  border-bottom: 3px solid var(--green);
  padding: 70px 20px 80px;
  text-align: center;
}
.hero-section h1 {
  font-size: clamp(24px, 4vw, 38px);
  color: var(--text-primary);
  margin-bottom: 16px;
  max-width: 780px;
  margin-inline: auto;
}
.hero-section p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 28px;
  line-height: 1.7;
}
.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: #fff !important;
  padding: 13px 32px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 14px rgba(76,175,80,.35);
}
.btn-hero:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76,175,80,.45);
}

/* Features Grid */
.features-section {
  background: var(--bg-white);
  padding: 50px 20px;
  max-width: var(--content-w);
  margin: 0 auto;
}
.features-section h2 {
  text-align: center;
  font-size: 26px;
  margin-bottom: 30px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 20px;
}
.feature-card {
  background: var(--bg-hero);
  border: 1px solid var(--border-green);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  transition: box-shadow var(--transition), transform var(--transition);
}
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-card .feat-icon {
  width: 52px; height: 52px;
  background: var(--green-pale);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  font-size: 22px;
  color: var(--green-dark);
}
.feature-card h3 { font-size: 17px; color: var(--green-dark); margin-bottom: 10px; }
.feature-card p { font-size: 14px; color: var(--text-secondary); }

/* CTA Section */
.cta-section {
  background: var(--bg-hero);
  border-top: 3px solid var(--green);
  padding: 60px 20px;
  text-align: center;
}
.cta-section h2 { font-size: 30px; margin-bottom: 14px; }
.cta-section p { font-size: 15px; color: var(--text-secondary); margin-bottom: 26px; max-width: 580px; margin-inline: auto; }

/* ─── POST CARDS (Listing) ───────────────────────────────── */
.posts-section { padding: 20px; }

.posts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--green);
}
.posts-header h1 {
  font-size: 20px;
  color: var(--text-primary);
}
.posts-count {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-hero);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-green);
}

.post-card {
  display: flex;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 14px;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}
.post-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-green);
  transform: translateY(-1px);
}

.post-thumb-wrap {
  flex-shrink: 0;
  width: 155px;
  height: 115px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  background: var(--bg-hero);
}
.post-thumb-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.post-card:hover .post-thumb-wrap img { transform: scale(1.04); }
.post-thumb-wrap .cat-badge {
  position: absolute;
  bottom: 6px; left: 6px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--green-dark);
}

.post-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.post-title-link {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary) !important;
  line-height: 1.3;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition);
}
.post-title-link:hover { color: var(--green-dark) !important; }

.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.meta-time { font-size: 12.5px; color: var(--text-muted); }
.badge-updated {
  font-size: 10px;
  font-weight: 700;
  color: #1b5e20;
  background: #e8f5e9;
  border: 1px solid #c8e6c9;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: .4px;
}
body.dark-mode .badge-updated { background: #1b3a1b; color: #81c784; border-color: #2a4a2a; }

.post-excerpt {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}
.post-stats { display: flex; gap: 12px; }
.stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}
.stat-item i { font-size: 11px; }

.btn-read-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--green);
  color: #fff !important;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn-read-more:hover { background: var(--green-dark); transform: translateY(-1px); }

/* ─── PAGINATION ─────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  padding: 20px 0 10px;
  flex-wrap: wrap;
}
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  background: #222;
  color: #fff !important;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition);
}
.page-btn:hover { background: var(--green-dark); transform: translateY(-1px); }
.page-btn.active { background: var(--green); pointer-events: none; }
.page-btn.prev, .page-btn.next { padding: 0 14px; }
.page-dots { color: var(--text-muted); font-weight: 700; padding: 0 4px; }

/* ─── BREADCRUMB ─────────────────────────────────────────── */
.breadcrumb {
  padding: 12px 20px;
  background: var(--bg-hero);
  border-bottom: 1px solid var(--border-green);
  font-size: 13px;
}
.breadcrumb ol {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumb li { display: flex; align-items: center; gap: 6px; color: var(--text-muted); }
.breadcrumb li::after { content: '›'; color: var(--text-muted); }
.breadcrumb li:last-child::after { display: none; }
.breadcrumb li a { color: var(--green-dark); }
.breadcrumb li.current { color: var(--text-secondary); font-weight: 500; }

/* ─── SINGLE POST ────────────────────────────────────────── */
.single-wrap { padding: 24px; }

.single-title {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 10px;
}

.single-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.single-meta a { color: var(--green-dark); font-weight: 600; }
.updated-label { color: var(--green); font-weight: 600; }

/* Download quick button */
.download-quick {
  float: right;
  width: 46px; height: 46px;
  background: var(--green);
  color: #fff !important;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  margin: 0 0 14px 14px;
  transition: background var(--transition), transform var(--transition);
  box-shadow: 0 3px 10px rgba(76,175,80,.4);
}
.download-quick:hover { background: var(--green-dark); transform: scale(1.08); }

/* Featured image */
.featured-image {
  margin-bottom: 22px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-hero);
}
.featured-image img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
}

/* Post content */
.post-content {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 22px;
}
.post-content p { margin-bottom: 14px; }
.post-content h2,.post-content h3 { color: var(--text-primary); margin: 20px 0 10px; font-family: var(--font-head); }
.post-content a { color: var(--green-dark); text-decoration: underline; }
.post-content strong { color: var(--text-primary); }
.post-content ul,.post-content ol { padding-left: 20px; margin: 10px 0; }
.post-content li { margin-bottom: 5px; }

/* ─── IMAGE GALLERY (Multiple Images) ───────────────────── */
.post-gallery {
  margin: 22px 0;
}
.gallery-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gallery-title::before {
  content: '';
  display: inline-block;
  width: 4px; height: 18px;
  background: var(--green);
  border-radius: 2px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--bg-hero);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item .gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
  color: #fff;
  font-size: 22px;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}
.lightbox-inner img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}
.lightbox-close {
  position: absolute;
  top: -40px; right: 0;
  color: #fff;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform var(--transition);
}
.lightbox-close:hover { transform: rotate(90deg); }
.lightbox-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  color: #fff;
  font-size: 24px;
  background: rgba(0,0,0,.5);
  border: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
}
.lightbox-nav:hover { background: var(--green); }
.lightbox-prev { left: -54px; }
.lightbox-next { right: -54px; }
.lightbox-caption {
  text-align: center;
  color: #ccc;
  font-size: 13px;
  margin-top: 10px;
}

/* ─── Download Now button ────────────────────────────────── */
.download-now-wrap {
  text-align: center;
  margin: 24px 0;
}
.btn-download-big {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--green), #2196f3);
  color: #fff !important;
  padding: 14px 44px;
  border-radius: 30px;
  font-size: 17px;
  font-weight: 700;
  transition: opacity var(--transition), transform var(--transition);
  box-shadow: 0 4px 16px rgba(33,150,243,.3);
}
.btn-download-big:hover { opacity: .92; transform: translateY(-2px); }

/* ─── Technical Details Tabs ─────────────────────────────── */
.tech-tabs-wrap { margin: 24px 0; }
.tab-nav {
  display: flex;
  border-bottom: 2px solid var(--border);
  gap: 0;
}
.tab-btn-el {
  background: none;
  border: none;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition);
  font-family: var(--font-body);
}
.tab-btn-el.active { color: var(--green-dark); border-bottom-color: var(--green); }
.tab-btn-el:hover:not(.active) { color: var(--text-secondary); }

.tab-pane {
  display: none;
  padding: 18px;
  background: var(--bg-hero);
  border: 1px solid var(--border-green);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.tab-pane.active { display: block; }

.tech-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tech-table tr { border-bottom: 1px solid var(--border); }
.tech-table tr:last-child { border-bottom: none; }
.tech-table td { padding: 9px 6px; vertical-align: top; }
.tech-table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
  width: 160px;
  white-space: nowrap;
}
.tech-table td:last-child { color: var(--text-secondary); }

.changelog-content { font-size: 14px; color: var(--text-secondary); line-height: 1.8; }
.changelog-content p { margin-bottom: 8px; }

/* ─── Download Section ───────────────────────────────────── */
.download-section { margin: 26px 0; }
.section-heading {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--green);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-heading i { color: var(--green); }

.download-row {
  background: var(--bg-hero);
  border: 1px solid var(--border-green);
  border-left: 4px solid var(--green);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 13px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.download-row:hover { border-left-color: var(--green-dark); box-shadow: var(--shadow-sm); }

.download-info {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}
.download-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dl-link {
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 700;
  transition: color var(--transition);
}
.dl-link:hover { color: var(--green); text-decoration: underline; }
.dl-sep { color: var(--text-muted); font-size: 13px; }

/* ─── Related Posts ──────────────────────────────────────── */
.related-section { margin-top: 30px; padding-top: 20px; border-top: 2px solid var(--green); }
.related-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.related-card {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
  display: block;
  aspect-ratio: 4/3;
  background: var(--bg-hero);
  transition: transform var(--transition), box-shadow var(--transition);
}
.related-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.related-card img { width: 100%; height: 100%; object-fit: cover; }
.related-card-title {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.8));
  color: #fff !important;
  font-size: 11.5px;
  padding: 18px 8px 8px;
  line-height: 1.3;
}

/* ─── SIDEBAR ────────────────────────────────────────────── */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: calc(var(--header-h) + 12px);
}

/* Social Icons */
.sidebar-social {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}
.social-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff !important;
  font-size: 15px;
  transition: transform var(--transition), opacity var(--transition);
}
.social-icon:hover { transform: scale(1.1) translateY(-2px); opacity: .9; }
.social-icon.fb { background: #1877f2; }
.social-icon.tw { background: #000; }
.social-icon.yt { background: #ff0000; }
.social-icon.tg { background: #0088cc; }
.social-icon.pi { background: #e60023; }

/* Sidebar search */
.sidebar-search-wrap { position: relative; }
.sidebar-search {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-white);
}
.sidebar-search input {
  flex: 1;
  border: none;
  padding: 10px 12px;
  font-size: 13.5px;
  background: transparent;
  color: var(--text-primary);
  outline: none;
  font-family: var(--font-body);
}
.sidebar-search input::placeholder { color: var(--text-muted); }
.sidebar-search button {
  background: var(--green);
  color: #fff;
  padding: 0 14px;
  font-size: 14px;
  transition: background var(--transition);
  border: none;
  cursor: pointer;
}
.sidebar-search button:hover { background: var(--green-dark); }

/* Live search dropdown */
.live-search-results {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  max-height: 320px;
  overflow-y: auto;
  z-index: 200;
  box-shadow: var(--shadow-md);
}
.live-search-results:not([hidden]) { display: block; }
.live-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
}
.live-result-item:hover { background: var(--bg-hero); }
.live-result-item:last-child { border-bottom: none; }
.live-result-item img {
  width: 42px; height: 32px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}
.live-result-title { font-size: 12.5px; color: var(--text-primary); line-height: 1.3; }
.live-search-empty {
  padding: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.live-search-loading {
  padding: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* OS detector box */
.os-detect-box {
  background: var(--bg-hero);
  border: 1px solid var(--border-green);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--text-secondary);
}
.os-name { color: var(--green-dark); font-weight: 700; }

/* Sidebar box */
.sidebar-box {
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.sidebar-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  padding: 12px 14px 10px;
  border-bottom: 2px solid var(--green);
  background: var(--bg-hero);
  font-family: var(--font-head);
}

/* Top Posts */
.top-posts-list { padding: 6px 0; }
.top-post-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  text-decoration: none;
}
.top-post-item:hover { background: var(--bg-hero); }
.top-post-item:last-child { border-bottom: none; }
.top-post-item img {
  width: 56px; height: 42px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}
.top-post-item span {
  font-size: 12.5px;
  color: var(--text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tools List */
.tools-list { padding: 8px 0; }
.tools-list li {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.tools-list li:hover { background: var(--bg-hero); }
.tools-list li:last-child { border-bottom: none; }
.tools-list .tool-icon { font-size: 14px; width: 20px; text-align: center; }
.tools-list a { color: var(--green-dark); }
.btn-view-all {
  display: block;
  text-align: center;
  background: #1a2e1a;
  color: #fff !important;
  padding: 9px;
  font-size: 13px;
  font-weight: 700;
  transition: background var(--transition);
}
body.dark-mode .btn-view-all { background: #2a4a2a; }
.btn-view-all:hover { background: var(--green-darker); }

/* Tags Cloud */
.tags-cloud { padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-hero);
  border: 1px solid var(--border-green);
  color: var(--green-dark) !important;
  padding: 4px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  transition: background var(--transition), border-color var(--transition);
}
.tag-pill:hover { background: var(--green-pale); border-color: var(--green); }
.tag-count {
  background: var(--green);
  color: #fff;
  border-radius: 10px;
  padding: 0 5px;
  font-size: 10px;
}

/* Friendly site */
.friendly-site-box {
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--text-secondary);
}
.friendly-site-box a { color: var(--green-dark); font-weight: 700; }

/* ─── SEARCH PAGE ────────────────────────────────────────── */
.search-header {
  padding: 20px;
  background: var(--bg-hero);
  border-bottom: 1px solid var(--border-green);
}
.search-form-full {
  display: flex;
  gap: 0;
  max-width: 560px;
}
.search-form-full input {
  flex: 1;
  border: 1px solid var(--border);
  border-right: none;
  padding: 11px 16px;
  font-size: 14px;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: var(--bg-white);
  color: var(--text-primary);
  outline: none;
  font-family: var(--font-body);
}
.search-form-full button {
  background: var(--green);
  color: #fff;
  padding: 0 22px;
  font-size: 15px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: background var(--transition);
}
.search-form-full button:hover { background: var(--green-dark); }

/* ─── CATEGORY PAGE ──────────────────────────────────────── */
.cat-header {
  padding: 20px;
  background: var(--bg-hero);
  border-bottom: 2px solid var(--green);
  display: flex;
  align-items: center;
  gap: 14px;
}
.cat-icon-big {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  color: #fff;
  flex-shrink: 0;
}
.cat-header h1 { font-size: 22px; color: var(--text-primary); }
.cat-header p { font-size: 13.5px; color: var(--text-muted); margin-top: 3px; }

/* ─── AD WRAPS ───────────────────────────────────────────── */
.ad-wrap {
  text-align: center;
  padding: 10px 20px;
  background: var(--bg-body);
}
.ad-wrap.ad-header { background: var(--bg-outer); padding: 8px 20px; }

/* ─── FOOTER ─────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-footer);
  margin-top: 30px;
  padding: 16px 20px;
}
.footer-inner {
  max-width: var(--content-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-copy { font-size: 13.5px; color: #888; }
.footer-nav {
  display: flex;
  gap: 10px 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-nav a { font-size: 13px; color: #888; transition: color var(--transition); }
.footer-nav a:hover { color: var(--green); }

@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column !important;
    text-align: center !important;
    gap: 12px !important;
    padding: 16px !important;
  }
  .footer-copy {
    font-size: 12px !important;
    display: block;
    width: 100%;
  }
  .footer-nav {
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100%;
  }
  .footer-nav a {
    font-size: 13px !important;
    padding: 4px 0 !important;
    border-bottom: 1px solid rgba(255,255,255,.08);
    width: 100%;
    text-align: center;
  }
}

/* ─── FLOATING BUTTONS ───────────────────────────────────── */
.dark-toggle {
  position: fixed;
  bottom: 80px; left: 20px;
  width: 42px; height: 42px;
  background: #333;
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  box-shadow: var(--shadow-md);
  z-index: 500;
  transition: background var(--transition), transform var(--transition);
}
.dark-toggle:hover { background: #555; transform: scale(1.08); }

.login-float {
  position: fixed;
  bottom: 20px; left: 20px;
  background: var(--green);
  color: #fff !important;
  width: 54px; height: 54px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 3px 12px rgba(76,175,80,.45);
  z-index: 500;
  transition: background var(--transition), transform var(--transition);
}
.login-float:hover { background: var(--green-dark); transform: scale(1.06); }

.scroll-top {
  position: fixed;
  bottom: 20px; right: 20px;
  width: 42px; height: 42px;
  background: var(--green-darker);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  box-shadow: var(--shadow-md);
  z-index: 500;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
  pointer-events: none;
}
.scroll-top.visible { opacity: 1; transform: translateY(0); pointer-events: all; }
.scroll-top:hover { background: var(--green); }

/* ─── EMPTY STATE ────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state i { font-size: 48px; margin-bottom: 14px; color: var(--border); }
.empty-state h3 { font-size: 18px; margin-bottom: 8px; color: var(--text-secondary); }

/* ─── NOTICE / ALERT ─────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 14px;
  border: 1px solid;
}
.alert-success { background: #e8f5e9; color: #2e7d32; border-color: #c8e6c9; }
.alert-danger   { background: #ffebee; color: #c62828; border-color: #ffcdd2; }
.alert-info     { background: #e3f2fd; color: #1565c0; border-color: #bbdefb; }
body.dark-mode .alert-success { background: #1b3a1b; color: #81c784; border-color: #2a4a2a; }
body.dark-mode .alert-danger  { background: #3a1b1b; color: #ef9a9a; border-color: #4a2a2a; }

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .page-wrap { grid-template-columns: 1fr 260px; }
  --sidebar-w: 260px;
}

@media (max-width: 900px) {
  .page-wrap { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-card { max-width: 100%; }
  .related-grid { grid-template-columns: repeat(3,1fr); }

  .main-nav {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--bg-header);
    flex-direction: column;
    padding: 12px;
    gap: 4px;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .main-nav.open { display: flex; }
  .main-nav > a { width: 100%; padding: 10px 14px; }
  .nav-dropdown { width: 100%; }
  .nav-has-drop { width: 100%; padding: 10px 14px; }
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 0 0 16px;
  }
  .nav-toggle { display: flex; }
}

@media (max-width: 640px) {
  .post-card { flex-direction: column; }
  .post-thumb-wrap { width: 100%; height: 180px; }
  .related-grid { grid-template-columns: repeat(2,1fr); }
  .gallery-grid { grid-template-columns: repeat(2,1fr); }
  .hero-section { padding: 40px 16px 50px; }
  .hero-section h1 { font-size: 22px; }
  .single-wrap { padding: 16px; }
  .lightbox-prev { left: -40px; }
  .lightbox-next { right: -40px; }
}

@media (max-width: 400px) {
  .related-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* ─── KaranPC Exact Feature Card Override ────────────────── */
.features-section {
  background: var(--bg-white);
  padding: 50px 40px 60px;
  max-width: 100%;
  margin: 0;
}
.features-section h2 {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 36px;
  font-family: var(--font-head);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.feature-card {
  background: var(--bg-hero);
  border: 1px solid var(--border-green);
  border-radius: 12px;
  padding: 36px 28px 40px;
  text-align: center;
}
.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--green-dark);
  margin-bottom: 16px;
  font-family: var(--font-head);
}
.feature-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
}
/* Hero exact match */
.hero-section {
  background: var(--bg-hero);
  border-bottom: 3px solid var(--green);
  padding: 80px 40px 90px;
  text-align: center;
  max-width: 100%;
}
.hero-section h1 {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 18px;
  max-width: 820px;
  margin-inline: auto;
  font-family: var(--font-head);
}
.hero-section p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 820px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.btn-hero {
  display: inline-block;
  background: var(--green);
  color: #fff !important;
  padding: 14px 36px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 700;
  transition: background .2s, transform .2s;
  box-shadow: none;
  gap: 0;
}
.btn-hero:hover {
  background: var(--green-dark);
  transform: none;
  box-shadow: none;
}
/* CTA exact */
.cta-section {
  background: var(--bg-hero);
  border-top: 3px solid var(--green);
  padding: 70px 40px 80px;
  text-align: center;
}
.cta-section h2 {
  font-size: 34px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 18px;
  font-family: var(--font-head);
}
.cta-section p {
  font-size: 15.5px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 700px;
  margin-inline: auto;
}
/* Logo exact match — pixelated green font */
.logo-text {
  font-family: 'Courier New', 'Lucida Console', monospace;
  font-size: 22px;
  font-weight: 900;
  color: #00e676 !important;
  letter-spacing: 1px;
  text-shadow: none;
}

/* ─── KaranPC Exact Layout — Green BG + White Content Box ── */

/* Outer body = dark green */
body {
  background: #1a6b1a !important;
}
body.dark-mode {
  background: #0a1a0a !important;
}

/* Content wrapper — centered white box */
.site-content-wrap {
  max-width: 1160px;
  margin: 0 auto;
  background: #ffffff;
  min-height: 100vh;
  box-shadow: 0 0 40px rgba(0,0,0,0.3);
}

/* Hero sits inside content box */
.hero-section {
  background: #e8f5e8;
  margin: 0;
  border-bottom: 2px solid var(--green);
}

/* Features inside content box */
.features-section {
  background: #ffffff;
  margin: 0;
}

/* CTA inside content box */
.cta-section {
  background: #f0faf0;
  border-top: 2px solid var(--green);
  margin: 0;
}

/* Header full width but inner centered */
.site-header {
  background: #1a1a1a;
  width: 100%;
}
.header-inner {
  max-width: 1160px;
  margin: 0 auto;
}

/* Footer full width */
.site-footer {
  background: #1a1a1a;
  width: 100%;
}
.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
}

/* Page wrap inside content box */
.page-wrap {
  max-width: 1240px;
  margin: 0 auto;
  background: var(--bg-white);
}

/* Ad wraps */
.ad-wrap {
  background: #f0faf0;
  max-width: 1240px;
  margin: 0 auto;
}

/* ─── System Info Table ──────────────────────────────────── */
.sysinfo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.sysinfo-table tr {
  border-bottom: .5px solid var(--border);
  transition: background var(--transition);
}
.sysinfo-table tr:last-child { border-bottom: none; }
.sysinfo-table tr:hover { background: var(--bg-hero); }
.si-label {
  padding: 9px 10px 9px 12px;
  color: var(--text-muted);
  font-weight: 500;
  width: 50%;
  vertical-align: middle;
  white-space: nowrap;
}
.si-val {
  padding: 9px 12px 9px 4px;
  color: var(--text-primary);
  vertical-align: middle;
  line-height: 1.4;
}
.si-icon {
  color: var(--green);
  font-size: 11px;
  width: 14px;
  text-align: center;
  margin-right: 5px;
}
.si-loading {
  color: var(--text-muted);
  font-size: 11px;
  font-style: italic;
}

/* ─── OS Compat Badge ────────────────────────────────────── */
#os-compat-badge {
  display: none;
  margin: 12px 0 6px;
}

/* ─── Sysinfo Table Fix ──────────────────────────────────── */
.sysinfo-card .sidebar-title { margin-bottom: 0; }

.sysinfo-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.sysinfo-table tr {
  border-bottom: .5px solid var(--border);
}
.sysinfo-table tr:last-child { border-bottom: none; }
.sysinfo-table tr:hover { background: var(--bg-hero); }

.si-label {
  padding: 10px 8px 10px 12px;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  width: 110px;
  white-space: nowrap;
  vertical-align: middle;
}
.si-icon {
  color: var(--green);
  font-size: 11px;
  margin-right: 5px;
  width: 13px;
  display: inline-block;
  text-align: center;
}
.si-val {
  padding: 10px 12px 10px 4px;
  vertical-align: middle;
  font-size: 12.5px;
  text-align: right;
}
.si-loading {
  color: var(--text-muted);
  font-size: 11px;
  font-style: italic;
}

/* ─── OS Compat Badge ────────────────────────────────────── */
#os-compat-badge { display: none; margin: 10px 0; }
.compat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}
.compat-yes {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}
.compat-no {
  background: #fff8e1;
  color: #e65100;
  border: 1px solid #ffe082;
}
body.dark-mode .compat-yes { background: #1b3a1b; color: #81c784; border-color: #2a4a2a; }
body.dark-mode .compat-no  { background: #3a2a0a; color: #ffb74d; border-color: #4a3a0a; }

/* ═══════════════════════════════════════════════════════════
   Beautiful System Info Card
═══════════════════════════════════════════════════════════ */
.sysinfo-card {
  background: var(--bg-white);
  border: 1.5px solid var(--border-green);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(76,175,80,.10);
}

/* Header */
.sysinfo-header {
  background: #2e7d32;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .2px;
  font-family: var(--font-head);
}
.sysinfo-header i { font-size: 14px; }
.sysinfo-header span:first-of-type { flex: 1; }
.sysinfo-live-dot {
  width: 7px; height: 7px;
  background: #a5d6a7;
  border-radius: 50%;
  animation: siLivePulse 1.8s ease-in-out infinite;
}
@keyframes siLivePulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .4; transform: scale(.8); }
}

/* Rows container */
.sysinfo-rows { padding: 4px 0; }

/* Each row */
.sysinfo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: .5px solid var(--border);
  transition: background var(--transition);
}
.sysinfo-row:hover { background: var(--bg-hero); }

/* Icon circle */
.sysinfo-icon-wrap {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.si-blue   { background: #e3f2fd; color: #1565c0; }
.si-green  { background: #e8f5e9; color: #2e7d32; }
.si-purple { background: #f3e5f5; color: #6a1b9a; }
.si-amber  { background: #fff8e1; color: #e65100; }
body.dark-mode .si-blue   { background: #1a2e4a; color: #90caf9; }
body.dark-mode .si-green  { background: #1b3a1b; color: #81c784; }
body.dark-mode .si-purple { background: #2a1a3a; color: #ce93d8; }
body.dark-mode .si-amber  { background: #3a2a0a; color: #ffb74d; }

/* Text stack */
.sysinfo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.sysinfo-row-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.sysinfo-row-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Value badges inside sysinfo */
.si-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}
.si-badge-blue   { background:#e3f2fd; color:#1565c0; }
.si-badge-green  { background:#e8f5e9; color:#2e7d32; }
.si-badge-purple { background:#f3e5f5; color:#6a1b9a; }
.si-badge-amber  { background:#fff8e1; color:#e65100; }
body.dark-mode .si-badge-blue   { background:#1a2e4a; color:#90caf9; }
body.dark-mode .si-badge-green  { background:#1b3a1b; color:#81c784; }
body.dark-mode .si-badge-purple { background:#2a1a3a; color:#ce93d8; }
body.dark-mode .si-badge-amber  { background:#3a2a0a; color:#ffb74d; }

/* ═══════════════════════════════════════════════════════════
   PHASE 4 — Global Hover Animations & Micro-interactions
═══════════════════════════════════════════════════════════ */

/* ─── Page Load Animation ────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity:0; transform:translateY(16px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes fadeIn {
  from { opacity:0; }
  to   { opacity:1; }
}
@keyframes slideInLeft {
  from { opacity:0; transform:translateX(-20px); }
  to   { opacity:1; transform:translateX(0); }
}
@keyframes scaleIn {
  from { opacity:0; transform:scale(.95); }
  to   { opacity:1; transform:scale(1); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes pulse-green {
  0%,100% { box-shadow: 0 0 0 0 rgba(76,175,80,.4); }
  50%      { box-shadow: 0 0 0 8px rgba(76,175,80,0); }
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Apply animations on load */
.main-content    { animation: fadeIn .35s ease both; }
.sidebar         { animation: slideInLeft .4s ease both; }
.hero-section    { animation: fadeInUp .4s ease both; }
.features-section { animation: fadeInUp .45s ease .1s both; }
.cta-section     { animation: fadeInUp .45s ease .2s both; }
.post-card       { animation: fadeInUp .35s ease both; }
.post-card:nth-child(2) { animation-delay: .05s; }
.post-card:nth-child(3) { animation-delay: .10s; }
.post-card:nth-child(4) { animation-delay: .15s; }
.post-card:nth-child(5) { animation-delay: .20s; }

/* ─── Nav Links ──────────────────────────────────────────── */
.main-nav > a {
  position: relative;
  overflow: hidden;
}
.main-nav > a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; right: 50%;
  height: 2px;
  background: var(--green-logo);
  border-radius: 2px;
  transition: left .25s ease, right .25s ease;
}
.main-nav > a:hover::after,
.main-nav > a.active::after { left:6px; right:6px; }

/* ─── Logo hover ─────────────────────────────────────────── */
.site-logo { transition: transform .2s ease, opacity .2s; }
.site-logo:hover { transform: scale(1.04); opacity: .9; }

/* ─── Hero Button ────────────────────────────────────────── */
.btn-hero {
  position: relative;
  overflow: hidden;
}
.btn-hero::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
  transition: left .5s ease;
}
.btn-hero:hover::before { left: 100%; }

/* ─── Feature Cards ──────────────────────────────────────── */
.feature-card {
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: -100%; left: 0;
  width: 100%; height: 3px;
  background: var(--green);
  transition: top .3s ease;
}
.feature-card:hover::before { top: 0; }
.feature-card h3 { transition: color .2s; }
.feature-card:hover h3 { color: var(--green); }

/* ─── Post Cards ─────────────────────────────────────────── */
.post-card {
  position: relative;
}
.post-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--green);
  border-radius: 3px 0 0 3px;
  transform: scaleY(0);
  transition: transform .25s ease;
}
.post-card:hover::before { transform: scaleY(1); }

/* Read more button shine */
.btn-read-more {
  position: relative;
  overflow: hidden;
}
.btn-read-more::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: rgba(255,255,255,.25);
  transform: skewX(-20deg);
  transition: left .4s ease;
}
.btn-read-more:hover::after { left: 140%; }

/* ─── Sidebar Boxes ──────────────────────────────────────── */
.sidebar-box {
  transition: transform var(--transition), box-shadow var(--transition);
}
.sidebar-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76,175,80,.12);
}

/* Top post items */
.top-post-item img {
  transition: transform .3s ease;
}
.top-post-item:hover img { transform: scale(1.08); }
.top-post-item span { transition: color .2s; }
.top-post-item:hover span { color: var(--green-dark); }

/* Tag pills */
.tag-pill {
  transition: all .2s ease;
}
.tag-pill:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 3px 8px rgba(76,175,80,.2);
}

/* Social icons */
.social-icon {
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), opacity .2s !important;
}
.social-icon:hover {
  transform: scale(1.15) translateY(-3px) !important;
}

/* ─── Single Post ────────────────────────────────────────── */
.featured-image {
  transition: box-shadow .3s;
}
.featured-image:hover { box-shadow: 0 8px 30px rgba(0,0,0,.15); }

/* Gallery items */
.gallery-item {
  transition: transform .25s ease, box-shadow .25s ease;
}
.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}

/* Download rows */
.download-row {
  background: var(--bg-hero);
  border: 1px solid var(--border-green);
  border-left: 4px solid var(--green);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 13px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.download-row:hover { 
  border-left-color: var(--green-dark); 
  box-shadow: var(--shadow-sm); 
}
.dl-link {
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 700;
  transition: color var(--transition);
  position: relative;
  z-index: 99;
}
.dl-link:hover { 
  color: var(--green); 
  text-decoration: underline; 
}

/* Related cards */
.related-card {
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s;
}
.related-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 10px 28px rgba(0,0,0,.15);
}

/* ─── Download Big Button ────────────────────────────────── */
.btn-download-big {
  transition: transform .25s cubic-bezier(.34,1.56,.64,1),
              box-shadow .25s ease,
              opacity .2s !important;
  animation: pulse-green 2.5s ease-in-out infinite;
}
.btn-download-big:hover {
  animation: none;
  transform: translateY(-3px) scale(1.03) !important;
  box-shadow: 0 8px 24px rgba(33,150,243,.45) !important;
  opacity: .95 !important;
}

/* Quick download float button */
.download-quick {
  animation: float 3s ease-in-out infinite;
  transition: transform .2s, background .2s !important;
}
.download-quick:hover {
  animation: none;
  transform: scale(1.12) !important;
}

/* ─── Scroll to top ──────────────────────────────────────── */
.scroll-top {
  transition: opacity .3s, transform .3s, background .2s !important;
}
.scroll-top:hover {
  transform: translateY(-3px) !important;
  animation: float 1.5s ease-in-out infinite;
}

/* ─── Pagination ─────────────────────────────────────────── */
.page-btn {
  transition: all .2s cubic-bezier(.34,1.56,.64,1) !important;
}
.page-btn:hover:not(.active) {
  transform: translateY(-2px) scale(1.08) !important;
}

/* ─── Footer links ───────────────────────────────────────── */
.footer-nav a {
  position: relative;
  transition: color .2s !important;
}
.footer-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: var(--green);
  transform: scaleX(0);
  transition: transform .25s ease;
}
.footer-nav a:hover::after { transform: scaleX(1); }

/* ─── Search input ───────────────────────────────────────── */
.sidebar-search {
  transition: box-shadow .2s ease;
}
.sidebar-search:focus-within {
  box-shadow: 0 0 0 3px rgba(76,175,80,.15);
  border-color: var(--green) !important;
}

/* ─── Breadcrumb links ───────────────────────────────────── */
.breadcrumb li a {
  transition: color .2s;
  position: relative;
}
.breadcrumb li a:hover { color: var(--green); }

/* ─── Tab buttons ────────────────────────────────────────── */
.tab-btn-el {
  transition: color .2s, border-color .2s, transform .2s !important;
}
.tab-btn-el:hover:not(.active) {
  transform: translateY(-1px) !important;
}

/* ─── Category header icon ───────────────────────────────── */
.cat-icon-big {
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.cat-header:hover .cat-icon-big {
  transform: scale(1.1) rotate(-5deg);
}

/* ─── OS Compat Badge pulse ──────────────────────────────── */
.compat-yes {
  animation: pulse-green 2.5s ease-in-out infinite;
}
.compat-yes:hover { animation: none; }

/* ─── Sysinfo rows ───────────────────────────────────────── */
.sysinfo-row {
  transition: background .2s, transform .2s !important;
}
.sysinfo-row:hover {
  padding-left: 18px !important;
}

/* ─── Dark toggle ────────────────────────────────────────── */
.dark-toggle {
  transition: background .2s, transform .25s cubic-bezier(.34,1.56,.64,1) !important;
}
.dark-toggle:hover {
  transform: scale(1.15) rotate(20deg) !important;
}

/* ─── Login float ────────────────────────────────────────── */
.login-float {
  transition: background .2s, transform .25s cubic-bezier(.34,1.56,.64,1) !important;
}
.login-float:hover {
  transform: scale(1.12) !important;
}

/* ─── Skeleton loading ───────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    var(--bg-hero) 25%,
    var(--border) 50%,
    var(--bg-hero) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

/* ─── Smooth image loading ───────────────────────────────── */
img {
  transition: opacity .3s ease;
}
img[loading="lazy"] { opacity: 0; }
img.loaded { opacity: 1; }

/* ─── Link hover color transition ───────────────────────── */
a { transition: color .18s ease; }

/* ─── Mobile nav smooth ──────────────────────────────────── */
.main-nav {
  transition: transform .3s ease;
}

/* ─── Reduce motion for accessibility ───────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   Thumbnail Small + Screenshots Big Fix
═══════════════════════════════════════════════════════════ */

/* Thumbnail — centered small box */
.featured-image {
  margin-bottom: 22px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-hero);
  text-align: center;
  padding: 16px;
}
.featured-image img {
  width: auto !important;
  max-width: 100% !important;
  max-height: 260px !important;
  height: auto !important;
  object-fit: contain !important;
  margin: 0 auto;
  border-radius: var(--radius-sm);
}

/* Screenshots — bigger grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
  gap: 14px !important;
}
.gallery-item {
  aspect-ratio: 16/10 !important;
  border-radius: var(--radius-md) !important;
  border: 1.5px solid var(--border) !important;
}

/* Mobile */
@media (max-width: 640px) {
  .featured-image img { max-height: 180px !important; }
  .gallery-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
}

.dl-link::after { display: none !important; }