/* ===== ТЕМИ ===== */
:root {
    --bg-primary: #f2f2f2;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-input: #fafafa;
    --bg-comment: #fafafa;
    --bg-comment-reply: #f0f0f0;
    --bg-comment-form: #f5f5f5;
    --bg-checkbox: #f5f5f5;
    --text-primary: #1a1a1a;
    --text-secondary: #444;
    --text-muted: #666;
    --text-light: #999;
    --text-on-card: #1a1a1a;
    --border-color: #e0e0e0;
    --border-light: #eee;
    --accent: #c0392b;
    --accent-hover: #a93226;
    --card-hover-shadow: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-primary: #121212;
    --bg-card: #1e1e1e;
    --bg-sidebar: #1e1e1e;
    --bg-input: #2a2a2a;
    --bg-comment: #252525;
    --bg-comment-reply: #2a2a2a;
    --bg-comment-form: #252525;
    --bg-checkbox: #2a2a2a;
    --text-primary: #f0f0f0;
    --text-secondary: #d0d0d0;
    --text-muted: #aaa;
    --text-light: #888;
    --text-on-card: #e8e8e8;
    --border-color: #333;
    --border-light: #2a2a2a;
    --accent: #e74c3c;
    --accent-hover: #c0392b;
    --card-hover-shadow: rgba(0, 0, 0, 0.4);
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ===== ВЕРХНЯ СМУГА ===== */
.top-bar {
    background: #111;
    font-size: 12px;
    border-bottom: 1px solid #222;
}

.top-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-date {
    color: #888;
}

.top-bar-right {
    display: flex;
    gap: 4px;
}

    .top-bar-right a {
        color: #aaa;
        padding: 4px 10px;
        border-radius: 3px;
        transition: all 0.2s;
        font-weight: 600;
    }

        .top-bar-right a:hover {
            color: #fff;
            background: var(--accent);
        }

/* ===== КНОПКА ТЕМИ ===== */
.theme-toggle {
    background: none;
    border: 1px solid #333;
    color: #aaa;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}

    .theme-toggle:hover {
        background: #333;
        color: #fff;
    }

/* ===== ГОЛОВНА ШАПКА ===== */
.main-header {
    background: #1a1a1a;
    padding: 16px 0;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 32px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -1px;
    text-transform: uppercase;
}

    .logo:hover {
        color: var(--accent);
    }

.header-search {
    display: flex;
    align-items: center;
}

    .header-search input {
        background: #2a2a2a;
        border: 2px solid #333;
        color: #fff;
        padding: 10px 16px;
        border-radius: 8px 0 0 8px;
        font-size: 14px;
        width: 260px;
        outline: none;
        transition: border-color 0.2s;
    }

        .header-search input::placeholder {
            color: #666;
        }

        .header-search input:focus {
            border-color: var(--accent);
        }

    .header-search button {
        background: var(--accent);
        border: 2px solid var(--accent);
        color: white;
        padding: 10px 14px;
        border-radius: 0 8px 8px 0;
        cursor: pointer;
        font-size: 14px;
        transition: background 0.2s;
    }

        .header-search button:hover {
            background: var(--accent-hover);
        }

/* ===== НАВІГАЦІЯ КАТЕГОРІЙ ===== */
.category-nav {
    background: #222;
    border-bottom: 3px solid var(--accent);
}

.category-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 0;
    overflow-x: auto;
}

.cat-link {
    color: #ccc;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 14px 18px;
    white-space: nowrap;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
}

    .cat-link:hover {
        color: #fff;
        background: #2a2a2a;
        border-bottom-color: var(--accent);
    }

/* ===== КОНТЕНТ ===== */
.page-content {
    min-height: calc(100vh - 300px);
}

/* ===== MAIN LAYOUT ===== */
.main-layout {
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 20px;
    display: flex;
    gap: 28px;
}

.articles-column {
    flex: 1;
}

/* ===== SECTION TITLE ===== */
.section-title {
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
}

    .section-title::before {
        content: '';
        width: 4px;
        height: 20px;
        background: var(--accent);
        border-radius: 2px;
    }

/* ===== HERO SECTION ===== */
.hero-section {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.hero-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 420px;
    cursor: pointer;
    display: block;
}

    .hero-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s;
    }

    .hero-card:hover img {
        transform: scale(1.03);
    }

.hero-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    color: white;
}

    .hero-card-overlay h1 {
        font-size: 34px;
        font-weight: 900;
        line-height: 1.2;
        margin-bottom: 8px;
    }

    .hero-card-overlay .meta {
        font-size: 13px;
        color: #bbb;
    }

.hero-no-image {
    background: linear-gradient(135deg, #1a1a1a, var(--accent));
    height: 100%;
    display: flex;
    align-items: flex-end;
}

/* ===== КАРТКИ СТАТЕЙ ===== */
.article-card {
    background: var(--bg-card);
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    display: flex;
    min-height: 190px;
    transition: box-shadow 0.2s;
}

    .article-card:hover {
        box-shadow: 0 4px 20px var(--card-hover-shadow);
    }

.article-card-image {
    width: 280px;
    min-width: 280px;
    height: auto;
    object-fit: cover;
    transition: opacity 0.2s;
}

.article-card:hover .article-card-image {
    opacity: 0.9;
}

.no-image-placeholder {
    width: 280px;
    min-width: 280px;
    background: linear-gradient(135deg, #1a1a1a, #333);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 13px;
    font-weight: 700;
}

.article-card-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

    .article-card-body h3 {
        font-size: 18px;
        font-weight: 800;
        line-height: 1.3;
        margin-bottom: 6px;
    }

        .article-card-body h3 span {
            color: var(--text-on-card);
            transition: color 0.2s;
        }

.article-card:hover h3 span {
    color: var(--accent);
}

.article-card .date {
    color: var(--text-light);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.article-card .preview-text {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 8px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tags-row {
    margin: 4px 0;
}

/* ===== СТАТИСТИКА НА КАРТКАХ ===== */
.card-stats {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
}

    .card-stats span {
        display: flex;
        align-items: center;
        gap: 4px;
    }

.hero-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 8px;
}

    .hero-stats span {
        display: flex;
        align-items: center;
        gap: 4px;
    }

/* ===== ТЕГИ КАТЕГОРІЙ ===== */
.category-tag {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 2px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 4px;
}

a.category-tag {
    text-decoration: none;
    color: white;
    transition: background 0.2s;
}

    a.category-tag:hover {
        background-color: var(--accent-hover);
    }

/* ===== SIDEBAR ===== */
.sidebar {
    width: 300px;
    flex-shrink: 0;
}

.sidebar-block {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    position: sticky;
    top: 20px;
}

    .sidebar-block h3 {
        font-size: 14px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-primary);
        margin-bottom: 14px;
        padding-bottom: 10px;
        border-bottom: 3px solid var(--accent);
        display: flex;
        align-items: center;
        gap: 8px;
    }

        .sidebar-block h3::before {
            content: '';
            width: 4px;
            height: 16px;
            background: var(--accent);
            border-radius: 2px;
        }

.sidebar-categories {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .sidebar-categories li {
        margin-bottom: 2px;
    }

    .sidebar-categories a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 12px;
        border-radius: 6px;
        font-weight: 600;
        font-size: 14px;
        color: var(--text-secondary);
        transition: all 0.2s;
    }

        .sidebar-categories a:hover {
            background: var(--bg-input);
            color: var(--accent);
            padding-left: 18px;
        }

.cat-count {
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 22px;
    text-align: center;
}

/* ===== ПОПУЛЯРНЕ В САЙДБАРІ ===== */
.popular-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.popular-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 8px;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    transition: all 0.2s;
    border-radius: 6px;
}

    .popular-item:last-child {
        border-bottom: none;
    }

    .popular-item:hover {
        background: var(--bg-input);
    }

        .popular-item:hover .popular-title {
            color: var(--accent);
        }

.popular-rank {
    font-size: 20px;
    font-weight: 900;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    line-height: 1;
}

.popular-item:nth-child(1) .popular-rank {
    background: #c0392b;
    color: white;
}

.popular-item:nth-child(2) .popular-rank {
    background: #e67e22;
    color: white;
}

.popular-item:nth-child(3) .popular-rank {
    background: #f1c40f;
    color: #1a1a1a;
}

.popular-item:nth-child(n+4) .popular-rank {
    background: var(--bg-input);
    color: var(--text-light);
}

.popular-info {
    flex: 1;
    min-width: 0;
}

.popular-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 3px;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-views {
    font-size: 11px;
    color: var(--text-light);
}

/* ===== СТОРІНКА СТАТТІ ===== */
.article-full {
    max-width: 780px;
    margin: 0 auto;
    padding: 30px 20px;
}

    .article-full .article-hero-image {
        width: 100%;
        border-radius: 10px;
        margin-bottom: 24px;
        max-height: 450px;
        object-fit: cover;
    }

    .article-full h1 {
        font-size: 38px;
        font-weight: 900;
        line-height: 1.15;
        letter-spacing: -0.5px;
        margin-bottom: 14px;
        color: var(--text-primary);
    }

    .article-full .meta {
        color: var(--text-light);
        font-size: 13px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        gap: 16px;
    }

        .article-full .meta .views {
            color: var(--text-light);
        }

    .article-full .article-divider {
        border: none;
        border-top: 3px solid var(--accent);
        margin: 16px 0 28px 0;
    }

    .article-full .content {
        font-size: 17px;
        line-height: 1.8;
        color: var(--text-secondary);
    }

        .article-full .content p {
            margin-bottom: 18px;
        }

        .article-full .content img {
            max-width: 100%;
            border-radius: 8px;
            margin: 20px 0;
        }

        .article-full .content h2,
        .article-full .content h3 {
            margin-top: 32px;
            margin-bottom: 10px;
            font-weight: 800;
            color: var(--text-primary);
        }

.back-link {
    display: inline-block;
    margin-top: 30px;
    color: var(--accent);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    .back-link:hover {
        text-decoration: underline;
    }

/* ===== ЛАЙКИ ===== */
.like-section {
    margin: 14px 0;
}

.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 30px;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

    .like-btn:hover {
        border-color: var(--accent);
        color: var(--accent);
    }

    .like-btn.liked {
        border-color: var(--accent);
        background: #fff5f5;
        color: var(--accent);
    }

/* ===== ПОДІЛИТИСЬ ===== */
.share-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0;
    flex-wrap: wrap;
}

.share-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-btn {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    text-decoration: none;
    transition: all 0.2s;
}

    .share-btn:hover {
        opacity: 0.85;
        color: white;
        transform: translateY(-1px);
    }

.share-fb {
    background: #1877f2;
}

.share-tw {
    background: #1da1f2;
}

.share-tg {
    background: #0088cc;
}

/* ===== СХОЖІ СТАТТІ ===== */
.related-section {
    margin-top: 50px;
    padding-top: 24px;
    border-top: 3px solid var(--accent);
}

    .related-section h2 {
        font-size: 14px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-primary);
        margin-bottom: 16px;
    }

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.related-card {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    transition: box-shadow 0.2s;
}

    .related-card:hover {
        box-shadow: 0 4px 16px var(--card-hover-shadow);
    }

    .related-card img {
        width: 100%;
        height: 140px;
        object-fit: cover;
    }

.related-no-image {
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, #1a1a1a, #333);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 12px;
    font-weight: 700;
}

.related-card-body {
    padding: 12px;
}

    .related-card-body h4 {
        font-size: 14px;
        font-weight: 800;
        color: var(--text-primary);
        line-height: 1.3;
        margin: 6px 0 4px 0;
    }

.related-card .date {
    font-size: 11px;
    color: var(--text-light);
}

/* ===== КОМЕНТАРІ ===== */
.comments-section {
    margin-top: 50px;
    padding-top: 24px;
    border-top: 3px solid var(--accent);
    overflow: hidden;
}

    .comments-section h2 {
        font-size: 14px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-primary);
        margin-bottom: 20px;
    }

.comment-form {
    background: var(--bg-comment-form);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    max-width: 100%;
    box-sizing: border-box;
}

    .comment-form input,
    .comment-form textarea {
        width: 100%;
        padding: 10px;
        border: 2px solid var(--border-color);
        border-radius: 6px;
        font-size: 14px;
        font-family: inherit;
        transition: border-color 0.2s;
        box-sizing: border-box;
        max-width: 100%;
        background: var(--bg-input);
        color: var(--text-primary);
    }

    .comment-form textarea {
        resize: vertical;
        max-height: 300px;
    }

        .comment-form input:focus,
        .comment-form textarea:focus {
            border-color: var(--text-primary);
            outline: none;
        }

    .comment-form .form-group {
        margin-bottom: 10px;
    }

.comments-list {
    max-width: 100%;
}

.comment {
    padding: 18px;
    margin-bottom: 10px;
    background: var(--bg-comment);
    border-radius: 8px;
    border-left: 3px solid var(--accent);
    max-width: 100%;
    box-sizing: border-box;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.comment-author {
    font-weight: 800;
    font-size: 14px;
    color: var(--text-primary);
}

.comment-date {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 600;
}

.comment-text {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 14px;
    margin: 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

.no-comments {
    color: var(--text-light);
    font-style: italic;
    margin-top: 16px;
}

/* Вкладені коментарі */
.reply-toggle {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 0;
    margin-top: 6px;
}

    .reply-toggle:hover {
        text-decoration: underline;
    }

.reply-form-container {
    margin-top: 10px;
    padding: 14px;
    background: var(--bg-comment-reply);
    border-radius: 6px;
}

.reply-form input,
.reply-form textarea {
    width: 100%;
    padding: 8px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    margin-bottom: 6px;
    box-sizing: border-box;
    background: var(--bg-input);
    color: var(--text-primary);
}

.replies {
    margin-top: 10px;
    padding-left: 20px;
    border-left: 2px solid var(--accent);
}

.comment.reply {
    background: var(--bg-comment-reply);
    margin-bottom: 6px;
    padding: 14px;
    border-left: none;
}

/* ===== РЕЙТИНГ ===== */
.rating-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.rating-position {
    width: 45px;
    text-align: center;
}

.trophy {
    font-size: 28px;
}

.position-number {
    font-size: 20px;
    font-weight: 900;
    color: var(--text-light);
}

.rating-info {
    flex: 1;
}

.rating-username {
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.rating-stats {
    display: flex;
    gap: 14px;
    font-size: 13px;
    color: var(--text-light);
}

.rating-right {
    text-align: center;
}

.rank-badge {
    display: inline-block;
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rank-badge-small {
    display: inline-block;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.rating-points {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
}

/* ===== АДМІН-ПАНЕЛЬ ===== */
.admin-container {
    max-width: 960px;
    margin: 24px auto;
    padding: 0 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

    .admin-header h1 {
        font-weight: 900;
        letter-spacing: -0.5px;
        color: var(--text-primary);
    }

.btn {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background: #1a1a1a;
    color: white;
}

    .btn-primary:hover {
        background: #333;
        color: white;
    }

.btn-danger {
    background: var(--accent);
    color: white;
}

    .btn-danger:hover {
        background: var(--accent-hover);
        color: white;
    }

.btn-edit {
    background: #f0ad4e;
    color: white;
}

    .btn-edit:hover {
        background: #d4952e;
        color: white;
    }

.admin-article {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-article-info h3 {
    margin: 0 0 4px 0;
    font-weight: 800;
    font-size: 15px;
    color: var(--text-primary);
}

.admin-article-info .date {
    color: var(--text-light);
    font-size: 12px;
    text-transform: uppercase;
}

.admin-article-actions {
    display: flex;
    gap: 6px;
}

.stats-badge {
    display: inline-block;
    margin-left: 8px;
    font-size: 13px;
    color: var(--text-light);
}

/* ===== СТАТИСТИКА ===== */
.stats-row {
    display: flex;
    gap: 14px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 18px 24px;
    text-align: center;
    flex: 1;
}

.stat-number {
    font-size: 30px;
    font-weight: 900;
    color: var(--text-primary);
}

.stat-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-top: 2px;
}

/* ===== ФОРМИ ===== */
.form-container {
    max-width: 800px;
    margin: 24px auto;
    background: var(--bg-card);
    border-radius: 8px;
    padding: 36px 44px;
}

    .form-container h1 {
        font-weight: 900;
        margin-bottom: 24px;
        padding-bottom: 16px;
        border-bottom: 3px solid var(--accent);
        color: var(--text-primary);
    }

.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        display: block;
        margin-bottom: 6px;
        font-weight: 700;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-muted);
    }

    .form-group input,
    .form-group textarea {
        width: 100%;
        padding: 12px;
        border: 2px solid var(--border-color);
        border-radius: 6px;
        font-size: 15px;
        transition: border-color 0.2s;
        background: var(--bg-input);
        color: var(--text-primary);
    }

        .form-group input:focus,
        .form-group textarea:focus {
            border-color: var(--text-primary);
            outline: none;
            background: var(--bg-card);
        }

.form-section-title {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent);
    margin: 24px 0 14px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-light);
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-checkbox);
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

    .checkbox-item:hover {
        background: var(--bg-input);
    }

    .checkbox-item input[type="checkbox"] {
        width: 16px;
        height: 16px;
        accent-color: var(--accent);
    }

    .checkbox-item label {
        font-weight: 600 !important;
        font-size: 13px !important;
        text-transform: none !important;
        letter-spacing: 0 !important;
        color: var(--text-secondary) !important;
        margin: 0 !important;
        cursor: pointer;
    }

/* ===== ФІЛЬТРИ АДМІНКИ ===== */
.admin-filters {
    margin-bottom: 16px;
}

.admin-search-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.admin-search-input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background: var(--bg-input);
    color: var(--text-primary);
}

    .admin-search-input:focus {
        border-color: var(--text-primary);
        outline: none;
    }

.admin-filter-select {
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background: var(--bg-card);
    color: var(--text-primary);
}

/* ===== FOOTER ===== */
.site-footer {
    background: #1a1a1a;
    color: #888;
    text-align: center;
    padding: 40px 20px;
    margin-top: 50px;
    position: static !important;
}

.footer-inner {
    max-width: 800px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.site-footer p {
    color: #666;
    font-size: 14px;
    margin-bottom: 16px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

    .footer-links a {
        color: #888;
        font-size: 13px;
        font-weight: 600;
        transition: color 0.2s;
    }

        .footer-links a:hover {
            color: var(--accent);
        }

.footer-copy {
    font-size: 12px;
    color: #555;
}

/* ===== ТЕМНА ТЕМА — ДОДАТКОВІ ФІКСИ ===== */
[data-theme="dark"] .article-full .content a {
    color: var(--accent);
}

[data-theme="dark"] .article-full .content img {
    border-radius: 8px;
    opacity: 0.95;
}

[data-theme="dark"] .like-btn {
    border-color: #444;
}

    [data-theme="dark"] .like-btn.liked {
        background: rgba(231, 76, 60, 0.15);
    }

/* ===== ПЛАВНІ ПЕРЕХОДИ ===== */
body, .article-card, .sidebar-block, .comment, .form-container,
.admin-article, .stat-card, .rating-card, .like-btn {
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}


/* =======================================
   МОБІЛЬНА АДАПТАЦІЯ
   ======================================= */

/* ===== Планшет (до 1024px) ===== */
@media (max-width: 1024px) {
    .main-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        order: -1;
    }

    .sidebar-block {
        position: static;
    }

    .sidebar-categories {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

        .sidebar-categories li {
            margin-bottom: 0;
        }

        .sidebar-categories a {
            padding: 8px 14px;
            font-size: 13px;
            background: var(--bg-input);
            border-radius: 20px;
        }

            .sidebar-categories a:hover {
                padding-left: 14px;
            }

    .cat-count {
        font-size: 10px;
        padding: 1px 6px;
    }

    .popular-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .popular-item {
        padding: 10px;
        border-bottom: none;
        background: var(--bg-input);
        border-radius: 8px;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-card {
        height: 350px;
    }

    .hero-card-overlay h1 {
        font-size: 28px;
    }
}

/* ===== Мобільний (до 768px) ===== */
@media (max-width: 768px) {
    /* Шапка */
    .header-inner {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }

    .header-search {
        width: 100%;
    }

        .header-search input {
            width: 100%;
        }

    /* Навігація */
    .category-nav-inner {
        padding: 0 10px;
    }

    .cat-link {
        padding: 12px 14px;
        font-size: 12px;
    }

    /* Hero */
    .hero-section {
        padding: 0 12px;
        margin: 12px auto;
    }

    .hero-card {
        height: 280px;
        border-radius: 8px;
    }

    .hero-card-overlay {
        padding: 20px;
    }

        .hero-card-overlay h1 {
            font-size: 22px;
        }

        .hero-card-overlay .meta {
            font-size: 12px;
        }

    /* Контент */
    .main-layout {
        padding: 0 12px;
        gap: 16px;
        margin: 16px auto;
    }

    /* Картки статей — вертикальні */
    .article-card {
        flex-direction: column;
        min-height: auto;
    }

    .article-card-image {
        width: 100%;
        min-width: 100%;
        height: 180px;
    }

    .no-image-placeholder {
        width: 100%;
        min-width: 100%;
        height: 140px;
    }

    .article-card-body {
        padding: 16px;
    }

        .article-card-body h3 {
            font-size: 16px;
        }

    /* Популярне — одна колонка */
    .popular-list {
        grid-template-columns: 1fr;
    }

    /* Схожі статті */
    .related-grid {
        grid-template-columns: 1fr;
    }

    /* Сторінка статті */
    .article-full {
        padding: 20px 16px;
    }

        .article-full h1 {
            font-size: 26px;
        }

        .article-full .meta {
            flex-wrap: wrap;
            gap: 8px;
        }

        .article-full .content {
            font-size: 16px;
        }

    /* Лайки та поділитись */
    .like-btn {
        font-size: 14px;
        padding: 8px 16px;
    }

    .share-section {
        flex-wrap: wrap;
    }

    /* Коментарі */
    .comment {
        padding: 14px;
    }

    .comment-header {
        flex-wrap: wrap;
        gap: 6px;
    }

    .replies {
        padding-left: 12px;
    }

    /* Адмін */
    .admin-container {
        padding: 0 12px;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

        .admin-header div {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }

    .admin-article {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .admin-article-actions {
        width: 100%;
    }

        .admin-article-actions a {
            flex: 1;
            text-align: center;
        }

    .stats-row {
        flex-direction: column;
        gap: 8px;
    }

    .admin-search-form {
        flex-direction: column;
    }

    .admin-filter-select {
        width: 100%;
    }

    /* Форми */
    .form-container {
        padding: 20px 16px;
        margin: 16px auto;
    }

        .form-container h1 {
            font-size: 24px;
        }

    .checkbox-group {
        flex-direction: column;
    }

    /* Рейтинг */
    .rating-card {
        padding: 14px;
        gap: 12px;
    }

    .rating-username {
        font-size: 15px;
    }

    .rating-stats {
        flex-direction: column;
        gap: 4px;
    }

    /* Футер */
    .site-footer {
        padding: 30px 16px;
    }

    .footer-logo {
        font-size: 22px;
    }

    .footer-links {
        flex-direction: column;
        gap: 8px;
    }
}

/* ===== Маленький мобільний (до 480px) ===== */
@media (max-width: 480px) {
    .top-bar-inner {
        flex-wrap: wrap;
        gap: 6px;
        justify-content: center;
    }

    .top-bar-date {
        display: none;
    }

    .logo {
        font-size: 24px;
    }

    .header-search input {
        font-size: 13px;
        padding: 8px 12px;
    }

    .cat-link {
        padding: 10px 12px;
        font-size: 11px;
    }

    .hero-card {
        height: 220px;
    }

    .hero-card-overlay {
        padding: 16px;
    }

        .hero-card-overlay h1 {
            font-size: 18px;
        }

    .article-card-body h3 {
        font-size: 15px;
    }

    .article-full h1 {
        font-size: 22px;
    }

    .btn {
        padding: 8px 14px;
        font-size: 12px;
    }

    .stat-number {
        font-size: 24px;
    }
}

/* ===== ПАГІНАЦІЯ ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--bg-card);
    text-decoration: none;
    transition: all 0.2s;
}

    .page-link:hover {
        background: var(--accent);
        color: white;
    }

    .page-link.active {
        background: var(--accent);
        color: white;
    }

/* ===== СОЦІАЛЬНІ МЕРЕЖІ У ФУТЕРІ ===== */
.footer-socials {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.2s;
    color: white;
}

    .social-icon svg {
        width: 20px;
        height: 20px;
    }

    .social-icon:hover {
        transform: translateY(-3px);
        color: white;
    }

.social-facebook {
    background: #1877f2;
}

    .social-facebook:hover {
        background: #0d65d9;
    }

.social-telegram {
    background: #0088cc;
}

    .social-telegram:hover {
        background: #006daa;
    }

.social-instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

    .social-instagram:hover {
        opacity: 0.85;
    }