/* ============================================================
   RoburFan — Liquid Glass Dark Theme (v30 - Restored & Fixed)
   ============================================================ */

/* ===== CSS Variables (Forced Dark Mode) ===== */
:root {
  /* Vibrant & Deep Palette */
  --primary: #3b82f6; /* Vivid Blue */
  --primary-hover: #60a5fa;
  --primary-soft: rgba(59, 130, 246, 0.2);
  --primary-ring: rgba(59, 130, 246, 0.4);
  
  --secondary: #f43f5e; /* Rose */
  --secondary-hover: #fb7185;
  --secondary-soft: rgba(244, 63, 94, 0.2);

  /* Backgrounds: Deep Space */
  --bg: #000000;
  --bg-secondary: #0a0a0a;
  
  /* Glass Surfaces */
  --glass-bg: rgba(25, 25, 30, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.05);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  --glass-blur: blur(20px) saturate(180%);

  /* UI Colors */
  --bg-card: var(--glass-bg); 
  --bg-elevated: rgba(255, 255, 255, 0.03);
  
  --text: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  --border: rgba(255, 255, 255, 0.1);
  --border-light: rgba(255, 255, 255, 0.05);

  --radius: 24px;
  --radius-sm: 12px;
  --radius-lg: 32px;
  --radius-xl: 40px;

  --nav-bg: rgba(10, 10, 10, 0.85);
  --nav-border: rgba(255, 255, 255, 0.08);

  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.15);

  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 15px; color-scheme: dark; }

body {
  font-family: var(--font);
  background: var(--bg);
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(59, 130, 246, 0.12), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(244, 63, 94, 0.08), transparent 40%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ===== Layout ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
main { flex: 1; padding-bottom: 60px; }

/* ===== Utilities ===== */
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.mb-4 { margin-bottom: 32px; }
.section, .section-alt, .dashboard-page { padding: 60px 0 60px; margin-top: 0; }
.section-title { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.section-subtitle { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 32px; }
.empty { text-align: center; padding: 60px 0; color: var(--text-muted); }
.empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }

/* ===== Liquid Glass Utilities & Common Cards ===== */
.glass, .card, .product-card, .article-card-horizontal, .blog-sidebar, .navbar, .form-box, .modal-content, .video-card, .article-box, .dashboard-block, .feed-item, .auth-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius);
}

/* ===== Navbar ===== */
.navbar {
  position: sticky; top: 20px; 
  margin: 0 auto; 
  width: fit-content; 
  border-radius: 100px;
  z-index: 1000; padding: 10px 32px; background: var(--nav-bg);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 0; }
.navbar-brand { font-weight: 700; font-size: 1.2rem; color: #fff; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.navbar-links { display: flex; gap: 24px; }
.navbar-links a { color: var(--text-secondary); font-weight: 500; font-size: 0.95rem; white-space: nowrap; }
.navbar-links a:hover, .navbar-links a.active { color: #fff; text-shadow: 0 0 10px rgba(255,255,255,0.3); }
.navbar-right { display: flex; align-items: center; gap: 10px; }
.mobile-donate-item { display: none; }
.mobile-donate-link,
.mobile-donate-link:hover {
  text-decoration: none;
}

/* Mobile Menu Logic - Fix Duplicates */
.mobile-only { display: none !important; }
.hamburger { display: none; background: none; border: none; font-size: 1.5rem; color: #fff; cursor: pointer; }

@media (max-width: 900px) {
  .navbar-links {
    display: none; flex-direction: column; position: absolute;
    top: 70px; left: 0; right: 0; background: rgba(10, 10, 12, 0.98);
    backdrop-filter: blur(20px); padding: 20px;
    border-radius: var(--radius); border: 1px solid var(--glass-border);
    width: 100%; min-width: unset; box-shadow: 0 8px 32px rgba(0,0,0,0.7);
  }
  .navbar-links > li { width: 100%; }
  .navbar-links > li > a {
    display: block;
    width: 100%;
  }
  .navbar-links.open { display: flex; }
  .hamburger { display: block; }
  .mobile-only { display: block !important; }
  .mobile-donate-item { display: block; margin: 6px 0 10px; }
  .mobile-donate-link {
    display: flex !important;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(251,146,60,0.28);
    background: linear-gradient(135deg, rgba(251,146,60,0.2), rgba(234,88,12,0.14));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 12px 28px rgba(234,88,12,0.2), 0 0 0 1px rgba(251,146,60,0.08);
    position: relative;
    overflow: hidden;
    isolation: isolate;
  }
  .mobile-donate-link:hover {
    color: #fff;
    border-color: rgba(251,146,60,0.5);
    transform: translateY(-2px) scale(1.01);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 16px 34px rgba(234,88,12,0.28), 0 0 24px rgba(251,146,60,0.18);
  }
  .mobile-donate-link::before {
    content: "";
    position: absolute;
    inset: -22% auto auto -18%;
    width: 90px;
    height: 90px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255,196,120,0.34) 0%, rgba(255,196,120,0) 72%);
    pointer-events: none;
    z-index: 0;
  }
  .mobile-donate-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 16%, rgba(255,255,255,0.2) 50%, transparent 84%);
    transform: translateX(-130%);
    transition: transform 0.8s ease;
    pointer-events: none;
    z-index: 0;
  }
  .mobile-donate-link:hover::after {
    transform: translateX(130%);
  }
  .mobile-donate-link__icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 1rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
    animation: donateHeartBeat 1.8s ease-in-out infinite;
    position: relative;
    z-index: 1;
    transform-origin: center;
    transition: transform 0.28s cubic-bezier(.2,.8,.2,1), background 0.28s ease, box-shadow 0.28s ease;
  }
  .mobile-donate-link__copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
    z-index: 1;
  }
  .mobile-donate-link__title {
    color: #fff;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.2;
  }
  .mobile-donate-link:hover .mobile-donate-link__icon {
    transform: scale(1.16);
    background: rgba(255,255,255,0.2);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 0 18px rgba(255,210,166,0.24);
  }
  .mobile-donate-link__hint {
    color: rgba(255,244,235,0.78);
    font-size: 0.78rem;
    line-height: 1.35;
    white-space: normal;
  }
  .mobile-donate-item {
    order: -1;
    margin: 0 0 14px;
  }
  .navbar-right .btn { display: none; } 
  .navbar { margin: 10px; border-radius: var(--radius); top: 0; width: auto; max-width: none; padding: 12px 20px; }
  .navbar .container { width: 100%; }
}

/* ===== Sidebar & Tree ===== */
.blog-sidebar { padding: 24px; position: sticky; top: 100px; height: fit-content; }
.sidebar-tree { margin: 0; padding: 0; }
.tree-item { list-style: none; margin-bottom: 2px; }
.tree-row {
  display: flex; align-items: center; padding: 6px 10px;
  border-radius: 8px; transition: var(--transition);
  color: var(--text-secondary); cursor: pointer;
  border: 1px solid transparent; user-select: none;
  position: relative;
}
.tree-row:hover { background: var(--glass-highlight); color: #fff; }
.tree-row.active-row {
  background: var(--primary-soft); color: var(--primary);
  border-color: var(--primary-ring); font-weight: 600;
}
.tree-toggle {
  width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
  border-radius: 6px; margin-right: 8px; color: var(--text-muted);
  background: rgba(255,255,255,0.05); border: none; cursor: pointer; transition: var(--transition);
  flex-shrink: 0; position: relative; z-index: 10;
}
.tree-toggle:hover { background: rgba(255,255,255,0.15); color: #fff; }
.tree-toggle.expanded svg { transform: rotate(90deg); }
.tree-toggle svg { transition: transform 0.2s; width: 14px; height: 14px; }
.tree-spacer { width: 32px; flex-shrink: 0; } /* Matches toggle width + margin */
.tree-link { 
  color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
  font-size: 0.95rem; margin-right: auto; flex: 1; display: block; text-decoration: none;
}
.tree-link::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 5;
}
.tree-count {
  font-size: 0.7rem; background: var(--bg-elevated); padding: 2px 6px;
  border-radius: 8px; color: var(--text-muted); margin-left: 8px;
}
.tree-nested { 
    padding-left: 0; 
    margin-left: 11px; /* Center with toggle arrow */
    border-left: 1px solid var(--border-light); 
    display: none; 
}
.tree-nested.open { display: block; }

/* ===== Article Horizontal Card ===== */
.article-card-horizontal {
  display: flex; overflow: hidden; position: relative;
  transition: transform 0.25s ease, border-color 0.25s, box-shadow 0.25s;
  background: var(--bg-elevated); margin-bottom: 14px;
  border-radius: var(--radius); border: 1px solid var(--border);
  min-height: 160px;
}
.article-card-horizontal:hover { transform: translateY(-3px); border-color: var(--primary-soft);
  box-shadow: 0 10px 30px -8px rgba(0,0,0,0.55);
}
/* Image block — 38% width, 16:9 ratio */
.article-img-wrapper {
  flex: 0 0 38%;
  aspect-ratio: 16 / 9;
  position: relative; overflow: hidden;
  background: var(--bg);
  align-self: stretch;
}
.article-img {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  transition: transform 0.45s ease;
}
.article-card-horizontal:hover .article-img { transform: scale(1.06); }
/* Vignette on image right edge */
.article-img-wrapper::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 48px;
  background: linear-gradient(to right, transparent, var(--bg-elevated));
  pointer-events: none;
  z-index: 1;
}
/* Video embed block inside article card */
.article-video-wrapper {
  flex: 0 0 38%;
  position: relative; overflow: hidden;
  background: #000;
  align-self: stretch;
  cursor: default;
}
.article-video-wrapper::after { display: none; }
.article-video-embed {
  position: relative; width: 100%; height: 100%;
  padding-bottom: 0;
}
.article-video-embed iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  border: none;
}

/* Text block — flex column, footer always at bottom */
.article-body { padding: 14px 18px; flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; gap: 0; }
.article-header-group { flex-shrink: 0; }
.article-title { margin: 0 0 6px; font-size: 1.05rem; font-weight: 700; line-height: 1.35; color: var(--text); flex-shrink: 0; }
/* Article image title overlay — covers Dzen baked-in title */
.article-img-title {
  position: absolute; inset: auto 0 0 0;
  display: block;
  min-height: 0;
  max-height: 52%;
  padding: 20px 12px 10px;
  box-sizing: border-box;
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.36) 36%, rgba(0,0,0,0.82) 100%);
  color: #fff;
  font-weight: 700;
  line-height: 1.24;
  font-size: 0.7rem;
  overflow: hidden;
  z-index: 2;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
  pointer-events: none;
}
.article-img-title-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  max-height: 2.48em;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.article-img-title--external {
  display: none;
  max-height: 54%;
  padding: 12px 10px 8px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.34) 24%, rgba(0,0,0,0.92) 100%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.article-img-title-text--external {
  -webkit-line-clamp: 2;
  line-clamp: 2;
  max-height: 2.16em;
  font-size: 0.6rem;
  line-height: 1.08;
  letter-spacing: 0;
}
.article-title--external {
  font-weight: 800;
}
.article-title--external .card-main-link {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 800;
}
.article-desc { font-size: 0.83rem; color: var(--text-secondary); margin-bottom: 0; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 5; line-clamp: 5; -webkit-box-orient: vertical; overflow: clip; flex: 1; }
.article-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; border-top: 1px solid var(--border-light); flex-shrink: 0; margin-top: auto; }
.article-meta-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 0.78rem; color: var(--text-muted); margin-bottom: 4px; position: relative; z-index: 30; }
.article-meta-top a { position: relative; z-index: 30; text-decoration: none; }
.article-meta-top a:hover { color: var(--primary-hover); text-decoration: underline; }
.meta-item.category { color: var(--primary) !important; font-weight: 600; }
.meta-cat-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.78rem;
  transition: color 0.15s ease;
}
.meta-cat-link:hover { color: var(--primary); text-decoration: underline; }
.meta-item.author { color: var(--text-muted); font-size: 0.8rem; }
a.author-link { color: var(--primary) !important; text-decoration: none; font-weight: 600; font-size: 0.8rem; }
a.author-link:hover { text-decoration: underline; color: var(--primary-hover) !important; }
.article-author-top { margin-bottom: 2px; }

/* Rating Buttons */
@keyframes rating-float {
  0%   { opacity: 1; transform: translateY(0)   scale(1);    }
  60%  { opacity: 1; transform: translateY(-28px) scale(1.2); }
  100% { opacity: 0; transform: translateY(-48px) scale(0.9); }
}
@keyframes rating-pop {
  0%   { transform: scale(0.80); }
  55%  { transform: scale(1.28); }
  80%  { transform: scale(0.96); }
  100% { transform: scale(1.00); }
}
@keyframes rating-ripple {
  0%   { box-shadow: 0 0 0 0 rgba(226,92,40,0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(226,92,40,0); }
  100% { box-shadow: 0 0 0 0 rgba(226,92,40,0); }
}
.rating-buttons { display: flex; gap: 10px; position: relative; z-index: 20; }
.rating-btn {
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: 10px; padding: 6px 12px; color: var(--text-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.rating-btn:hover { background: rgba(255,255,255,0.1); color: #fff; transform: translateY(-2px); }
.rating-btn.active {
  background: var(--primary); border-color: var(--primary); color: #fff;
  box-shadow: 0 0 15px var(--primary-soft);
  animation: rating-pop 0.38s cubic-bezier(0.36,0.07,0.19,0.97) both,
             rating-ripple 0.5s ease-out 0.05s both;
}
.rating-btn.active svg { fill: currentColor; }

/* Кнопки лайк/дизлайк в авторской статье — фиолетовая тема */
@keyframes rating-ripple-purple {
  0%   { box-shadow: 0 0 0 0 rgba(139,92,246,0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(139,92,246,0); }
  100% { box-shadow: 0 0 0 0 rgba(139,92,246,0); }
}
.article-card-authored .rating-btn {
  border-color: rgba(139,92,246,0.25);
  color: #a78bfa;
}
.article-card-authored .rating-btn:hover {
  background: rgba(139,92,246,0.15);
  border-color: rgba(139,92,246,0.45);
  color: #c4b5fd;
}
.article-card-authored .rating-btn.active {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  border-color: #7c3aed;
  color: #fff;
  box-shadow: 0 0 12px rgba(139,92,246,0.40);
  animation: rating-pop 0.38s cubic-bezier(0.36,0.07,0.19,0.97) both,
             rating-ripple-purple 0.5s ease-out 0.05s both;
}

/* Read Button */
.article-action-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px;
  background: var(--bg-elevated); color: var(--text);
  font-size: 0.85rem; font-weight: 600;
  transition: all 0.2s ease; border: 1px solid var(--border-light);
  position: relative; z-index: 30; text-decoration: none;
  flex-shrink: 0; white-space: nowrap;
}
.article-card-horizontal:hover .article-action-link,
.help-card:hover .article-action-link {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.article-adblock-note {
  display: none;
  margin-top: 8px;
  font-size: 0.74rem;
  line-height: 1.45;
  color: rgba(255,226,194,0.86);
}
body.adblock-detected .article-adblock-note {
  display: block;
}

/* Pinned article */
.article-card-pinned {
  border-color: var(--primary);
  border-width: 2px;
  box-shadow: 0 0 0 3px rgba(226, 92, 40, 0.12), 0 4px 20px rgba(0,0,0,0.25);
}
.article-card-pinned:hover {
  box-shadow: 0 0 0 3px rgba(226, 92, 40, 0.2), 0 10px 30px rgba(0,0,0,0.45);
}
/* Super-pinned article — orange glow, thicker border */
.article-card-super-pinned {
  border-color: #f97316;
  border-width: 2px;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.22), 0 4px 24px rgba(249,115,22,0.18);
}
.article-card-super-pinned:hover {
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.32), 0 10px 32px rgba(249,115,22,0.28);
}
.article-super-pin-badge {
  background: linear-gradient(135deg, #f97316, #ea580c) !important;
  box-shadow: 0 2px 8px rgba(249,115,22,0.45);
}
.article-pin-badge { display: none; }
.article-pin-badge-corner {
  position: absolute; top: 10px; right: 10px; z-index: 40;
  background: var(--primary); color: #fff;
  font-size: 0.75rem; font-weight: 700; padding: 3px 8px;
  border-radius: 20px; letter-spacing: 0.03em;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(226,92,40,0.4);
}

/* ===== Авторская статья — карточка ===== */
@keyframes authored-glow {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(139,92,246,0.30), 0 0 10px rgba(139,92,246,0.12), 0 4px 18px rgba(0,0,0,0.15);
    border-color: rgba(139,92,246,0.32);
  }
  50% {
    box-shadow: 0 0 0 2px rgba(167,139,250,0.50), 0 0 20px rgba(167,139,250,0.22), 0 4px 22px rgba(139,92,246,0.14);
    border-color: rgba(167,139,250,0.55);
  }
}
@keyframes btn-authored-shimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}
.article-card-authored {
  border: 1px solid rgba(139,92,246,0.32);
  background: linear-gradient(135deg, rgba(139,92,246,0.08) 0%, rgba(79,70,229,0.04) 50%, var(--glass-bg) 100%);
  animation: authored-glow 3s ease-in-out infinite;
  position: relative;
}
.article-card-authored:hover {
  animation: none;
  border-color: rgba(167,139,250,0.60);
  box-shadow: 0 0 0 2px rgba(139,92,246,0.25), 0 0 24px rgba(167,139,250,0.20), 0 8px 28px rgba(0,0,0,0.20);
  transform: translateY(-2px);
}

/* Заголовок авторской статьи */
.article-title--authored .card-main-link {
  color: #c4b5fd;
  transition: color 0.2s;
}
.article-title--authored .card-main-link:hover {
  color: #ede9fe;
}

/* Кнопка «Читать» авторской статьи */
.article-action-link--authored {
  background: linear-gradient(90deg, #7c3aed, #a78bfa, #c4b5fd, #a78bfa, #7c3aed) !important;
  background-size: 250% auto !important;
  animation: btn-authored-shimmer 3s linear infinite !important;
  border-color: transparent !important;
  color: #fff !important;
}
.article-action-link--authored:hover {
  animation-duration: 1.2s !important;
  box-shadow: 0 0 14px rgba(167,139,250,0.45) !important;
  color: #fff !important;
}

/* Бейдж «✍ Авторская статья» в карточке */
.meta-authored-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #c4b5fd;
  background: linear-gradient(135deg, rgba(139,92,246,0.22), rgba(109,40,217,0.15));
  border: 1px solid rgba(139,92,246,0.35);
  border-radius: 999px;
  padding: 3px 10px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-shadow: 0 0 12px rgba(167,139,250,0.5);
}
.meta-authored-name {
  font-size: 0.78rem;
  color: #a78bfa;
  margin-left: 6px;
  font-weight: 600;
}

/* Бейдж в детальной странице */
.article-badge--authored {
  background: linear-gradient(135deg, rgba(139,92,246,0.25), rgba(79,70,229,0.18));
  border: 1px solid rgba(139,92,246,0.4);
  color: #c4b5fd;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(196,181,253,0.4);
}

/* ===== Авторская + закреплённая (комбо) ===== */
@keyframes authored-pinned-glow {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(139,92,246,0.35), 0 0 12px rgba(139,92,246,0.14), 0 4px 18px rgba(0,0,0,0.15);
    border-color: rgba(139,92,246,0.38);
  }
  50% {
    box-shadow: 0 0 0 2px rgba(45,156,219,0.50), 0 0 18px rgba(45,156,219,0.20), 0 4px 22px rgba(139,92,246,0.12);
    border-color: rgba(45,156,219,0.55);
  }
}
@keyframes authored-superpinned-glow {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(139,92,246,0.40), 0 0 14px rgba(139,92,246,0.16), 0 4px 20px rgba(0,0,0,0.15);
    border-color: rgba(139,92,246,0.42);
  }
  50% {
    box-shadow: 0 0 0 2px rgba(249,115,22,0.50), 0 0 20px rgba(249,115,22,0.22), 0 4px 24px rgba(139,92,246,0.12);
    border-color: rgba(249,115,22,0.55);
  }
}

/* Авторская + закреплено: пульсирует фиолетово ↔ синево */
.article-card-authored.article-card-pinned {
  border: 1px solid rgba(139,92,246,0.38);
  background: linear-gradient(135deg, rgba(139,92,246,0.08) 0%, rgba(45,156,219,0.04) 50%, var(--glass-bg) 100%);
  animation: authored-pinned-glow 2.8s ease-in-out infinite;
}
.article-card-authored.article-card-pinned:hover {
  animation: none;
  border-color: rgba(167,139,250,0.60);
  box-shadow: 0 0 0 2px rgba(139,92,246,0.25), 0 0 20px rgba(45,156,219,0.18), 0 8px 28px rgba(0,0,0,0.20);
  transform: translateY(-2px);
}

/* Авторская + суперзакреплено: пульсирует фиолетово ↔ огненно */
.article-card-authored.article-card-super-pinned {
  border: 1px solid rgba(139,92,246,0.42);
  background: linear-gradient(135deg, rgba(139,92,246,0.10) 0%, rgba(249,115,22,0.05) 50%, var(--glass-bg) 100%);
  animation: authored-superpinned-glow 2.4s ease-in-out infinite;
}
.article-card-authored.article-card-super-pinned:hover {
  animation: none;
  border-color: rgba(249,115,22,0.65);
  box-shadow: 0 0 0 2px rgba(249,115,22,0.28), 0 0 22px rgba(249,115,22,0.20), 0 8px 28px rgba(0,0,0,0.20);
  transform: translateY(-2px);
}

/* Ссылка на автора в детальной странице */
.article-author-link {
  text-decoration: none;
  color: var(--text);
  transition: color 0.15s;
}
.article-author-link:hover {
  color: #a78bfa;
}
.article-author-link strong {
  border-bottom: 1px dashed rgba(167,139,250,0.5);
  color: #c4b5fd;
}

/* ===== Access Request CTA Block ===== */
.access-request-block {
  display: flex; align-items: flex-start; gap: 20px;
  padding: 28px 32px;
  background: var(--glass-bg);
  border: 1px solid var(--primary-soft);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
}
.access-request-icon { font-size: 2.4rem; flex-shrink: 0; margin-top: 2px; }
.access-request-body { flex: 1; }
.access-request-title { font-size: 1.2rem; font-weight: 800; margin: 0 0 8px; }
.access-request-desc { color: var(--text-secondary); font-size: 0.95rem; margin: 0 0 16px; }
.access-request-status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 600;
}
.access-request-status--pending { background: rgba(255,193,7,0.12); border: 1px solid rgba(255,193,7,0.4); color: #b8860b; }
.access-request-status--approved { background: rgba(40,167,69,0.12); border: 1px solid rgba(40,167,69,0.4); color: #1a7a35; }
.access-request-status--rejected { background: rgba(220,53,69,0.12); border: 1px solid rgba(220,53,69,0.4); color: #a71d2a; }
@media (max-width: 600px) {
  .access-request-block { flex-direction: column; gap: 12px; padding: 20px; }
}

/* ===== Solutions page category blocks ===== */
.solutions-category-section { margin-bottom: 36px; }
.solutions-category-header {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; margin-bottom: 12px;
  background: transparent; border: none;
  border-left: 3px solid var(--primary);
  border-radius: 0;
  transition: opacity 0.15s;
}
.solutions-category-header:hover { opacity: 0.8; }
.solutions-category-info { flex: 1; min-width: 0; }
.solutions-category-name { font-size: 1rem; font-weight: 700; color: var(--text); }
.solutions-category-desc { font-size: 0.8rem; color: var(--text-muted); margin-top: 1px; }
.solutions-category-arrow { color: var(--primary); font-size: 1.1rem; font-weight: 600; flex-shrink: 0; }
/* Products inside category: compact grid, no images */
.solutions-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  padding-left: 20px;
  border-left: 2px solid var(--border-light);
  margin-left: 1px;
}
.solutions-products-grid .card-img-top,
.solutions-products-grid .card-img-placeholder { height: 80px; }
.solutions-products-grid .card-body { padding: 10px 12px; }
.solutions-products-grid .card-title { font-size: 0.85rem; margin-bottom: 4px; font-weight: 600; }
.solutions-products-grid .card-text { font-size: 0.77rem; margin-bottom: 8px; -webkit-line-clamp: 2; line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.solutions-products-grid .btn { padding: 5px 10px; font-size: 0.77rem; }

/* ===== Product Cards (Grid) ===== */
/* Home page: compact 4-column grid */
.home-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 36px;
}
/* Authenticated home: slightly smaller cards */
.home-products-grid--sm {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.home-products-grid--sm .card-img-top,
.home-products-grid--sm .card-img-placeholder { height: 80px; }
.home-products-grid--sm .card-body { padding: 10px 12px; }
.home-products-grid--sm .card-title { font-size: 0.83rem; margin-bottom: 3px; }
.home-products-grid--sm .card-text { font-size: 0.76rem; margin-bottom: 8px; }
.home-products-grid--sm .btn { padding: 5px 10px; font-size: 0.76rem; }
/* Full products page: wider cards */
.solutions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}
.product-card {
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
  background: var(--glass-bg);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-soft); }
/* Home grid: compact image */
.home-products-grid .card-img-top,
.home-products-grid .card-img-placeholder { height: 110px; }
/* Solutions page: full image */
.solutions-grid .card-img-top,
.solutions-grid .card-img-placeholder { height: 160px; }
.card-img-top {
  width: 100%; height: 160px; object-fit: cover;
  border-bottom: 1px solid var(--border-light);
}
/* Home: compact body padding */
.home-products-grid .card-body { padding: 12px 14px; }
.home-products-grid .card-title { font-size: 0.9rem; margin-bottom: 4px; }
.home-products-grid .card-text { font-size: 0.8rem; margin-bottom: 10px; -webkit-line-clamp: 2; line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.home-products-grid .btn { padding: 6px 14px; font-size: 0.8rem; }
.card-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.card-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.card-text { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 14px; flex: 1; line-height: 1.5; }
.card-footer-action { margin-top: auto; }
.card-img-placeholder {
  width: 100%; height: 160px; background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; color: var(--text-muted); border-bottom: 1px solid var(--border-light);
}
/* Pinned badge */
.product-pinned-badge {
  position: absolute; top: 8px; right: 8px; background: var(--primary);
  color: #fff; font-size: 0.68rem; font-weight: 700; padding: 2px 7px;
  border-radius: 20px; letter-spacing: 0.03em; z-index: 2;
}
.product-card { position: relative; }

/* ===== Solutions Group Cards ===== */
.group-card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  text-decoration: none;
}
.group-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  border-color: var(--primary-soft);
}
.group-card-img {
  width: 100%; height: 200px; object-fit: cover;
  transition: transform 0.5s ease;
}
.group-card:hover .group-card-img { transform: scale(1.05); }
.group-card-placeholder {
  width: 100%; height: 200px; background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--border-light);
}
.group-card-body {
  padding: 24px; display: flex; flex-direction: column; flex: 1;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.2));
}
.group-title {
  font-size: 1.4rem; font-weight: 800; margin-bottom: 12px; color: #fff;
}
.group-desc {
  font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 24px; line-height: 1.5;
}
.card-link { display: block; color: inherit; }

/* ===== Auth & Forms ===== */
.auth-container { 
  display: flex; align-items: center; justify-content: center; 
  min-height: calc(100vh - 160px); padding: 40px 20px;
  width: 100%;
}
.auth-card { 
  width: 100%; max-width: 440px; padding: 44px 40px 36px; text-align: center;
  margin: 0 auto;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}
.auth-logo { font-size: 2.2rem; margin-bottom: 12px; }
.auth-message { margin-bottom: 16px; padding: 10px 14px; border-radius: 8px; font-size: 0.88rem; text-align: left; }
.auth-message-warning { background: rgba(226,92,40,0.12); border: 1px solid rgba(226,92,40,0.3); color: var(--text-primary); }
.auth-message-success { background: rgba(39,174,96,0.12); border: 1px solid rgba(39,174,96,0.3); color: var(--text-primary); }
.auth-message-error { background: rgba(226,40,40,0.12); border: 1px solid rgba(226,40,40,0.3); color: var(--text-primary); }
.auth-message-info { background: rgba(45,156,219,0.12); border: 1px solid rgba(45,156,219,0.3); color: var(--text-primary); }
.auth-card h2 { font-size: 1.7rem; margin-bottom: 6px; font-weight: 800; }
.auth-card .auth-subtitle { color: var(--text-muted); margin-bottom: 28px; font-size: 0.93rem; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--text-muted); font-size: 0.8rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.form-group { margin-bottom: 16px; text-align: left; }
.form-label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.85rem; color: var(--text-secondary); letter-spacing: 0.02em; }
.form-control,
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="number"],
.auth-form select,
.auth-form textarea {
  width: 100%; padding: 11px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-size: 0.93rem; transition: var(--transition);
  box-sizing: border-box;
}
.form-control:focus,
.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
  background: rgba(255,255,255,0.07);
}
.auth-form .form-text { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; line-height: 1.4; }
.auth-footer { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; font-size: 0.88rem; color: var(--text-muted); }
.auth-footer a { color: var(--primary); text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }
.auth-footer-row { display: flex; justify-content: space-between; align-items: center; }
.auth-error { background: rgba(220,50,50,0.1); border: 1px solid rgba(220,50,50,0.3); border-radius: var(--radius-sm); padding: 10px 14px; color: #f87171; font-size: 0.85rem; margin-bottom: 16px; text-align: left; }
.auth-field-error { font-size: 0.8rem; color: #f87171; margin-top: 4px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 24px; border-radius: var(--radius-sm); font-weight: 600;
  cursor: pointer; transition: var(--transition); text-decoration: none; border: 1px solid transparent;
}
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 4px 12px var(--primary-soft); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--bg-elevated); }
.btn-block { width: 100%; }
.btn-donate {
  background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
  color: #fff;
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 10px 24px rgba(234,88,12,0.24), inset 0 1px 0 rgba(255,255,255,0.18);
  position: relative;
  overflow: hidden;
}
.btn-donate:hover {
  color: #fff;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 18px 38px rgba(234,88,12,0.34), inset 0 1px 0 rgba(255,255,255,0.22);
}
.btn-donate::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(251,146,60,0.38) 0%, rgba(251,146,60,0) 68%);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}
.btn-donate::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,0.22) 50%, transparent 80%);
  transform: translateX(-140%);
  transition: transform 0.65s ease;
}
.btn-donate:hover::after {
  transform: translateX(140%);
}
.btn-donate:hover::before {
  opacity: 1;
  transform: scale(1.02);
}
.btn-donate-nav {
  gap: 10px;
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
  animation: donateButtonPulse 2.8s ease-in-out infinite;
  isolation: isolate;
  border: 1px solid rgba(255,214,170,0.3);
  transition: transform 0.28s cubic-bezier(.2,.8,.2,1), box-shadow 0.28s cubic-bezier(.2,.8,.2,1), border-color 0.28s ease, filter 0.28s ease;
  flex: 0 0 auto;
  transform-origin: center;
}
.btn-donate-nav:hover {
  color: #fff;
  transform: translateY(-2px) scale(1.032);
  border-color: rgba(255,222,184,0.68);
  box-shadow: 0 10px 24px rgba(234,88,12,0.18), 0 0 0 3px rgba(251,146,60,0.08), 0 0 30px rgba(251,146,60,0.24), inset 0 1px 0 rgba(255,255,255,0.24);
  filter: saturate(1.04);
}
.btn-donate-nav__icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
  font-size: 0.82rem;
  line-height: 1;
  animation: donateHeartBeat 1.8s ease-in-out infinite;
  transition: transform 0.28s cubic-bezier(.2,.8,.2,1), background 0.28s ease, box-shadow 0.28s ease;
  transform-origin: center;
  flex: 0 0 22px;
}
.btn-donate-nav__label {
  font-size: 0.88rem;
  letter-spacing: 0.01em;
}
.btn-donate-nav::before {
  inset: -10px;
  background: radial-gradient(circle, rgba(251,146,60,0.34) 0%, rgba(251,146,60,0.14) 38%, rgba(251,146,60,0) 72%);
  filter: blur(6px);
}
.btn-donate-nav::before {
  animation: donateButtonAura 2.8s ease-in-out infinite;
}
.btn-donate-nav:hover::before {
  opacity: 0.62;
  transform: scale(1.12);
}
.btn-donate-nav:hover .btn-donate-nav__icon {
  background: rgba(255,255,255,0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 0 18px rgba(255,210,166,0.22);
  transform: scale(1.14);
}
@keyframes donateButtonPulse {
  0%, 100% { box-shadow: 0 10px 24px rgba(234,88,12,0.24), inset 0 1px 0 rgba(255,255,255,0.18); }
  50% { box-shadow: 0 14px 34px rgba(234,88,12,0.38), inset 0 1px 0 rgba(255,255,255,0.22); }
}
@keyframes donateButtonAura {
  0%, 100% { opacity: 0.18; transform: scale(0.92); }
  50% { opacity: 0.42; transform: scale(1.06); }
}
@keyframes donateHeartBeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.08); }
  28% { transform: scale(0.98); }
  42% { transform: scale(1.12); }
  70% { transform: scale(1); }
}

/* ===== Donate CTA block on product page ===== */
.donate-cta {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 22px 28px;
  backdrop-filter: var(--glass-blur);
}
.donate-cta__icon { font-size: 2rem; flex-shrink: 0; transform-origin: center; transition: transform 0.32s cubic-bezier(.2,.8,.2,1), filter 0.32s ease; }
.donate-cta:hover .donate-cta__icon { transform: scale(1.18); filter: drop-shadow(0 0 10px rgba(251,146,60,0.28)); }
.donate-cta__body { flex: 1; min-width: 180px; }
.donate-cta__title { font-weight: 700; font-size: 1rem; margin-bottom: 4px; color: var(--text); }
.donate-cta__text { font-size: 0.88rem; color: var(--text-secondary); }
@media (max-width: 540px) {
  .donate-cta { flex-direction: column; align-items: flex-start; }
  .donate-cta .btn-donate { width: 100%; justify-content: center; }
}

/* ===== Donate Modal ===== */
.donate-modal {
  position: fixed;
  inset: 0;
  margin: 0;
  border: none;
  padding: 0;
  background: transparent;
  max-width: none;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}
.donate-modal[open] {
  display: grid;
  place-items: center;
  padding: 16px;
}
.donate-modal::backdrop {
  background: rgba(7, 10, 16, 0.76);
  backdrop-filter: blur(10px);
  animation: donateBackdropEnter 0.38s ease both;
}
.donate-modal-shell {
  position: relative;
  width: min(960px, calc(100vw - 32px));
  margin: 0;
  max-height: min(720px, calc(100vh - 40px));
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    radial-gradient(circle at top right, rgba(251,146,60,0.22), transparent 34%),
    linear-gradient(180deg, rgba(19,24,34,0.98), rgba(11,15,22,0.98));
  box-shadow: 0 28px 80px rgba(0,0,0,0.4);
  transform-origin: center;
  animation: modalShellEnter 0.42s cubic-bezier(.2,.8,.2,1), modalShellGlow 7s ease-in-out infinite;
  isolation: isolate;
}
.donate-modal-shell::before,
.donate-modal-shell::after {
  content: "";
  position: absolute;
  inset: auto;
  pointer-events: none;
  z-index: 0;
  border-radius: 999px;
  filter: blur(10px);
}
.donate-modal-shell::before {
  top: -40px;
  right: -10px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(251,146,60,0.22) 0%, rgba(251,146,60,0) 72%);
}
.donate-modal-shell::after {
  bottom: -60px;
  left: -24px;
  width: 210px;
  height: 210px;
  background: radial-gradient(circle, rgba(96,165,250,0.14) 0%, rgba(96,165,250,0) 72%);
}
@keyframes donateBackdropEnter {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modalShellEnter {
  from { opacity: 0; transform: translateY(28px) scale(0.94) rotateX(8deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotateX(0deg); }
}
@keyframes modalShellGlow {
  0%, 100% { box-shadow: 0 28px 80px rgba(0,0,0,0.4); }
  50% { box-shadow: 0 34px 96px rgba(0,0,0,0.46), 0 0 0 1px rgba(255,255,255,0.03); }
}
.donate-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  transition: background 0.15s, transform 0.15s;
}
.donate-modal-close:hover {
  background: rgba(255,255,255,0.12);
  color: var(--text);
  transform: scale(1.04);
}
.donate-modal-copy {
  padding: 40px 36px 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: modalContentEnter 0.45s ease both;
  animation-delay: 0.08s;
  position: relative;
  z-index: 1;
}
.donate-modal-badge {
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: #ffd8b2;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.donate-modal-title {
  margin: 0 0 14px;
  font-size: clamp(1.8rem, 2vw, 2.3rem);
  line-height: 1.08;
  color: #fff;
}
.donate-modal-text {
  margin: 0;
  color: rgba(232,238,247,0.78);
  font-size: 1rem;
  line-height: 1.72;
}
.donate-modal-points {
  margin-top: 24px;
  display: grid;
  gap: 12px;
}
.donate-modal-point {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: rgba(236,242,250,0.84);
  opacity: 0;
  animation: modalPointEnter 0.45s ease forwards;
  cursor: default;
  transition: background 0.22s, border-color 0.22s, box-shadow 0.22s, transform 0.18s;
}
.donate-modal-point:nth-child(1) { animation-delay: 0.18s; }
.donate-modal-point:nth-child(2) { animation-delay: 0.26s; }
.donate-modal-point:nth-child(3) { animation-delay: 0.34s; }

/* Hover: цвет подсветки уникален для каждого пункта */
.donate-modal-point:nth-child(1):hover {
  background: rgba(251,146,60,0.10);
  border-color: rgba(251,146,60,0.30);
  box-shadow: 0 4px 18px rgba(251,146,60,0.12);
  transform: translateX(4px);
}
.donate-modal-point:nth-child(2):hover {
  background: rgba(96,165,250,0.10);
  border-color: rgba(96,165,250,0.30);
  box-shadow: 0 4px 18px rgba(96,165,250,0.12);
  transform: translateX(4px);
}
.donate-modal-point:nth-child(3):hover {
  background: rgba(167,139,250,0.10);
  border-color: rgba(167,139,250,0.30);
  box-shadow: 0 4px 18px rgba(167,139,250,0.12);
  transform: translateX(4px);
}

/* Иконка внутри пункта при hover тоже реагирует */
.donate-modal-point:nth-child(1):hover .donate-modal-point__icon {
  background: rgba(251,146,60,0.24);
  transform: scale(1.12) rotate(-6deg);
}
.donate-modal-point:nth-child(2):hover .donate-modal-point__icon {
  background: rgba(96,165,250,0.20);
  transform: scale(1.12) rotate(6deg);
}
.donate-modal-point:nth-child(3):hover .donate-modal-point__icon {
  background: rgba(167,139,250,0.20);
  transform: scale(1.12) rotate(-6deg);
}

.donate-modal-point__icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(251,146,60,0.14);
  color: #ffc38b;
  flex-shrink: 0;
  transition: background 0.22s, transform 0.22s;
}
.donate-modal-panel {
  padding: 38px 34px 34px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border-left: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: modalContentEnter 0.45s ease both;
  animation-delay: 0.14s;
  position: relative;
  z-index: 1;
}
@keyframes modalContentEnter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes modalPointEnter {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.donate-modal-panel__eyebrow {
  margin-bottom: 10px;
  color: #ffcf9f;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.donate-modal-panel__title {
  margin-bottom: 10px;
  color: #fff;
  font-size: 1.45rem;
  font-weight: 700;
}
.donate-modal-panel__text {
  margin-bottom: 22px;
  color: rgba(232,238,247,0.72);
  font-size: 0.94rem;
  line-height: 1.68;
}
.donate-qr-card {
  width: min(100%, 254px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  padding: 16px;
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff, #f7f8fb);
  box-shadow: 0 22px 40px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(.2,.8,.2,1), box-shadow 0.28s;
  cursor: pointer;
}
.donate-qr-card:hover {
  transform: scale(1.045) translateY(-3px);
  box-shadow: 0 32px 56px rgba(0,0,0,0.26), 0 0 0 2px rgba(139,92,246,0.22);
}
.donate-qr-card:hover .donate-qr__img {
  filter: brightness(1.04);
}
.donate-qr-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(79,70,229,0.02));
  pointer-events: none;
}
.donate-qr__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,0.08);
  background: #fff;
  padding: 8px;
  position: relative;
  z-index: 1;
}
.donate-qr__placeholder {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  border: 2px dashed #d8deea;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #64748b;
  text-align: center;
}
.donate-qr__icon { font-size: 2.3rem; line-height: 1; color: #ea580c; }
.donate-qr__text { font-weight: 700; font-size: 0.98rem; color: #0f172a; }
.donate-qr__hint { font-size: 0.8rem; }
.donate-modal-note {
  margin-top: 16px;
  color: rgba(232,238,247,0.6);
  font-size: 0.82rem;
  line-height: 1.6;
  text-align: center;
}
.donate-links {
  display: flex; gap: 10px; justify-content: flex-start; margin-top: 26px;
  flex-wrap: wrap;
}
.donate-links--panel {
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* Кнопка «Открыть ЮMoney» — ripple при клике + pulse hover */
.donate-links--panel .btn-donate {
  position: relative;
  overflow: hidden;
  transition: transform 0.18s, box-shadow 0.18s;
}
.donate-links--panel .btn-donate:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 24px rgba(251,146,60,0.30);
}
.donate-links--panel .btn-donate:active {
  transform: scale(0.96);
}
.donate-links--panel .btn-donate::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(255,255,255,0.35) 0%, transparent 70%);
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.5s, transform 0.5s;
  pointer-events: none;
}
.donate-links--panel .btn-donate:active::after {
  opacity: 1;
  transform: scale(2.5);
  transition: none;
}
@media (max-width: 900px) {
  .donate-modal-shell {
    grid-template-columns: 1fr;
  }
  .donate-modal-panel {
    order: -1;
    border-left: none;
    border-top: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .donate-modal-copy {
    order: 1;
  }
  .donate-modal-panel {
    padding-bottom: 24px;
  }
}
@media (max-width: 520px) {
  .btn-donate-nav {
    padding: 9px 12px;
    animation: donateButtonPulse 2.8s ease-in-out infinite;
    border-color: rgba(255,214,170,0.18);
  }
  .btn-donate-nav__label {
    font-size: 0.84rem;
  }
  .donate-modal {
    overflow-y: auto;
  }
  .donate-modal[open] {
    place-items: start center;
    padding: 8px;
  }
  .donate-modal-shell {
    width: min(100%, calc(100vw - 16px));
    max-height: none;
    border-radius: 24px;
  }
  .donate-modal-copy,
  .donate-modal-panel {
    padding: 20px 18px 18px;
  }
  .donate-links--panel {
    order: 1;
    width: 100%;
    margin-top: 0;
    margin-bottom: 12px;
  }
  .donate-qr-card {
    order: 2;
    width: min(100%, 188px);
    border-radius: 22px;
    padding: 9px;
  }
  .donate-modal-note {
    order: 3;
  }
  .donate-modal-title {
    font-size: 1.42rem;
  }
  .donate-modal-text {
    font-size: 0.9rem;
    line-height: 1.52;
  }
  .donate-modal-point {
    align-items: flex-start;
    padding: 10px 11px;
  }
  .donate-modal-note {
    font-size: 0.76rem;
  }
  .donate-modal-points {
    gap: 10px;
    margin-top: 18px;
  }
  .donate-links {
    flex-direction: column;
  }
  .donate-links .btn {
    width: 100%;
  }
}

/* ===== Dashboard - RESTORED ===== */
.dashboard-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 32px;
  align-items: start;
}
.dashboard-header {
  border-bottom: 1px solid var(--border); padding-bottom: 24px; margin-bottom: 40px;
  display: flex; justify-content: space-between; align-items: center;
}
.dashboard-block { padding: 32px; height: 100%; display: flex; flex-direction: column; }
.dashboard-block h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border-light); }
.dashboard-moderation-toolbar__head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.dashboard-moderation-toolbar__controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.dashboard-filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.dashboard-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.dashboard-filter-btn:hover,
.dashboard-filter-btn.is-active {
  color: #fff;
  border-color: rgba(99, 102, 241, 0.3);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(59, 130, 246, 0.88));
}
.dashboard-search-input {
  min-width: min(320px, 100%);
}
.dashboard-author-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}
.dashboard-author-card {
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--border-light);
  background: rgba(255,255,255,0.03);
}
.dashboard-author-card h3 {
  margin: 0 0 14px;
  font-size: 1rem;
}
.dashboard-author-form {
  display: flex;
  flex-direction: column;
}

/* Tables */
.table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.table th { text-align: left; padding: 12px; color: var(--text-muted); font-weight: 600; font-size: 0.85rem; border-bottom: 1px solid var(--border); }
.table td { padding: 16px 12px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table-responsive { overflow-x: auto; }

@media (max-width: 820px) {
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .dashboard-moderation-toolbar__head,
  .dashboard-moderation-toolbar__controls {
    align-items: stretch;
  }

  .dashboard-search-input {
    min-width: 100%;
  }
}

/* ===== Hero ===== */
.hero { padding: 60px 0 40px; border-bottom: 1px solid var(--border); position: relative; overflow: hidden; }
.hero-flex { display: flex; align-items: center; gap: 48px; }
.hero h1 { font-size: 2.4rem; font-weight: 800; margin-bottom: 14px; background: linear-gradient(to right, #fff, #a5b4fc); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; text-align: left; }
.hero p { font-size: 1.05rem; color: var(--text-secondary); margin: 0 0 24px; text-align: left; }
.hero-buttons { display: flex; justify-content: flex-start; gap: 12px; }
.hero-text { flex: 1 1 0; min-width: 0; }
/* Right column: compact product list in hero */
.hero-products { flex: 0 0 320px; display: flex; flex-direction: column; gap: 10px; }
.hero-products-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.hero-products-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); }
.hero-products-more { font-size: 0.8rem; color: var(--primary); font-weight: 600; text-decoration: none; white-space: nowrap; }
.hero-products-more:hover { text-decoration: underline; }
.hero-product-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  color: inherit; cursor: pointer; position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.hero-product-item:hover { border-color: var(--primary-soft); box-shadow: 0 2px 12px rgba(0,0,0,0.15); }
.hero-product-img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.hero-product-placeholder { width: 48px; height: 48px; border-radius: 8px; flex-shrink: 0; background: var(--bg-elevated); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.hero-product-body { flex: 1; min-width: 0; }
.hero-product-cat { font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 1px; }
.hero-product-cat a { color: var(--text-muted); text-decoration: none; position: relative; z-index: 1; }
.hero-product-cat a:hover { color: var(--primary); }
.hero-product-stretched { position: absolute; inset: 0; z-index: 0; }
.hero-product-name { font-size: 0.88rem; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.hero-product-desc { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-product-arrow { font-size: 1rem; color: var(--text-muted); flex-shrink: 0; }
/* Video Cards */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
.video-card { overflow: hidden; border-radius: var(--radius); border: 1px solid var(--glass-border); display: flex; flex-direction: column; }
.video-extra-hidden { display: none !important; }
.video-embed { position: relative; width: 100%; padding-bottom: 56.25%; overflow: hidden; background: #000; }
.video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.video-info { padding: 12px 14px; font-size: 0.88rem; flex: 1; }
/* Compact horizontal playlist cards */
.playlist-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 28px; }
@media (max-width: 600px) { .playlist-list { grid-template-columns: 1fr; } }
.playlist-horizontal {
  display: flex; flex-direction: row; align-items: stretch;
  border-radius: var(--radius); overflow: hidden;
  background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); border-left: 3px solid var(--primary);
  text-decoration: none; color: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}
.playlist-horizontal:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-left-color: var(--primary); }
.playlist-thumb-sm {
  width: 112px; min-width: 112px; height: 68px;
  background: linear-gradient(135deg, #0f172a 0%, #312e81 50%, #1e3a5f 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; flex-shrink: 0;
}
.playlist-thumb-sm::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(255,255,255,0.03) 8px, rgba(255,255,255,0.03) 9px);
}
.playlist-play-icon-sm {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.5); z-index: 1; position: relative;
  transition: transform 0.15s;
}
.playlist-horizontal:hover .playlist-play-icon-sm { transform: scale(1.12); }
.playlist-thumb-lines { position: absolute; bottom: 6px; right: 7px; display: flex; flex-direction: column; gap: 3px; }
.playlist-thumb-lines span { display: block; border-radius: 2px; background: rgba(255,255,255,0.22); }
.playlist-thumb-lines span:nth-child(1) { width: 22px; height: 2px; }
.playlist-thumb-lines span:nth-child(2) { width: 16px; height: 2px; }
.playlist-thumb-lines span:nth-child(3) { width: 20px; height: 2px; }
.playlist-h-info { flex: 1; padding: 9px 14px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.playlist-h-title { font-size: 0.88rem; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.playlist-h-meta { display: flex; align-items: center; gap: 6px; margin-top: 3px; flex-wrap: wrap; }
.playlist-h-badge { font-size: 0.68rem; font-weight: 600; color: var(--primary); background: var(--primary-soft); padding: 1px 6px; border-radius: 4px; letter-spacing: 0.03em; }
.playlist-h-desc { font-size: 0.76rem; color: var(--text-muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; line-clamp: 1; -webkit-box-orient: vertical; }
.playlist-h-link { font-size: 0.73rem; color: var(--primary); margin-top: 4px; display: flex; align-items: center; gap: 3px; }
/* ===== Access Gate Block ===== */
.access-gate-section { background: var(--bg-alt); padding: 28px 0 18px; }
.access-gate {
  max-width: 560px; margin: 0 auto; text-align: center;
  padding: 28px 24px; border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
}
.access-gate--approved { border-color: rgba(34,197,94,0.35); background: rgba(34,197,94,0.07); }
.access-gate--pending  { border-color: rgba(234,179,8,0.35);  background: rgba(234,179,8,0.06);  }
.access-gate--rejected { border-color: rgba(239,68,68,0.35);  background: rgba(239,68,68,0.06);  }
.access-gate-icon { font-size: 2.1rem; line-height: 1; margin-bottom: 10px; }
.access-gate-title { font-size: 1.18rem; font-weight: 700; margin: 0 0 8px; }
.access-gate-desc  { font-size: 0.88rem; color: var(--text-muted); margin: 0 0 14px; line-height: 1.5; }
.access-gate-meta  { font-size: 0.78rem; color: var(--text-muted); margin-top: 8px; }
.btn-access { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; font-size: 0.92rem; }

/* ===== Access Request Modal Dialog ===== */
.access-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(15,23,42,0.98) 0%, rgba(20,30,55,0.98) 100%);
  color: var(--text);
  padding: 0;
  max-width: 560px;
  width: calc(100vw - 32px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  box-shadow: 0 40px 100px rgba(0,0,0,0.75), 0 0 0 1px rgba(99,102,241,0.15);
  z-index: 1000;
}
.access-dialog::backdrop {
  background: rgba(0,0,10,0.75);
  backdrop-filter: blur(8px);
}
.access-dialog[open] { display: flex; flex-direction: column; }
.access-dialog-inner { display: flex; flex-direction: column; min-height: 0; }
.access-dialog-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 28px 32px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(99,102,241,0.08) 0%, transparent 100%);
}
.access-dialog-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  background: linear-gradient(135deg, #fff 60%, rgba(165,180,252,0.9));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.access-dialog-close {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; cursor: pointer; color: var(--text-muted);
  font-size: 1.2rem; line-height: 1; padding: 4px 8px;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0; margin-top: 2px;
}
.access-dialog-close:hover { background: rgba(255,255,255,0.14); color: var(--text); }
.access-dialog-body {
  padding: 24px 32px;
  display: flex; flex-direction: column; gap: 18px;
  overflow-y: auto;
}
.access-dialog-body .form-group { margin-bottom: 0; }
.access-dialog-body .form-label {
  display: block; font-size: 0.82rem; font-weight: 600;
  margin-bottom: 7px; color: rgba(165,180,252,0.85);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.access-dialog-body .form-control {
  width: 100%; padding: 11px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--text); font-size: 0.95rem;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.access-dialog-body .form-control::placeholder { color: rgba(255,255,255,0.3); }
.access-dialog-body .form-control:focus {
  outline: none;
  border-color: rgba(99,102,241,0.7);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.18);
  background: rgba(255,255,255,0.07);
}
.access-dialog-body textarea.form-control { resize: vertical; min-height: 80px; }
.access-dialog-footer {
  padding: 18px 32px 26px;
  display: flex; justify-content: flex-end; gap: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.form-hint  { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }
.text-danger { color: #f87171; }

/* Guest rating hint */
.rating-hint {
  display: flex; align-items: center; gap: 5px; font-size: 0.78rem;
  color: var(--text-muted); padding: 4px 0;
  flex: 1; min-width: 0; overflow: hidden;
}
.rating-hint span.hint-text {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rating-hint a { color: var(--primary); font-weight: 600; text-decoration: none; flex-shrink: 0; }
.rating-hint a:hover { text-decoration: underline; }
.rating-hint-icon { display: inline-flex; align-items: center; color: var(--text-muted); flex-shrink: 0; }

/* ===== Sidebar Category Tree ===== */
.sidebar-tree { list-style: none; padding: 0; margin: 0; }
.sidebar-tree .tree-item { list-style: none; }
.tree-children { display: none; list-style: none; padding: 0 0 0 20px; margin: 0; }
.tree-children.open { display: block; }
.tree-row { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; transition: background 0.15s; }
.tree-row:hover { background: var(--glass-bg); }
.tree-row.active-row { background: var(--glass-bg); }
.tree-link { flex: 1; text-decoration: none; color: var(--text); font-size: 0.88rem; line-height: 1.3; }
.tree-link.active { color: var(--primary); font-weight: 600; }
.tree-link:hover { color: var(--primary); }
.tree-toggle { background: none; border: none; padding: 0; cursor: pointer; color: var(--text-muted); font-size: 0.7rem; width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; transition: transform 0.2s; flex-shrink: 0; }
.tree-toggle.expanded { transform: rotate(90deg); }
.tree-toggle svg { pointer-events: none; }
.tree-spacer { width: 16px; flex-shrink: 0; display: inline-block; }
.tree-count { font-size: 0.72rem; color: var(--text-muted); flex-shrink: 0; }

/* ===== Blog Layout ===== */
.blog-layout { display: grid; grid-template-columns: 280px 1fr; gap: 40px; padding: 40px 0; }
.blog-layout .article-img-wrapper {
  isolation: isolate;
}
.blog-layout .article-img-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.12) 24%, rgba(0,0,0,0.38) 68%, rgba(0,0,0,0.74) 100%);
  z-index: 1;
  pointer-events: none;
}
.blog-layout .article-img-title {
  max-height: 44%;
  padding: 16px 10px 8px;
  font-size: 0.58rem;
  line-height: 1.16;
}
.blog-layout .article-img-title-text {
  max-height: 2.32em;
}
.blog-layout .article-img-title--external {
  display: block;
  max-height: 42%;
  padding: 10px 9px 7px;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.18) 16%, rgba(0,0,0,0.94) 100%);
  z-index: 2;
}
.blog-layout .article-img-title-text--external {
  font-size: 0.54rem;
  line-height: 1.04;
  max-height: 2.08em;
}
.blog-layout .article-title--external {
  display: none;
}

/* ===== Footer & Badges ===== */
.footer { padding: 40px 0; text-align: center; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.9rem; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; background: var(--bg-elevated); border: 1px solid var(--border-light); }
.badge-primary { color: var(--primary); }
.badge-secondary { color: var(--secondary); }
.badge-success { color: var(--success); }

/* Animation */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
main { animation: fadeUp 0.5s ease-out; }

/* Responsive Tweaks */
@media (max-width: 768px) {
  .article-card-horizontal { height: auto; flex-direction: column; }
  .article-img-wrapper { width: 100%; height: 160px; min-width: unset; border-right: none; border-bottom: 1px solid var(--border-light); }
  .article-img-wrapper::after { display: none; }
  .article-video-wrapper { width: 100%; }
  .article-img-title {
    max-height: 56%;
    padding: 16px 10px 8px;
    font-size: 0.64rem;
    line-height: 1.22;
  }
  .article-img-title-text {
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
  .blog-layout .article-img-title {
    max-height: 48%;
    padding: 14px 9px 7px;
    font-size: 0.54rem;
    line-height: 1.14;
  }
  .blog-layout .article-img-title--external {
    max-height: 46%;
    padding: 9px 8px 7px;
  }
  .blog-layout .article-img-title-text--external {
    font-size: 0.5rem;
    line-height: 1.02;
  }
  .dashboard-header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .hero { padding: 40px 0 28px; }
  .hero-flex { flex-direction: column; gap: 28px; }
  .hero h1 { font-size: 1.8rem; }
  .hero-products { flex: none; width: 100%; }
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar { position: static; margin-bottom: 32px; }
  .video-grid { grid-template-columns: 1fr; }
}

/* Fix Rating in Detail Page */
.rating-section {
  margin-top: 30px; padding: 20px; background: var(--bg-elevated);
  border-radius: 12px; display: flex; align-items: center; gap: 15px; justify-content: center;
  border: 1px solid var(--border);
}
