/* ============================================
   INSTOLA NEWS — СТИЛИ
   ============================================ */

/* === ПЕРЕМЕННЫЕ ТЕМ === */
:root {
    --bg-body: #f5f6fa;
    --bg-card: #ffffff;
    --bg-header: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-header: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --shadow: rgba(0, 0, 0, 0.3);
}

/* === БАЗА === */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px;
}

/* === ШАПКА === */
.site-header {
    position: relative;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #111;
}
.logo span { color: #2563eb; }

.main-nav {
    display: flex;
    gap: 18px;
}
.main-nav a {
    color: #333;
    font-weight: 500;
}

.user-greeting {
    font-weight: 500;
    color: #333;
}

/* Кнопка темы */
.theme-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.theme-btn:hover {
    background: var(--border-color);
    transform: scale(1.1);
}

/* Бургер */
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    padding: 0 9px;
}
.burger span {
    display: block;
    height: 2px;
    background: #1e293b;
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
}
.burger.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Шторка «Ещё» */
.more { position: relative; }
.more-trigger {
    background: transparent;
    border: none;
    color: inherit;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
}
.more-arrow { transition: transform .2s; font-size: 11px; }
.nav-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 210px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    list-style: none;
    margin: 0;
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .18s, transform .18s, visibility .18s;
    z-index: 999;
}
.nav-dropdown li a {
    display: block;
    padding: 9px 16px;
    color: #334155;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}
.nav-dropdown li a:hover { background: #f1f5f9; color: #2563eb; }

.more:hover .nav-dropdown,
.more:focus-within .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.more:hover .more-arrow { transform: rotate(180deg); }

/* Верхний тонкий бар */
.topbar {
    background: #0f172a;
    color: #94a3b8;
    font-size: 12px;
    border-bottom: 1px solid #1e293b;
}
.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    gap: 10px;
}
.topbar-date { font-weight: 600; color: #cbd5e1; text-transform: capitalize; }
.topbar-tag { color: #64748b; }

/* === LAYOUT === */
.layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    margin-top: 20px;
    align-items: start;
}

/* === КАРТОЧКИ НОВОСТЕЙ === */
.news-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s ease;
}
.news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.news-image img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.news-body { padding: 20px; }

.news-title {
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--text-main);
}
.news-title a { color: var(--text-main); }

.news-excerpt {
    color: var(--text-muted);
    margin-bottom: 15px;
}

.news-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--text-muted);
}

.news-source { color: #2563eb; font-weight: 500; }

/* === СЕТКА НОВОСТЕЙ === */
.news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.news-grid-card {
    background: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s ease;
}
.news-grid-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.news-grid-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.news-grid-img {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #e2e8f0;
}
.news-grid-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.news-grid-card:hover .news-grid-img img {
    transform: scale(1.05);
}

.news-grid-body { padding: 15px; }

.news-grid-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-grid-excerpt {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-grid-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #94a3b8;
    flex-wrap: wrap;
}

.news-grid-source {
    color: #2563eb;
    font-weight: 600;
}
.news-grid-source a {
    color: #2563eb;
    text-decoration: none;
}
.news-grid-source a:hover { text-decoration: underline; }

.news-grid-category {
    display: inline-block;
    padding: 2px 8px;
    background: #e0e7ff;
    color: #3730a3;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 8px;
}

/* Кнопка комментариев на карточке */
.news-grid-comments {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s, color .2s;
}
.news-grid-comments:hover { background: #2563eb; color: #fff; text-decoration: none; }

/* === СЛАЙДЕР === */
.news-slider {
    position: relative;
    margin-bottom: 25px;
    background: var(--bg-card);
    border-radius: 10px;
    padding: 15px 45px;
    box-shadow: 0 2px 8px var(--shadow);
    transition: background 0.3s ease;
}

.slider-track-wrap { overflow: hidden; }

.slider-track {
    display: flex;
    gap: 12px;
    transition: transform 0.4s ease;
}

.slider-card {
    flex: 0 0 calc(20% - 10px);
    min-width: calc(20% - 10px);
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.slider-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.slider-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.slider-card-img {
    width: 100%;
    height: 100px;
    overflow: hidden;
    background: #e2e8f0;
}
.slider-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-card-body { padding: 10px; }

.slider-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #64748b;
    margin-bottom: 5px;
}

.slider-card-source {
    color: #2563eb;
    font-weight: 600;
}

.slider-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 5px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.slider-card-excerpt {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    font-size: 18px;
    color: #1e293b;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.slider-btn:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
.slider-prev { left: 8px; }
.slider-next { right: 8px; }

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}
.slider-dot {
    width: 6px;
    height: 6px;
    background: #cbd5e1;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}
.slider-dot.active {
    background: #2563eb;
    width: 18px;
    border-radius: 3px;
}

/* === САЙДБАР === */
.sidebar {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 18px;
}
.sidebar > * {
    width: 100%;
    max-width: 220px;
}

.widget {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px var(--shadow);
    transition: background 0.3s ease;
}

.widget-title {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-main);
}

.widget-list { list-style: none; }
.widget-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}
.widget-list li:last-child { border: none; }
.widget-list a { color: var(--text-main); }
.widget-list a:hover { color: #2563eb; }

.widget-discuss li { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.widget-discuss li a { flex:1; min-width:0; }
.widget-discuss-count { color:#2563eb; font-weight:700; font-size:12px; white-space:nowrap; flex-shrink:0; }

/* === ТИЗЕРЫ === */
.sidebar-teasers { margin: 0; }
.teasers-stack { display: flex; flex-direction: column; align-items: center; gap: 14px; }

.teaser-card {
    display: block;
    width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform .2s, box-shadow .2s, background 0.3s ease, border-color 0.3s ease;
}
.teaser-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    text-decoration: none;
}

.teaser-img {
    width: 220px;
    height: 220px;
    overflow: hidden;
    background: #e2e8f0;
}
.teaser-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.teaser-text {
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.4;
    color: #334155;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
}

.teaser-inline { display: inline-block; }
.teaser-inline img { max-width: 220px; border-radius: 8px 8px 0 0; }
.teaser-inline .teaser-text {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.sidebar-teaser-top {
    order: -1;
    width: 100%;
    max-width: 220px;
}
.sidebar-teaser-top .teaser-unit {
    width: 100%;
    max-width: 220px;
    overflow: hidden;
}
.sidebar-teaser-top iframe,
.sidebar-teaser-top img {
    max-width: 100% !important;
    height: auto;
}

/* Тизеры в ленте */
.ad-feed-unit {
    grid-column: 1 / -1;
    margin: 6px 0;
    padding: 10px;
    background: var(--bg-card);
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    position: relative;
}
.ad-feed-bottom {
    margin-top: 22px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    position: relative;
}
.ad-feed-unit .teaser-unit,
.ad-feed-bottom .teaser-unit { width: 100%; max-width: 100%; }
.ad-feed-unit iframe, .ad-feed-unit img,
.ad-feed-bottom iframe, .ad-feed-bottom img { max-width: 100% !important; height: auto; }

.ad-label {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 6px;
}

/* Баннер 468×60 рядом с заголовком */
.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}
.section-title-row .section-title { margin-bottom: 0; }
.ad-feed-header {
    flex-shrink: 0;
    width: 468px;
    max-width: 100%;
}
.ad-feed-header .teaser-unit { width: 468px; max-width: 100%; }
.ad-feed-header iframe,
.ad-feed-header img { max-width: 100% !important; height: auto; }

/* === СТРАНИЦА НОВОСТИ === */
.breadcrumbs {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 20px;
}
.breadcrumbs a { color: #2563eb; text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .current { color: #94a3b8; }

.news-full-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow);
    margin-bottom: 30px;
    transition: background 0.3s ease;
}

.news-full-image {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    background: #e2e8f0;
}
.news-full-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-full-body { padding: 30px; }

.news-full-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 15px;
    line-height: 1.2;
}

.news-page-cat {
    display: inline-block;
    padding: 4px 12px;
    background: #e0e7ff;
    color: #3730a3;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 15px;
}
.news-page-cat:hover { background: #c7d2fe; text-decoration: none; }

.news-full-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.news-full-text {
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-main);
    margin-bottom: 30px;
}
.news-full-text p { margin-bottom: 15px; }

.news-full-comments-jump {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.news-full-comments-jump:hover { background: #2563eb; color: #fff; }

/* Кнопки действий */
.news-actions {
    display: flex;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}
.action-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.edit-btn {
    background: #f59e0b;
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.2s;
}
.edit-btn:hover {
    opacity: 0.9;
    text-decoration: none;
    color: #fff;
}

.source-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 15px 20px;
    margin: 25px 0;
    flex-wrap: wrap;
}
.source-cta span { color: #475569; font-size: 14px; }
.source-cta .btn { width: auto; padding: 10px 18px; }

/* Лайки */
.like-btn { position: relative; }
.like-btn .like-ico {
    color: #94a3b8;
    font-size: 18px;
    line-height: 1;
    transition: color .2s, transform .2s;
}
.like-btn:hover .like-ico { color: #ef4444; transform: scale(1.12); }
.like-btn.liked { background: #fee2e2; border-color: #fecaca; color: #b91c1c; }
.like-btn.liked .like-ico { color: #ef4444; transform: scale(1.12); }
.like-btn .like-count { font-weight: 700; font-size: 14px; }

.like-login-hint {
    display: none;
    flex-basis: 100%;
    margin-top: 10px;
    padding: 10px 14px;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    font-size: 13px;
    color: #92400e;
}
.like-login-hint.show { display: block; animation: hintIn .25s ease; }
.like-login-hint a { color: #b45309; font-weight: 700; text-decoration: underline; }
@keyframes hintIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* === КОММЕНТАРИИ === */
.comments-section {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px var(--shadow);
    transition: background 0.3s ease;
}

.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 15px;
    background: var(--bg-body);
    color: var(--text-main);
}
/* Панель эмодзи */
.emoji-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    margin-top: -1px;
}

.emoji-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 6px;
    transition: all 0.15s;
    line-height: 1;
}

.emoji-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    transform: scale(1.15);
}

.emoji-btn:active {
    transform: scale(0.95);
}

/* Тёмная тема */
[data-theme="dark"] .emoji-panel {
    background: #0f172a;
    border-color: #334155;
}

[data-theme="dark"] .emoji-btn:hover {
    background: #334155;
    border-color: #475569;
}

.comment-login-prompt {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 25px;
    color: #64748b;
}

.comment-item {
    display: flex;
    gap: 15px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}
.comment-item:last-child { border-bottom: none; }

.comment-avatar {
    width: 40px;
    height: 40px;
    background: #2563eb;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 700;
    color: var(--text-main);
}

.comment-date {
    font-size: 12px;
    color: #94a3b8;
}

.comment-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-main);
}

.no-comments {
    text-align: center;
    color: #94a3b8;
    padding: 20px;
}

/* === АДМИНКА === */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.admin-header .muted { color:#94a3b8; font-weight:400; font-size:18px; }

.admin-table {
    width: 100%;
    background: var(--bg-card);
    border-radius: 12px;
    border-collapse: collapse;
    box-shadow: 0 2px 8px var(--shadow);
    transition: background 0.3s ease;
}

.admin-table th, .admin-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
}

.status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
.status.active { background: #dcfce7; color: #166534; }
.status.inactive { background: #fee2e2; color: #991b1b; }
.status.st-published { background:#dcfce7; color:#166534; }
.status.st-pending   { background:#fef3c7; color:#92400e; }
.status.st-rejected  { background:#fee2e2; color:#991b1b; }

.actions { display: flex; gap: 8px; }
.btn-danger { background: #ef4444; }
.btn-danger:hover { background: #dc2626; }
.btn-secondary { background: #64748b; margin-left: 10px; }
.btn-secondary:hover { background: #475569; }

.admin-form {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: background 0.3s ease;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border-radius: 12px;
    color: #64748b;
}

/* Фильтры, поиск, массовые действия */
.admin-filters { display:flex; justify-content:space-between; align-items:center; gap:15px; flex-wrap:wrap; margin-bottom:18px; }
.search-form { display:flex; gap:8px; }
.search-form input[type=text] { padding:8px 12px; border:1px solid #d1d5db; border-radius:6px; min-width:220px; font-size:14px; background:#fff; color:#1e293b; }
.bulk-bar { display:flex; align-items:center; gap:15px; background:#fff; border:1px solid var(--border-color); border-radius:8px; padding:10px 15px; margin-bottom:12px; }
.bulk-all { display:flex; align-items:center; gap:8px; font-size:14px; color:#475569; cursor:pointer; }
.row-check { width:16px; height:16px; cursor:pointer; }
.cell-title a { color:#1e293b; font-weight:600; text-decoration:none; }
.cell-title a:hover { color:#2563eb; text-decoration:underline; }
.tag { display:inline-block; padding:2px 8px; border-radius:4px; font-size:11px; font-weight:700; }
.tag-rss { background:#ede9fe; color:#6d28d9; }
.tag-manual { background:#dbeafe; color:#1d4ed8; }

/* Модерация RSS */
.moderate-list { display:flex; flex-direction:column; gap:8px; }
.moderate-row {
    display:flex; align-items:center; gap:12px;
    background:var(--bg-card); border:1px solid var(--border-color); border-radius:8px;
    padding:8px 12px; box-shadow:0 1px 3px rgba(0,0,0,0.03);
    transition:box-shadow .2s, border-color .2s, background 0.3s ease;
}
.moderate-row:hover { box-shadow:0 3px 10px rgba(0,0,0,0.06); border-color:#cbd5e1; }
.moderate-thumb { width:64px; height:48px; flex-shrink:0; border-radius:6px; overflow:hidden; background:#e2e8f0; display:flex; align-items:center; justify-content:center; }
.moderate-thumb img { width:100%; height:100%; object-fit:cover; }
.moderate-noimg { font-size:18px; opacity:.4; }
.moderate-info { flex:1; min-width:0; }
.moderate-top { display:flex; gap:8px; align-items:center; font-size:11px; color:#94a3b8; margin-bottom:2px; }
.moderate-top .news-source { color:#2563eb; font-weight:600; }
.moderate-date { color:#94a3b8; }
.moderate-info h3 { font-size:14px; font-weight:700; color:#1e293b; margin:0 0 2px; line-height:1.3; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.moderate-info p { font-size:12px; color:#64748b; margin:0; line-height:1.4; display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; }
.moderate-acts { display:flex; gap:5px; flex-shrink:0; align-items:center; }
.moderate-acts .btn-small { padding:5px 9px; font-size:13px; line-height:1; }
.moderate-more { text-align:center; color:#94a3b8; font-size:13px; margin-top:12px; }

/* Обсуждения */
.discuss-list { display:flex; flex-direction:column; gap:8px; }
.discuss-row {
    display:flex; align-items:center; gap:12px;
    background:var(--bg-card); border:1px solid var(--border-color); border-radius:8px;
    padding:8px 12px; box-shadow:0 1px 3px rgba(0,0,0,0.03);
    transition:box-shadow .2s, border-color .2s, background 0.3s ease;
}
.discuss-row:hover { box-shadow:0 3px 10px rgba(0,0,0,0.06); border-color:#cbd5e1; }
.discuss-thumb { width:64px; height:48px; flex-shrink:0; border-radius:6px; overflow:hidden; background:#e2e8f0; display:flex; align-items:center; justify-content:center; }
.discuss-thumb img { width:100%; height:100%; object-fit:cover; }
.discuss-info { flex:1; min-width:0; }
.discuss-top { display:flex; gap:8px; align-items:center; font-size:11px; color:#94a3b8; margin-bottom:2px; }
.discuss-top .news-source { color:#2563eb; font-weight:600; }
.discuss-info h3 { font-size:14px; font-weight:700; margin:0 0 2px; line-height:1.3; }
.discuss-info h3 a { color:#1e293b; text-decoration:none; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.discuss-info h3 a:hover { color:#2563eb; }
.discuss-info p { font-size:12px; color:#64748b; margin:0; line-height:1.4; display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; }
.discuss-acts { display:flex; gap:6px; flex-shrink:0; align-items:center; flex-wrap:wrap; justify-content:flex-end; }
.discuss-badge { display:inline-flex; align-items:center; gap:3px; padding:3px 9px; background:#eff6ff; color:#2563eb; border-radius:6px; font-size:13px; font-weight:700; }
.discuss-views { font-size:12px; color:#94a3b8; }
.discuss-acts .btn-small { padding:5px 10px; font-size:13px; }

/* === СТАТИЧЕСКИЕ СТРАНИЦЫ === */
.static-page { background: var(--bg-card); border-radius: 12px; padding: 30px; box-shadow: 0 2px 8px var(--shadow); }
.static-h1 { font-size: 30px; font-weight: 800; color: #1e293b; margin-bottom: 20px; line-height: 1.2; }
.static-content { font-size: 16px; line-height: 1.75; color: #334155; }
.static-content h2 { font-size: 22px; color: #1e293b; margin: 28px 0 12px; padding-bottom: 8px; border-bottom: 2px solid #f1f5f9; }
.static-content h3 { font-size: 18px; color: #1e293b; margin: 20px 0 10px; }
.static-content p { margin-bottom: 14px; }
.static-content ul, .static-content ol { margin: 0 0 16px 22px; }
.static-content li { margin-bottom: 7px; }
.static-content a { color: #2563eb; text-decoration: none; }
.static-content a:hover { text-decoration: underline; }
.static-content strong { color: #1e293b; }
.static-note { background: #f8fafc; border-left: 4px solid #2563eb; padding: 14px 18px; border-radius: 0 8px 8px 0; margin-top: 24px; font-size: 15px; color: #475569; }

/* === ФОРМЫ === */
.auth-form {
    max-width: 450px;
    margin: 40px auto;
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: background 0.3s ease;
}

.auth-form h1 {
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
    background: var(--bg-body);
    color: var(--text-main);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.form-group textarea {
    resize: vertical;
}

.auth-link {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    color: #666;
}

.alert {
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
}
.alert.error { background: #fee2e2; color: #991b1b; }
.alert.success { background: #dcfce7; color: #166534; }

/* Капча */
.captcha-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.captcha-question {
    font-weight: 700;
    color: #1e293b;
    font-size: 15px;
}
.captcha-input {
    width: 60px;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}
.captcha-input:focus {
    outline: none;
    border-color: #2563eb;
}

/* === КНОПКИ === */
.btn {
    width: 100%;
    padding: 12px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn:hover {
    background: #1d4ed8;
}

.btn-small {
    padding: 6px 14px;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
}
.btn-small:hover {
    background: #1d4ed8;
    text-decoration: none;
}

.btn-admin {
    background: #7c3aed;
    color: #fff;
}
.btn-admin:hover {
    background: #6d28d9;
    color: #fff;
    text-decoration: none;
}

/* Кнопки соцсетей */
.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
}
.btn-social:hover {
    opacity: 0.9;
    text-decoration: none;
}
.btn-social:active {
    transform: scale(0.98);
}
.btn-ya { background: #FC3F1D; }
.btn-vk { background: #0077FF; }

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    font-weight: bold;
    font-size: 16px;
    font-family: Arial, sans-serif;
    flex-shrink: 0;
}
/* Кнопка "Поделиться" с фидбеком */
.share-btn {
    position: relative;
    transition: all 0.3s ease;
}

.share-btn.copied {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

.share-btn.copied .share-icon {
    animation: checkPop 0.4s ease;
}

@keyframes checkPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Всплывающее уведомление (toast) */
.share-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1e293b;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
    pointer-events: none;
}

.share-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

[data-theme="dark"] .share-toast {
    background: #334155;
}
/* Вкладки категорий */
.category-tabs { margin-bottom: 20px; }
.cat-tab {
    display: inline-block;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.cat-tab:hover {
    border-color: #2563eb;
    color: #2563eb;
    text-decoration: none;
}
.cat-tab-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}
.cat-tab-active:hover {
    background: #2563eb;
    color: #fff;
}

.tabs a.tab { padding:8px 16px; background:var(--bg-card); border:1px solid var(--border-color); border-radius:8px; color:#475569; text-decoration:none; font-weight:600; font-size:14px; }
.tabs a.tab-active { background:#2563eb; color:#fff; border-color:#2563eb; }

/* === ПАГИНАЦИЯ === */
.pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 30px 0 10px;
    flex-wrap: wrap;
}
.pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.pager-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
    text-decoration: none;
}
.pager-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    cursor: default;
}
.pager-active:hover {
    background: #2563eb;
    color: #fff;
}
.pager-dots {
    color: #94a3b8;
    padding: 0 4px;
    font-size: 14px;
}
.pager-info {
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
    margin: 0 0 20px;
}

/* === КНОПКА "НАВЕРХ" === */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.3);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.scroll-top-btn:hover {
    background: rgba(37, 99, 235, 0.7);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}
.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* === ЗАГОЛОВКИ СЕКЦИЙ === */
.section-title {
    font-size: 28px;
    margin-bottom: 20px;
    color: #111;
}

/* === ПОДВАЛ === */
.site-footer {
    background: #1e293b;
    color: #cbd5e1;
    margin-top: 40px;
    padding-top: 40px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
    padding-bottom: 30px;
}

.footer-logo {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}
.footer-logo span { color: #3b82f6; }

.footer-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #94a3b8;
    max-width: 320px;
}

.footer-title {
    color: #fff;
    font-size: 16px;
    margin-bottom: 15px;
}

.footer-links {
    list-style: none;
}
.footer-links li {
    margin-bottom: 8px;
}
.footer-links a {
    color: #cbd5e1;
    font-size: 14px;
    transition: color 0.2s;
}
.footer-links a:hover {
    color: #3b82f6;
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding: 20px 0;
    text-align: center;
}
.footer-bottom p {
    font-size: 13px;
    color: #64748b;
}

/* === АДАПТИВ === */
@media (max-width: 1200px) {
    .slider-card {
        flex: 0 0 calc(25% - 9px);
        min-width: calc(25% - 9px);
    }
}

@media (max-width: 1150px) {
    .main-nav { gap: 12px; font-size: 14px; }
    .user-greeting { font-size: 13px; }
}

@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        order: 2;
        align-items: stretch;
    }
    .sidebar > *,
    .sidebar-teaser-top,
    .sidebar-teaser-top .teaser-unit {
        max-width: 100%;
    }
    .news-grid {
        grid-template-columns: 1fr;
    }
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
    .ad-feed-header { display: none; }
    .section-title-row { align-items: flex-start; }
    .topbar-tag { display: none; }
    .more-trigger { pointer-events: none; }
    .more-arrow { display: none; }
    .nav-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: transparent;
        padding: 0;
        min-width: 0;
    }
    .more {
        width: 100%;
        border-top: 1px solid #f1f5f9;
        padding-top: 6px;
        margin-top: 6px;
    }
    .more-trigger {
        display: block;
        padding: 8px 20px 4px;
        color: #94a3b8;
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .5px;
    }
    .nav-dropdown li a { padding: 11px 20px; border-bottom: 1px solid #f1f5f9; }
    .burger { display: flex; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #fff;
        border-top: 1px solid var(--border-color);
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        padding: 8px 0;
        z-index: 999;
    }
    .main-nav.open { display: flex; }
    .main-nav a, .main-nav .user-greeting {
        padding: 12px 20px;
        border-bottom: 1px solid #f1f5f9;
        font-size: 15px;
    }
    .main-nav a:last-of-type, .main-nav .user-greeting:last-of-type { border-bottom: none; }
    .main-nav .theme-btn { margin: 10px 20px; align-self: flex-start; }
    .main-nav .btn-small { margin: 6px 20px 12px; text-align: center; display: block; }
}

@media (max-width: 768px) {
    .news-full-title { font-size: 24px; }
    .news-full-text { font-size: 16px; }
    .news-full-body { padding: 20px; }
    .news-actions { flex-direction: column; }
    .action-btn { justify-content: center; }
    .admin-filters { flex-direction:column; align-items:stretch; }
    .search-form input[type=text] { min-width:0; flex:1; }
    .admin-table { font-size:13px; }
    .actions { flex-direction:column; }
    .static-page { padding: 20px; }
    .static-h1 { font-size: 24px; }
    .static-content { font-size: 15px; }
    .static-content h2 { font-size: 19px; }
}

@media (max-width: 640px) {
    .teasers-stack { flex-direction: row; flex-wrap: wrap; justify-content: center; }
    .teaser-card { width: calc(50% - 7px); }
    .teaser-img { width: 100%; height: auto; aspect-ratio: 1 / 1; }
    .moderate-row { flex-wrap:wrap; }
    .moderate-info { flex-basis:calc(100% - 76px); }
    .moderate-acts { width:100%; justify-content:flex-end; padding-top:4px; border-top:1px solid var(--border-color); margin-top:4px; }
    .discuss-row { flex-wrap:wrap; }
    .discuss-info { flex-basis:calc(100% - 76px); }
    .discuss-acts { width:100%; justify-content:flex-start; padding-top:4px; border-top:1px solid var(--border-color); margin-top:4px; }
}

@media (max-width: 600px) {
    .slider-card {
        flex: 0 0 calc(50% - 6px);
        min-width: calc(50% - 6px);
    }
    .news-slider {
        padding: 12px 35px;
    }
    .ad-feed-unit, .ad-feed-bottom { padding: 8px; }
    .cat-tab { padding: 6px 12px; font-size: 13px; }
    .pager-btn { min-width: 34px; height: 34px; font-size: 13px; padding: 0 10px; }
    .scroll-top-btn {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 500px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   ТЁМНАЯ ТЕМА
   ============================================ */

[data-theme="dark"] body {
    background: #0f172a;
    color: #e2e8f0;
}

[data-theme="dark"] .site-header {
    background: #1e293b;
    border-bottom-color: #334155;
}
[data-theme="dark"] .logo { color: #fff; }
[data-theme="dark"] .main-nav a { color: #cbd5e1; }
[data-theme="dark"] .main-nav a:hover { color: #60a5fa; }
[data-theme="dark"] .user-greeting { color: #e2e8f0; }

[data-theme="dark"] .burger { border-color: #334155; }
[data-theme="dark"] .burger span { background: #e2e8f0; }
[data-theme="dark"] .main-nav { background: #1e293b; border-top-color: #334155; }
[data-theme="dark"] .main-nav a, [data-theme="dark"] .main-nav .user-greeting { border-bottom-color: #334155; color: #cbd5e1; }
[data-theme="dark"] .main-nav a:hover { color: #60a5fa; }

[data-theme="dark"] .more { border-top-color: #334155; }
[data-theme="dark"] .nav-dropdown { background: #1e293b; border-color: #334155; box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
[data-theme="dark"] .nav-dropdown li a { color: #cbd5e1; }
[data-theme="dark"] .nav-dropdown li a:hover { background: #334155; color: #60a5fa; }
[data-theme="dark"] .nav-dropdown li a { border-bottom-color: #334155; }

[data-theme="dark"] .topbar { background: #020617; border-bottom-color: #1e293b; }

[data-theme="dark"] .news-card,
[data-theme="dark"] .news-grid-card,
[data-theme="dark"] .slider-card,
[data-theme="dark"] .news-slider,
[data-theme="dark"] .widget,
[data-theme="dark"] .auth-form,
[data-theme="dark"] .admin-form,
[data-theme="dark"] .admin-table,
[data-theme="dark"] .comments-section,
[data-theme="dark"] .news-full-card,
[data-theme="dark"] .moderate-row,
[data-theme="dark"] .discuss-row,
[data-theme="dark"] .static-page,
[data-theme="dark"] .empty-state,
[data-theme="dark"] .teaser-card,
[data-theme="dark"] .teaser-inline .teaser-text,
[data-theme="dark"] .ad-feed-unit,
[data-theme="dark"] .ad-feed-bottom {
    background: #1e293b;
}

[data-theme="dark"] .slider-card { background: #263449; }

[data-theme="dark"] .news-title a,
[data-theme="dark"] .news-grid-title,
[data-theme="dark"] .slider-card-title,
[data-theme="dark"] .section-title,
[data-theme="dark"] .static-h1,
[data-theme="dark"] .static-content h2,
[data-theme="dark"] .static-content h3,
[data-theme="dark"] .static-content strong,
[data-theme="dark"] .moderate-info h3,
[data-theme="dark"] .discuss-info h3 a,
[data-theme="dark"] .widget-title,
[data-theme="dark"] .auth-form h1,
[data-theme="dark"] .admin-header h1,
[data-theme="dark"] .comment-author {
    color: #f1f5f9;
}

[data-theme="dark"] .news-excerpt,
[data-theme="dark"] .news-grid-excerpt,
[data-theme="dark"] .slider-card-excerpt,
[data-theme="dark"] .news-meta,
[data-theme="dark"] .slider-card-meta,
[data-theme="dark"] .news-grid-meta,
[data-theme="dark"] .static-content,
[data-theme="dark"] .moderate-info p,
[data-theme="dark"] .discuss-info p,
[data-theme="dark"] .static-note {
    color: #94a3b8;
}

[data-theme="dark"] .news-source a,
[data-theme="dark"] .news-grid-source a,
[data-theme="dark"] .slider-card-source,
[data-theme="dark"] .moderate-top .news-source,
[data-theme="dark"] .discuss-top .news-source,
[data-theme="dark"] .static-content a {
    color: #60a5fa;
}

[data-theme="dark"] .widget-list li { border-bottom-color: #334155; }
[data-theme="dark"] .widget-list a { color: #cbd5e1; }
[data-theme="dark"] .widget-list a:hover { color: #60a5fa; }
[data-theme="dark"] .widget-discuss-count { color:#60a5fa; }

[data-theme="dark"] .form-group label { color: #cbd5e1; }
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .admin-table th {
    background: #263449;
    color: #cbd5e1;
}
[data-theme="dark"] .admin-table td { border-bottom-color: #334155; }

[data-theme="dark"] .search-form input[type=text],
[data-theme="dark"] .bulk-bar,
[data-theme="dark"] .pager-btn,
[data-theme="dark"] .pager-active { background:#1e293b; border-color:#334155; color:#cbd5e1; }
[data-theme="dark"] .cell-title a { color:#f1f5f9; }
[data-theme="dark"] .cell-title a:hover { color:#60a5fa; }
[data-theme="dark"] .bulk-all { color:#cbd5e1; }
[data-theme="dark"] .tag-rss { background:#312e81; color:#c4b5fd; }
[data-theme="dark"] .tag-manual { background:#1e3a8a; color:#bfdbfe; }

[data-theme="dark"] .moderate-row,
[data-theme="dark"] .discuss-row { border-color:#334155; }
[data-theme="dark"] .moderate-row:hover,
[data-theme="dark"] .discuss-row:hover { border-color:#475569; }
[data-theme="dark"] .moderate-thumb,
[data-theme="dark"] .discuss-thumb { background:#334155; }
[data-theme="dark"] .moderate-acts,
[data-theme="dark"] .discuss-acts { border-top-color:#334155; }

[data-theme="dark"] .discuss-info h3 a:hover { color:#60a5fa; }
[data-theme="dark"] .discuss-badge { background:#1e3a5f; color:#60a5fa; }

[data-theme="dark"] .theme-btn {
    border-color: #475569;
    color: #e2e8f0;
}
[data-theme="dark"] .theme-btn:hover { background: #334155; }

[data-theme="dark"] .slider-btn {
    background: #1e293b;
    border-color: #475569;
    color: #e2e8f0;
}

[data-theme="dark"] .empty-state,
[data-theme="dark"] .slider-empty,
[data-theme="dark"] .ticker-fallback {
    background: #1e293b;
    color: #94a3b8;
}

[data-theme="dark"] .site-footer {
    background: #020617;
}

[data-theme="dark"] .source-cta,
[data-theme="dark"] .tabs a.tab { background:#1e293b; border-color:#334155; color:#cbd5e1; }
[data-theme="dark"] .source-cta span { color: #cbd5e1; }

[data-theme="dark"] .like-btn.liked { background: #3b1d24; border-color: #7f1d1d; color: #fca5a5; }
[data-theme="dark"] .like-btn .like-ico { color: #64748b; }
[data-theme="dark"] .like-btn:hover .like-ico,
[data-theme="dark"] .like-btn.liked .like-ico { color: #f87171; }
[data-theme="dark"] .like-login-hint { background: #422006; border-color: #92400e; color: #fcd34d; }
[data-theme="dark"] .like-login-hint a { color: #fbbf24; }

[data-theme="dark"] .teaser-card,
[data-theme="dark"] .teaser-inline .teaser-text { border-color: #334155; }
[data-theme="dark"] .teaser-img { background: #334155; }
[data-theme="dark"] .teaser-text { color: #cbd5e1; }

[data-theme="dark"] .ad-feed-unit,
[data-theme="dark"] .ad-feed-bottom { border-color: #334155; }
[data-theme="dark"] .ad-label { color: #64748b; }

[data-theme="dark"] .static-page { box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
[data-theme="dark"] .static-content h2 { border-bottom-color: #334155; }
[data-theme="dark"] .static-note { background: #0f172a; border-left-color: #60a5fa; color: #94a3b8; }

[data-theme="dark"] .cat-tab { background: #1e293b; border-color: #334155; color: #cbd5e1; }
[data-theme="dark"] .cat-tab:hover { border-color: #60a5fa; color: #60a5fa; }
[data-theme="dark"] .cat-tab-active { background: #2563eb; border-color: #2563eb; color: #fff; }
[data-theme="dark"] .news-grid-category { background: #312e81; color: #c7d2fe; }
[data-theme="dark"] .news-page-cat { background: #312e81; color: #c7d2fe; }
[data-theme="dark"] .news-page-cat:hover { background: #4338ca; }

[data-theme="dark"] .news-grid-comments,
[data-theme="dark"] .news-full-comments-jump { background: #1e3a5f; color: #60a5fa; }
[data-theme="dark"] .news-grid-comments:hover,
[data-theme="dark"] .news-full-comments-jump:hover { background: #2563eb; color: #fff; }

[data-theme="dark"] .captcha-box { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .captcha-question { color: #f1f5f9; }
[data-theme="dark"] .captcha-input { background: #0f172a; border-color: #475569; color: #e2e8f0; }

[data-theme="dark"] .pager-dots { color: #64748b; }
[data-theme="dark"] .pager-info { color: #64748b; }

[data-theme="dark"] .scroll-top-btn {
    background: rgba(96, 165, 250, 0.2);
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .scroll-top-btn:hover {
    background: rgba(96, 165, 250, 0.6);
}

[data-theme="dark"] .btn-social {
    color: #fff;
}

[data-theme="dark"] .btn-admin { background: #6d28d9; }
[data-theme="dark"] .btn-admin:hover { background: #5b21b6; }

/* Плавный переход для всех элементов */
body, .site-header, .news-card, .news-grid-card, .slider-card,
.widget, .auth-form, .admin-form, .news-slider, .news-full-card,
.comments-section, .moderate-row, .discuss-row, .static-page,
.teaser-card, .ad-feed-unit, .ad-feed-bottom {
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}