:root {
    --bg-dark: #0a0e17;
    --panel-bg: rgba(16, 22, 35, 0.9);
    --accent-it: #00d2ff;
    --accent-car: #ff3c00;
    --text-main: #e0e6ed;
    --text-muted: #8899a6;
    --shadow-it: 0 0 20px rgba(0, 210, 255, 0.3);
    --shadow-car: 0 0 20px rgba(255, 60, 0, 0.3);
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Courier New', Courier, monospace;
    color: var(--text-main);
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    overflow-x: hidden;
    background-color: var(--bg-dark);
    background-image: 
        url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj48ZyBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiMwMGQyZmYiIGZpbGwtb3BhY2l0eT0iMC4wNSI+PHBhdGggZD0iTTAgMGg0MHY0MEgwVjB6bTQwIDQwaDQwdjQwSDQwVjQweiIvPjwvZz48L2c+PC9zdmc+'),
        url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4MCIgaGVpZ2h0PSI4MCIgdmlld0JveD0iMCAwIDgwIDgwIj48ZyBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiNmZjNjMDAiIGZpbGwtb3BhY2l0eT0iMC4wNSI+PHBhdGggZD0iTTAgMGg0MHY0MEgwVjB6bTQwIDQwaDQwdjQwSDQwVjQweiIvPjwvZz48L2c+PC9zdmc+');
    background-position: left top, right top;
    background-repeat: repeat-y, repeat-y;
    background-size: 50% auto, 50% auto;
}

body::after {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    width: 2px; height: 100%;
    background: linear-gradient(to bottom, var(--accent-it), var(--accent-car));
    z-index: -1;
    opacity: 0.5;
}

.blog-container {
    width: 100%;
    max-width: 1100px;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    position: relative;
    z-index: 10;
}

.blog-header {
    text-align: center;
    margin-bottom: 40px;
}

.blog-header h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
}

.blog-header h1 .it {
    color: var(--accent-it);
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

.blog-header p {
    font-size: 18px;
    color: var(--text-muted);
}

.category-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 40px;
}

.filter-item {
    padding: 10px 20px;
    border: 2px solid var(--accent-it);
    border-radius: 25px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: var(--transition);
    background: rgba(0, 210, 255, 0.05);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.1);
}

.filter-item:hover {
    background: var(--accent-it);
    color: var(--bg-dark);
    box-shadow: var(--shadow-it);
}

.filter-item.active {
    background: var(--accent-it);
    border-color: var(--accent-it);
    color: var(--bg-dark);
    box-shadow: var(--shadow-it);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.post-card {
    background: var(--panel-bg);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.1);
    position: relative;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-it);
    border-color: var(--accent-it);
}

.post-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content {
    padding: 24px;
}

.post-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--accent-it);
    color: var(--bg-dark);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 12px;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

.post-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
}

.post-title a {
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition);
}

.post-title a:hover {
    color: var(--accent-it);
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

.post-excerpt {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* Badge styling for post meta */
.post-meta-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 4px 12px;
    font-size: 0.7rem;
    font-family: monospace;
    color: #9ca3af;
    background: rgba(255, 255, 255, 0.05);
    border-top-left-radius: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.post-meta-badge .post-date,
.post-meta-badge .post-views {
    color: #9ca3af;
    font-size: 0.7rem;
}

.post-meta-badge .post-views i {
    margin-right: 2px;
}

.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    color: var(--text-muted);
    font-size: 18px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
}

.pagination-item {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--accent-it);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    transition: var(--transition);
    background: rgba(0, 210, 255, 0.05);
}

.pagination-item:hover {
    background: var(--accent-it);
    color: var(--bg-dark);
    box-shadow: var(--shadow-it);
}

.pagination-item.active {
    background: var(--accent-it);
    border-color: var(--accent-it);
    color: var(--bg-dark);
    box-shadow: var(--shadow-it);
}

.pagination-item.dots {
    border: none;
    color: var(--text-muted);
}

.back-link {
    text-align: center;
}

.back-link a {
    display: inline-block;
    padding: 12px 28px;
    background: var(--accent-car);
    color: var(--bg-dark);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 0 10px rgba(255, 60, 0, 0.3);
}

.back-link a:hover {
    background: #ff5500;
    transform: translateY(-2px);
    box-shadow: var(--shadow-car);
}

/* Адаптивность */
@media (max-width: 768px) {
    .blog-container {
        padding: 20px 15px;
    }

    .blog-header h1 {
        font-size: 32px;
    }

    .blog-header p {
        font-size: 16px;
    }

    /* На мобильных всегда 1 колонка */
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .category-filter {
        gap: 8px;
    }

    .filter-item {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* Адаптивность для планшетов */
@media (max-width: 1024px) and (min-width: 769px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
