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

:root {
  --bg:         #0d0d12;
  --bg2:        #13131a;
  --surface:    #1a1a24;
  --surface2:   #22222f;
  --surface3:   #2a2a3a;
  --border:     #2a2a3e;
  --border2:    #363650;
  --text:       #eeeef6;
  --text2:      #9090aa;
  --text3:      #52526a;
  --teal:       #7c5cfc;
  --teal-dim:   #5438c4;
  --teal-bg:    rgba(124,92,252,.12);
  --red:        #ff4560;
  --blue:       #4a8cff;
  --gold:       #f5a623;
  --green:      #22c55e;
  --green-bg:   rgba(34,197,94,.12);
  --gold-bg:    rgba(245,166,35,.12);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --r:    8px;
  --r2:   12px;
  --shadow: 0 4px 32px rgba(0,0,0,.6);
}

[data-theme="light"] {
  --bg:       #f0f0f8;
  --bg2:      #e4e4f0;
  --surface:  #ffffff;
  --surface2: #f4f4fb;
  --surface3: #eaeaf5;
  --border:   #d4d4e8;
  --border2:  #bcbcd8;
  --text:     #0e0e1a;
  --text2:    #50507a;
  --text3:    #9090b0;
  --teal:     #6344f0;
  --teal-dim: #4a2ed6;
  --shadow:   0 4px 24px rgba(0,0,0,.1);
}

html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.6; min-height: 100vh; transition: background .3s, color .3s; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── HEADER ── */
.site-header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 200;
  transition: background .3s;
}
.header-inner {
  display: flex; align-items: center;
  height: 60px; padding: 0 28px; gap: 20px;
  max-width: 1440px; margin: 0 auto;
}
.hamburger {
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; gap: 5px; padding: 6px 2px; flex-shrink: 0;
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: background .3s; }
.logo {
  font-size: 20px; font-weight: 900; color: var(--text);
  letter-spacing: 1.5px; flex-shrink: 0; display: flex; align-items: center; gap: 8px;
}
.logo-dot { display: none; }
.logo-icon { display: inline-block; flex-shrink: 0; color: var(--teal); }

.main-nav { display: flex; align-items: stretch; flex: 1; justify-content: center; height: 100%; }
.nav-item {
  position: relative; color: var(--text2); font-size: 12.5px; font-weight: 600;
  letter-spacing: .6px; text-transform: uppercase; padding: 0 14px;
  cursor: pointer; white-space: nowrap; display: flex; align-items: center; gap: 4px;
  transition: color .2s;
}
.nav-item:hover, .nav-item.active { color: var(--text); }
.nav-item::after {
  content: ''; position: absolute; bottom: 0; left: 14px; right: 14px;
  height: 2px; background: var(--teal); transform: scaleX(0); transition: transform .2s;
}
.nav-item.active::after, .nav-item:hover::after { transform: scaleX(1); }
.nav-arrow { font-size: 9px; opacity: .6; }

.dropdown-menu {
  display: none; position: absolute; top: calc(100% + 1px); left: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-top: 2px solid var(--teal); min-width: 200px; padding: 6px 0; z-index: 300;
  box-shadow: var(--shadow); border-radius: 0 0 var(--r) var(--r);
}
.nav-item:hover .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block; padding: 10px 16px; font-size: 13px; color: var(--text2);
  text-transform: none; letter-spacing: 0; font-weight: 500;
  transition: color .15s, background .15s;
}
.dropdown-menu a:hover { color: var(--text); background: var(--surface2); }

.header-right { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.theme-toggle-wrap { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.theme-label { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text3); white-space: nowrap; }

.toggle-input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track {
  width: 40px; height: 22px; background: var(--surface2); border: 1px solid var(--border2);
  border-radius: 11px; position: relative; transition: background .3s, border-color .3s;
}
.toggle-track::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--text3); transition: transform .25s, background .25s;
}
.toggle-input:checked + .toggle-track { background: var(--teal-dim); border-color: var(--teal); }
.toggle-input:checked + .toggle-track::after { transform: translateX(18px); background: var(--teal); }

.search-btn {
  background: none; border: none; color: var(--text2); cursor: pointer;
  padding: 7px; border-radius: 6px; display: flex; transition: color .2s, background .2s;
}
.search-btn:hover { color: var(--text); background: var(--surface); }

/* ── HERO GRID ── */
.hero-grid { display: flex; width: 100%; height: 390px; }
.hero-card { flex: 1; position: relative; overflow: hidden; cursor: pointer; }
.hero-card-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  transition: transform .5s cubic-bezier(.25,.46,.45,.94);
}
.hero-card:hover .hero-card-bg { transform: scale(1.07); }
.hero-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.08) 0%, rgba(0,0,0,.62) 55%, rgba(0,0,0,.92) 100%);
}
.hero-card-accent {
  position: absolute; bottom: 0; left: 0; width: 3px; height: 60px; background: var(--teal);
  transition: height .3s; z-index: 3;
}
.hero-card:hover .hero-card-accent { height: 100%; opacity: .3; }

.hero-card-content {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  justify-content: space-between; padding: 14px 15px 16px; z-index: 2;
}
.card-meta-top { display: flex; flex-direction: column; gap: 1px; }
.card-date { font-size: 11px; font-weight: 600; color: rgba(255,255,255,.85); }
.card-updated { font-size: 10px; color: rgba(255,255,255,.5); }
.card-bottom { display: flex; flex-direction: column; gap: 6px; }
.card-category-pill {
  display: inline-flex; align-items: center; width: fit-content;
  background: rgba(255,255,255,.15); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.2); border-radius: 4px;
  padding: 2px 8px; font-size: 10.5px; font-weight: 600; color: #fff; letter-spacing: .4px;
}
.card-title { font-size: 13.5px; font-weight: 700; line-height: 1.4; color: #fff; }
.card-time { display: flex; align-items: center; gap: 4px; font-size: 10.5px; color: rgba(255,255,255,.55); }

/* ── RATING STRIP ── */
.rating-strip { background: var(--bg2); border-bottom: 1px solid var(--border); padding: 20px 28px; }
.rating-strip-inner { max-width: 1200px; margin: 0 auto; }
.rating-strip-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text3); margin-bottom: 14px; }
.rating-cards { display: flex; gap: 14px; }
.rating-card {
  flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r2);
  padding: 14px 16px; display: flex; align-items: center; gap: 14px; cursor: pointer;
  transition: border-color .2s, transform .2s;
}
.rating-card:hover { border-color: var(--teal); transform: translateY(-2px); }
.rating-pos { font-size: 22px; font-weight: 900; color: var(--border2); min-width: 28px; }
.rating-pos.gold { color: var(--gold); }
.rating-pos.silver { color: #a0a0b0; }
.rating-pos.bronze { color: #cd7f32; }
.rating-vpn-name { font-size: 15px; font-weight: 800; color: var(--text); }
.rating-score {
  margin-left: auto; font-size: 14px; font-weight: 800;
  color: #fff; background: var(--teal); padding: 3px 9px; border-radius: 6px;
}
.rating-badge { font-size: 11px; color: var(--text3); font-weight: 500; }

/* ── PAGE LAYOUT ── */
.page-wrap { max-width: 1200px; margin: 0 auto; padding: 40px 28px 80px; display: grid; grid-template-columns: 1fr 340px; gap: 48px; }

/* ── FEATURED ARTICLE ── */
.featured-post { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r2); overflow: hidden; cursor: pointer; transition: border-color .2s; }
.featured-post:hover { border-color: var(--border2); }
.featured-post-meta { padding: 18px 22px 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.featured-author { font-size: 13px; font-weight: 700; color: var(--text); }
.featured-dates { font-size: 12px; color: var(--text3); }
.featured-image-wrap {
  width: 100%; height: 400px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; margin-top: 16px;
}
.featured-post-bottom { padding: 20px 22px 24px; }
.featured-category-label { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--teal); font-weight: 700; margin-bottom: 8px; }
.featured-post-title { font-size: 28px; font-weight: 900; line-height: 1.22; color: var(--text); }

/* ── SIDEBAR ── */
.sidebar-col { }
.sidebar-block { margin-bottom: 36px; }
.sidebar-heading {
  font-size: 11px; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--text2);
  padding-bottom: 12px; border-bottom: 2px solid var(--border2); margin-bottom: 4px;
}
.news-list { display: flex; flex-direction: column; }
.news-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); cursor: pointer; transition: opacity .2s; }
.news-item:hover { opacity: .75; }
.news-thumb-wrap { flex-shrink: 0; width: 80px; height: 68px; border-radius: var(--r); overflow: hidden; }
.news-thumb-bg { width: 100%; height: 100%; background-size: cover; background-position: center; }
.news-info { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.news-title { font-size: 13.5px; font-weight: 600; line-height: 1.4; color: var(--text); }
.news-meta { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text3); margin-top: 5px; }

/* ── ARTICLE PAGE ── */
.article-layout { max-width: 1200px; margin: 0 auto; padding: 52px 28px 100px; display: grid; grid-template-columns: 1fr 280px; gap: 72px; }
.article-header { margin-bottom: 44px; }
.article-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text3); margin-bottom: 20px; }
.article-breadcrumb a { color: var(--teal); transition: opacity .2s; }
.article-breadcrumb a:hover { opacity: .7; }
.article-title { font-size: 44px; font-weight: 900; line-height: 1.16; color: var(--text); margin-bottom: 0; }
.article-meta-row { display: flex; align-items: center; gap: 18px; margin-top: 20px; flex-wrap: wrap; }
.article-author-name { font-size: 13px; font-weight: 700; color: var(--text); }
.article-date { font-size: 12px; color: var(--text3); }
.article-readtime { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text3); }
.article-rating-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--teal); color: #000; font-size: 13px; font-weight: 800;
  padding: 4px 12px; border-radius: 20px; margin-left: auto;
}

/* MD RENDERED CONTENT */
.article-body { font-size: 16.5px; line-height: 1.78; color: var(--text); }
.article-body h2 { font-size: 24px; font-weight: 800; margin: 40px 0 14px; color: var(--text); border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.article-body h3 { font-size: 18px; font-weight: 700; margin: 28px 0 10px; color: var(--text); }
.article-body p { margin-bottom: 18px; }
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 18px; }
.article-body li { margin-bottom: 6px; }
.article-body strong { color: var(--text); font-weight: 700; }
.article-body blockquote {
  border-left: 3px solid var(--teal); margin: 24px 0; padding: 16px 20px;
  background: var(--surface); border-radius: 0 var(--r) var(--r) 0;
  font-style: italic; color: var(--text2);
}
.article-body table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 14.5px; }
.article-body th { background: var(--surface2); text-align: left; padding: 10px 14px; font-weight: 700; border: 1px solid var(--border); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--text2); }
.article-body td { padding: 10px 14px; border: 1px solid var(--border); color: var(--text); }
.article-body tr:nth-child(even) td { background: var(--surface); }
.article-body pre { background: #0d0d10; border: 1px solid var(--border); border-radius: var(--r); padding: 18px 20px; overflow-x: auto; margin: 20px 0; }
.article-body code { font-family: 'SF Mono', 'Consolas', monospace; font-size: 13.5px; color: #a8e6cf; line-height: 1.6; }
.article-body p code, .article-body li code { background: var(--surface2); padding: 2px 6px; border-radius: 4px; font-size: 13px; color: var(--teal); }
.article-body hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.article-body a { color: var(--teal); border-bottom: 1px solid var(--teal-dim); transition: border-color .2s; }
.article-body a:hover { border-color: var(--teal); }
.article-body img { width: 100%; border-radius: 10px; margin: 0 0 28px; object-fit: cover; max-height: 420px; display: block; }

/* ── TOC ── */
.toc-sidebar { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow-y: auto; }
.toc-title { font-size: 16px; font-weight: 800; color: var(--text); margin-bottom: 16px; }
.toc-list { list-style: none; }
.toc-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 9px 0;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: opacity .2s;
}
.toc-item:hover { opacity: .7; }
.toc-num {
  background: var(--surface2); border: 1px solid var(--border); min-width: 24px; height: 24px;
  border-radius: 5px; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: var(--text2); flex-shrink: 0;
}
.toc-item.active .toc-num { background: var(--teal); border-color: var(--teal); color: #000; }
.toc-text { font-size: 13px; line-height: 1.4; color: var(--text2); padding-top: 4px; }
.toc-item.active .toc-text { color: var(--text); }
.toc-sub-list { list-style: none; padding-left: 34px; }
.toc-sub-item { display: flex; align-items: flex-start; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--border); cursor: pointer; font-size: 12.5px; color: var(--text3); transition: color .2s; }
.toc-sub-item:hover { color: var(--text); }
.toc-sub-item::before { content: '▪'; flex-shrink: 0; color: var(--border2); margin-top: 1px; }

/* ── FOOTER ── */
.site-footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 52px 28px 32px; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; margin-bottom: 36px; }
.footer-logo { font-size: 20px; font-weight: 900; letter-spacing: 1.5px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.footer-desc { font-size: 13px; color: var(--text3); line-height: 1.65; max-width: 280px; }
.footer-col-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--text2); margin-bottom: 14px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 13px; color: var(--text3); transition: color .2s; }
.footer-links a:hover { color: var(--teal); }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding-top: 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.footer-copy { font-size: 12px; color: var(--text3); }

/* ── SEARCH OVERLAY ── */
.search-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.8); backdrop-filter: blur(4px); z-index: 500; align-items: flex-start; justify-content: center; padding-top: 130px; }
.search-overlay.open { display: flex; }
.search-box { width: 100%; max-width: 560px; padding: 0 20px; }
.search-input-wrap { position: relative; }
.search-input { width: 100%; background: var(--surface); border: 1px solid var(--border2); border-radius: var(--r2); padding: 16px 20px 16px 48px; font-size: 17px; color: var(--text); outline: none; font-family: var(--font); transition: border-color .2s; }
.search-input:focus { border-color: var(--teal); }
.search-input::placeholder { color: var(--text3); }
.search-icon-abs { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text3); }
.search-hint { text-align: center; margin-top: 12px; font-size: 12px; color: var(--text3); }
.search-hint kbd { background: var(--surface2); border: 1px solid var(--border2); border-radius: 4px; padding: 2px 6px; font-size: 11px; }

/* ── MOBILE NAV ── */
.mobile-nav { display: none; position: fixed; top: 60px; left: 0; width: 280px; height: calc(100vh - 60px); background: var(--bg2); border-right: 1px solid var(--border); z-index: 150; overflow-y: auto; flex-direction: column; padding: 12px 0; box-shadow: var(--shadow); }
.mobile-nav.open { display: flex; }
.mobile-nav-link { display: block; padding: 13px 24px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text2); border-bottom: 1px solid var(--border); transition: color .2s, background .2s; }
.mobile-nav-link:hover { color: var(--text); background: var(--surface); }

/* ── RESPONSIVE ── */
@media (max-width: 1000px) {
  .main-nav { display: none; }
  .page-wrap, .article-layout { grid-template-columns: 1fr; }
  .rating-cards { flex-wrap: wrap; }
  .rating-card { flex: 0 0 calc(50% - 7px); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .hero-grid { flex-wrap: wrap; height: auto; }
  .hero-card { flex: 0 0 50%; height: 230px; }
  .article-title { font-size: 30px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .rating-card { flex: 0 0 100%; }
}
@media (max-width: 480px) {
  .hero-card { flex: 0 0 100%; height: 220px; }
}

/* ── UTILS ── */
.tag { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 3px 9px; border-radius: 4px; }
.tag-reviews { background: rgba(0,201,168,.15); color: var(--teal); }
.tag-news    { background: rgba(255,69,96,.12);  color: var(--red); }
.tag-guides  { background: rgba(74,140,255,.12); color: var(--blue); }
