:root {
  --bg-main: #0e0f12;
  --bg-card: #16181d;
  --bg-card-hover: #1c1f26;
  --bg-secondary: #121418;
  --bg-header: rgba(14, 15, 18, 0.85);
  --bg-mirror: #181a20;
  --bg-pill: #20232b;
  --border-color: #262932;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-pill: #d1d5db;
  --accent: #f97316;
  --accent-hover: #ea580c;
  --accent-soft: rgba(249, 115, 22, 0.14);
  --accent-border: rgba(249, 115, 22, 0.4);
  --accent-glow: rgba(249, 115, 22, 0.35);
  --green: #10b981;
  --radius: 14px;
}

[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-secondary: #f1f5f9;
  --bg-header: rgba(248, 250, 252, 0.88);
  --bg-mirror: #e2e8f0;
  --bg-pill: #e2e8f0;
  --border-color: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-pill: #1e293b;
  --accent: #0284c7;
  --accent-hover: #0369a1;
  --accent-soft: rgba(6, 182, 212, 0.14);
  --accent-border: rgba(6, 182, 212, 0.55);
  --accent-glow: rgba(6, 182, 212, 0.45);
  --green: #059669;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  transition: background-color 0.25s, color 0.25s;
}

.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

.mirror-bar {
  background: var(--bg-mirror);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.mirror-bar a { color: var(--accent); text-decoration: none; font-weight: 600; margin-left: 6px; }
.mirror-bar a:hover { text-decoration: underline; }

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.logo { font-size: 22px; font-weight: 800; color: var(--text-main); text-decoration: none; letter-spacing: -0.5px; }
.logo span { color: var(--accent); }

.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--text-muted); text-decoration: none; font-size: 15px; font-weight: 500; transition: color 0.2s; }
.nav a:hover { color: var(--text-main); }
.nav .nav-accent { color: var(--accent); font-weight: 600; }

.header-controls { display: flex; align-items: center; gap: 10px; }
.lang-switcher { display: flex; gap: 4px; background: var(--bg-card); padding: 4px; border-radius: 10px; border: 1px solid var(--border-color); }

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
  cursor: pointer;
  opacity: 0.65;
  transition: all 0.2s;
}

.flag-icon {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(128, 128, 128, 0.25);
}

.lang-btn:hover { opacity: 1; }
.lang-btn.active { opacity: 1; background: var(--accent-soft); border-color: var(--accent-border); box-shadow: 0 0 10px var(--accent-glow); }
.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.theme-toggle:hover { border-color: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }

.hero { padding: 68px 0 52px; text-align: center; background: radial-gradient(circle at 50% 0%, var(--accent-soft), transparent 60%); }
.badge { display: inline-block; padding: 6px 14px; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-border); border-radius: 999px; font-size: 13px; font-weight: 600; margin-bottom: 18px; }
.hero h1 { font-size: clamp(30px, 5vw, 50px); font-weight: 800; line-height: 1.15; letter-spacing: -1px; margin-bottom: 16px; }
.hero-sub { max-width: 680px; margin: 0 auto; color: var(--text-muted); font-size: 17px; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; border-radius: 10px; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; transition: all 0.2s; border: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 14px var(--accent-glow); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-full { width: 100%; }

.section { padding: 52px 0; }
.section-dark { background: var(--bg-secondary); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
.section-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.section-header h2 { font-size: 28px; font-weight: 700; }

.platform-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn { background: var(--bg-card); color: var(--text-muted); border: 1px solid var(--border-color); padding: 9px 18px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.filter-btn:hover { color: var(--text-main); border-color: var(--accent); }
.filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 0 18px var(--accent-glow); }

.filter-status { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; background: var(--accent-soft); border: 1px solid var(--accent-border); color: var(--text-main); padding: 12px 18px; border-radius: 10px; margin-bottom: 24px; font-size: 14.5px; }
.reset-filter-btn { background: transparent; border: 1px solid var(--accent-border); color: var(--accent); padding: 4px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.reset-filter-btn:hover { background: var(--accent); color: #fff; }

.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px; }
.card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; transition: all 0.2s; }
.card:hover { border-color: var(--accent-border); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); }
.card-highlight { border-color: var(--accent-border); box-shadow: 0 0 20px var(--accent-soft); }

.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.tag { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 6px; }
.tag-vpn { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.tag-gen { background: var(--accent-soft); color: var(--accent); }
.tag-dpi { background: rgba(16, 185, 129, 0.15); color: var(--green); }
.tag-tg { background: rgba(14, 165, 233, 0.15); color: #0ea5e9; }

.version-badge { font-size: 12px; color: var(--green); background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.25); padding: 3px 9px; border-radius: 6px; font-family: ui-monospace, Menlo, monospace; }
.card h3 { font-size: 21px; margin-bottom: 10px; }
.card-desc { color: var(--text-muted); font-size: 14.5px; margin-bottom: 18px; flex-grow: 1; }

.os-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.os-pill { font-size: 12px; background: var(--bg-pill); color: var(--text-pill); padding: 4px 10px; border-radius: 6px; border: 1px solid transparent; transition: all 0.2s; }
.os-pill.matched { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-border); font-weight: 600; }

.card-sub-links { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 13px; }
.card-sub-links a { color: var(--text-muted); text-decoration: none; }
.card-sub-links a:hover { color: var(--accent); text-decoration: underline; }

.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.article-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 22px; text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: all 0.2s; }
.article-card:hover { border-color: var(--accent); background: var(--bg-card-hover); box-shadow: 0 0 18px var(--accent-soft); }
.article-meta { font-size: 12px; color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.article-card h3 { font-size: 18px; margin-bottom: 10px; line-height: 1.35; }
.article-card p { font-size: 14px; color: var(--text-muted); flex-grow: 1; margin-bottom: 14px; }
.read-more { font-size: 14px; font-weight: 600; color: var(--text-main); }

.footer { padding: 36px 0; border-top: 1px solid var(--border-color); color: var(--text-muted); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-note { margin-top: 6px; }

@media (max-width: 640px) {
  .nav a:not(.nav-accent) { display: none; }
}
.article-layout { max-width: 820px; margin: 0 auto; padding: 48px 20px 80px; }
.article-block { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 30px; margin-bottom: 28px; }
.article-block h2 { font-size: 24px; margin-bottom: 14px; color: var(--accent); }
.article-block h3 { font-size: 18px; margin: 20px 0 10px; }
.article-block p, .article-block li { color: var(--text-muted); font-size: 15.5px; margin-bottom: 10px; }
.article-block ul, .article-block ol { padding-left: 22px; margin-bottom: 16px; }
.code-box { background: var(--bg-main); border: 1px solid var(--border-color); border-radius: 8px; padding: 12px 16px; font-family: ui-monospace, Menlo, monospace; font-size: 13.5px; color: var(--green); overflow-x: auto; margin: 12px 0; }
.alert-box { background: var(--accent-soft); border-left: 3px solid var(--accent); padding: 14px 18px; border-radius: 0 8px 8px 0; margin: 16px 0; font-size: 14.5px; color: var(--text-main); }

/* Обертка для логотипа и заголовка карточки */
.program-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px; /* Чуть увеличили отступ под более крупную иконку */
  margin-bottom: 10px;
}

.program-title-wrap h3 {
  margin: 0;
}

/* Увеличенный единый размер для всех 5 логотипов */
.program-logo {
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  overflow: hidden;
  /* Постоянное мягкое свечение по умолчанию */
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Усиление свечения при наведении на блок с названием и логотипом */
.program-title-wrap:hover .program-logo {
  transform: scale(1.08);
  box-shadow: 0 0 18px rgba(249, 115, 22, 0.65);
}

.program-logo svg {
  width: 100%;
  height: 100%;
  display: block;
}

.warp-buttons-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.warp-buttons-row a {
  padding-left: 6px;
  padding-right: 6px;
  font-size: 13px;
  white-space: nowrap;
}

