/* ============================================
   css/main.css — ПЕРЕМЕННЫЕ, СБРОС, ШАПКА, МЕНЮ, ФУТЕР, КАРТОЧКИ, СКРОЛЛЫ, SEO
   ============================================ */

/* === ПЕРЕМЕННЫЕ === */
:root {
  --color-brand: #f8604a;
  --color-brand-hover: #e05643;
  --color-text-primary: #000000;
  --color-text-secondary: #333333;
  --color-text-tertiary: rgba(0, 0, 0, 0.6);
  --color-text-quaternary: rgba(0, 0, 0, 0.45);
  --color-border: rgba(0, 0, 0, 0.1);
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f5f5f5;
  --color-bg-overflow: #fbfbfb;
  --color-logo: #3b3b3b;
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.05);
  --font-family: 'YS Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-text-primary: #ffffff;
    --color-text-secondary: rgba(255, 255, 255, 0.75);
    --color-text-tertiary: rgba(255, 255, 255, 0.6);
    --color-text-quaternary: rgba(255, 255, 255, 0.7);
    --color-border: rgba(255, 255, 255, 0.1);
    --color-bg-primary: #18181a;
    --color-bg-secondary: #222224;
    --color-bg-overflow: #111112;
    --color-logo: #ffffff;
  }
  .logo-title { color: #ffffff; }
}

/* === БАЗОВЫЙ СБРОС === */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-family); background: var(--color-bg-overflow); color: var(--color-text-primary); position: relative; padding-bottom: 80px; min-height: 100vh; }

/* === ШАПКА === */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: var(--color-bg-primary); border-bottom: 1px solid var(--color-border); }
.header-top { max-width: 1400px; margin: 0 auto; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; }
.logo-section { display: flex; flex-direction: column; }
.logo-row { display: flex; align-items: center; gap: 10px; }
.logo-icon { height: 36px; width: auto; }
.logo-title { font-size: 30px; font-weight: 700; color: var(--color-logo); letter-spacing: 1px; font-family: 'Marker Felt', 'Fredoka One', 'Comic Sans MS', cursive, var(--font-family); }
.logo-subtitle { font-size: 13px; color: var(--color-text-tertiary); margin-top: 2px; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.action-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: transparent; border: none; border-radius: 50%; color: var(--color-text-tertiary); cursor: pointer; transition: background 0.2s, color 0.2s; text-decoration: none; }
.action-icon:hover { color: var(--color-text-primary); background: var(--color-bg-secondary); }
.user-avatar { width: 40px; height: 40px; border-radius: 50%; cursor: pointer; object-fit: cover; }
.action-icon.has-unread svg { color: #ff4444; }

/* === МЕНЮ === */
.main-nav { background: var(--color-bg-primary); }
.nav-container { max-width: 1400px; margin: 0 auto; padding: 0 20px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; display: flex; align-items: center; scroll-behavior: smooth; }
.nav-container::-webkit-scrollbar { display: none; }
.nav-menu { display: flex; list-style: none; padding: 0; margin: 0; white-space: nowrap; gap: 20px; height: 48px; flex-wrap: nowrap; flex-shrink: 0; }
.nav-item { flex-shrink: 0; display: inline-flex; align-items: center; height: 100%; }
.nav-link { font-size: 15px; font-weight: 500; color: var(--color-text-tertiary); text-decoration: none; border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s; padding: 0 4px; }
.nav-link:hover { color: var(--color-text-primary); }
.nav-link.active { color: var(--color-text-primary); font-weight: 500; border-bottom-color: var(--color-brand); }
.header-placeholder { height: 128px; }

/* === ОСНОВНОЙ КОНТЕЙНЕР === */
.main-container { max-width: 1400px; margin: 0 auto; padding: 24px 20px; }

/* === ГОРИЗОНТАЛЬНАЯ ЛЕНТА === */
.horizontal-scroll { margin-bottom: 58px; overflow: visible; position: relative; }
.section-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.section-title { font-size: 20px; font-weight: 700; color: var(--color-text-primary); }
.section-link { font-size: 14px; color: var(--color-text-tertiary); text-decoration: none; }
.section-link:hover { color: var(--color-brand); }
.scroll-wrapper { overflow-x: auto; overflow-y: visible; scrollbar-width: none; -ms-overflow-style: none; padding-top: 8px; margin-top: -8px; position: relative; }
.scroll-wrapper::-webkit-scrollbar { display: none; }
.actors-horizontal { display: flex; gap: 20px; padding: 8px 20px; }
.scroll-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; background: var(--color-bg-primary); border: 1px solid var(--color-border); box-shadow: 0 2px 8px rgba(0,0,0,0.1); cursor: pointer; z-index: 10; display: flex; align-items: center; justify-content: center; color: var(--color-text-primary); transition: opacity 0.3s, background 0.2s; }
.scroll-btn:hover { background: var(--color-bg-secondary); }
.scroll-btn-left { left: -8px; opacity: 0; pointer-events: none; }
.scroll-btn-right { right: -8px; }
.scroll-btn.visible { opacity: 1; pointer-events: auto; }

/* === КАРТОЧКИ === */
.actor-card { flex-shrink: 0; width: 140px; text-align: center; cursor: pointer; transition: transform 0.2s; overflow: visible; }
.actor-card a { text-decoration: none; color: inherit; }
.actor-card:hover { transform: translateY(-4px); }
.actor-avatar { position: relative; width: 100%; aspect-ratio: 3/4; margin-bottom: 12px; border-radius: 12px; overflow: visible; background: var(--color-bg-secondary); box-shadow: var(--shadow-card); }
.actor-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.actor-name { font-size: 14px; font-weight: 700; color: inherit; text-decoration: none; }
.actor-role { font-size: 12px; color: var(--color-text-tertiary); margin-top: 4px; }
.online-indicator { position: absolute; top: -6px; right: -6px; width: 16px; height: 16px; background: #4caf50; border: 2px solid var(--color-bg-primary); border-radius: 50%; z-index: 2; }

/* === БЛОКИ ПОЛЬЗОВАТЕЛЕЙ === */
.users-section { background: var(--color-bg-primary); border-radius: 16px; padding: 20px; box-shadow: var(--shadow-card); margin-bottom: 24px; overflow: visible; }
.users-section:last-child { margin-bottom: 0; }
.users-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--color-border); }
.users-title { font-size: 18px; font-weight: 700; }
.users-count { font-size: 13px; color: var(--color-text-tertiary); }
.user-cards { display: flex; gap: 16px; overflow-x: auto; overflow-y: visible; scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; padding: 10px 4px 4px 4px; margin-top: -2px; }
.user-cards::-webkit-scrollbar { display: none; }
.user-card { flex-shrink: 0; width: 110px; text-align: center; cursor: pointer; transition: transform 0.2s; overflow: visible; }
.user-card a { text-decoration: none; color: inherit; }
.user-card:hover { transform: translateY(-4px); }
.user-avatar-large { position: relative; width: 100%; aspect-ratio: 3/4; border-radius: 12px; overflow: visible; background: var(--color-bg-secondary); margin-bottom: 8px; box-shadow: var(--shadow-card); }
.user-avatar-large img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.user-details { min-width: 0; }
.user-name { font-size: 13px; font-weight: 700; margin-bottom: 2px; color: inherit; text-decoration: none; }
.user-status { font-size: 11px; color: var(--color-text-tertiary); margin-bottom: 2px; }
.user-stats { font-size: 11px; color: var(--color-text-quaternary); }
.user-city { font-size: 11px; color: var(--color-text-tertiary); margin-bottom: 2px; }

/* === КНОПКА "ВЕСЬ СПИСОК" === */
.view-all-card { flex-shrink: 0; width: 60px; text-align: center; cursor: pointer; transition: transform 0.2s; display: flex; flex-direction: column; align-items: center; justify-content: center; align-self: center; }
.view-all-circle { width: 44px; height: 44px; border-radius: 50%; background: var(--color-bg-secondary); display: flex; align-items: center; justify-content: center; margin-bottom: 8px; transition: background 0.2s; }
.view-all-card:hover .view-all-circle { background: var(--color-border); }
.view-all-arrow { width: 20px; height: 20px; color: var(--color-text-tertiary); }
.view-all-label { font-size: 11px; color: var(--color-text-tertiary); font-weight: 500; white-space: nowrap; }

/* === ЦИТАТА === */
.quote-section { background: var(--color-bg-primary); border-radius: 16px; padding: 24px 20px; box-shadow: var(--shadow-card); margin-bottom: 24px; text-align: center; }
.quote-text { font-size: 16px; font-style: italic; color: var(--color-text-secondary); line-height: 1.6; margin-bottom: 8px; }
.quote-author { font-size: 13px; color: var(--color-text-tertiary); }

/* === ДВЕ КОЛОНКИ === */
.two-columns { display: flex; gap: 24px; margin-top: 20px; }
.left-column { flex: 1; min-width: 0; }
.right-column { flex: 1; min-width: 280px; }

/* === ФУТЕР === */
.site-footer { max-width: 1400px; margin: 0 auto; padding: 24px 20px; border-top: 1px solid var(--color-border); margin-top: 48px; position: absolute; bottom: 0; left: 0; right: 0; width: 100%; }
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-copyright { font-size: 14px; color: var(--color-text-quaternary); white-space: nowrap; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-link { font-size: 14px; color: var(--color-text-tertiary); text-decoration: none; transition: color 0.2s; }
.footer-link:hover { color: var(--color-brand); }

/* === SEO-БЛОК === */
.ds-seo-content h2 { font-size: 22px; font-weight: 700; margin-bottom: 16px; color: var(--color-text-primary); }
.ds-seo-content h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; color: var(--color-text-primary); }
.ds-seo-content p { font-size: 15px; line-height: 1.6; margin-bottom: 12px; }
.ds-seo-content ol { padding-left: 20px; margin-bottom: 16px; }
.ds-seo-content ol li { margin-bottom: 6px; font-size: 15px; }
.ds-seo-content ul { padding-left: 20px; columns: 2; column-gap: 24px; }
.ds-seo-content ul li { margin-bottom: 4px; font-size: 15px; }
.ds-features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 30px; }
.ds-feature-card { background: var(--color-bg-secondary); border-radius: 12px; padding: 16px; transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.04); }
.ds-feature-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.ds-feature-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; color: var(--color-text-primary); }
.ds-feature-card p { font-size: 13px; margin: 0; }
.ds-seo-wrapper { max-width: 1400px; margin: 0 auto; padding: 0 20px; }
.ds-seo-block { background: var(--color-bg-primary); border-radius: 16px; padding: 30px; margin-bottom: 24px; box-shadow: var(--shadow-card); color: var(--color-text-secondary); line-height: 1.6; font-size: 15px; }
.ds-seo-section { margin-bottom: 24px; }
.ds-seo-section h2 { font-size: 18px; font-weight: 700; margin-bottom: 12px; color: var(--color-text-primary); }
.ds-seo-section:first-child h2 { font-size: 22px; margin-bottom: 16px; }
.ds-seo-section p { margin-bottom: 12px; }
.ds-seo-section ol { padding-left: 20px; margin-bottom: 16px; }
.ds-seo-section ol li { margin-bottom: 6px; }
.ds-seo-list { padding-left: 20px; columns: 1; }
.ds-seo-list li { margin-bottom: 4px; }