: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;
}

.news-container {
    width: 100%;
    max-width: 1100px;
    padding: 20px 20px;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

/* Заголовок */
.news-header {
    text-align: center;
    margin-bottom: 40px;
}

.news-header h1 {
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.2;
    color: var(--text-main);
}

.news-header h1 .it {
    color: var(--accent-it);
    text-shadow: var(--shadow-it);
}

.news-header p {
    color: var(--text-muted);
    font-size: 16px;
}

/* Хлебные крошки */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    font-size: 14px;
    color: var(--text-muted);
}

.breadcrumbs a {
    color: var(--accent-it);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumbs a:hover {
    color: #00e5ff;
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

.breadcrumbs .separator {
    color: var(--text-muted);
}

.breadcrumbs .current {
    color: var(--text-main);
    font-weight: 500;
}

/* Сетка новостей */
.news-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 40px;
}

.news-card {
    background: var(--panel-bg);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 16px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 24px;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-it);
    border-color: var(--accent-it);
}

.news-card .news-date-badge {
    position: absolute;
    top: 0;
    right: 0;
    padding: 4px 12px;
    font-size: 0.7rem;
    font-family: monospace;
    color: #9ca3af;
    background: rgba(255, 255, 255, 0.05);
    border-bottom-left-radius: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.news-card .news-views-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);
}

.news-meta-badge {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    font-size: 12px;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(0, 210, 255, 0.1);
}

.news-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.news-views {
    display: flex;
    align-items: center;
    gap: 4px;
}

.news-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.news-title a {
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition);
}

.news-title a:hover {
    color: var(--accent-it);
    text-shadow: var(--shadow-it);
}

.news-excerpt {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
}

.no-news {
    text-align: center;
    color: var(--text-muted);
    font-size: 18px;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

/* Страница новости */
.news-title-main {
    font-size: 38px;
    font-weight: 700;
    margin: 20px 0 20px 0;
    line-height: 1.2;
    color: var(--text-main);
    text-align: center;
}

.news-hero-image {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 30px auto;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0, 210, 255, 0.2);
}

.news-hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

.news-article {
    background: var(--panel-bg);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.1);
    position: relative;
}

.news-date-badge {
    position: absolute;
    top: 0;
    right: 0;
    padding: 4px 12px;
    font-size: 0.7rem;
    font-family: monospace;
    color: #9ca3af;
    background: rgba(255, 255, 255, 0.05);
    border-bottom-left-radius: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.news-views-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);
}

.news-content {
    color: var(--text-main);
    font-size: 16px;
    line-height: 1.8;
}

.news-content img {
    max-width: 600px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.news-content img:hover,
.news-content a.lightbox-trigger:hover,
.news-content a.lightbox-trigger:hover img {
    box-shadow: none !important;
    transform: none !important;
    filter: none !important;
    text-shadow: none !important;
}

@media (max-width: 768px) {
    .news-content img {
        max-width: 100%;
    }
}

.news-content h2,
.news-content h3 {
    color: var(--accent-it);
    margin-top: 30px;
    margin-bottom: 15px;
}

.news-content p {
    margin: 0 0 15px 0;
}

.news-content p:first-child {
    margin-top: 0;
}

.news-content a {
    color: var(--accent-it);
    text-decoration: none;
    transition: var(--transition);
}

.news-content a:not(.lightbox-trigger):hover {
    text-shadow: var(--shadow-it);
}

.news-content a.lightbox-trigger:hover {
    text-shadow: none !important;
    box-shadow: none !important;
    transition: none !important;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.pagination-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--panel-bg);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 8px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.pagination-item:hover {
    background: rgba(0, 210, 255, 0.1);
    border-color: var(--accent-it);
    color: var(--accent-it);
    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 {
    background: transparent;
    border: none;
    color: var(--text-muted);
}

/* Кнопка назад */
.back-link-2 {
    text-align: center;
    margin-top: 30px;
}

.back-link-2 a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-it);
    text-decoration: none;
    font-size: 16px;
    padding: 12px 24px;
    background: var(--panel-bg);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 8px;
    transition: var(--transition);
}

.back-link-2 a:hover {
    background: rgba(0, 210, 255, 0.1);
    border-color: var(--accent-it);
    box-shadow: var(--shadow-it);
}

.back-link {
    text-align: center;
    margin-top: 20px;
}

.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) {
    .news-container {
        padding: 20px 16px;
    }

    .news-header h1,
    .news-title-main {
        font-size: 22px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-article {
        padding: 24px;
    }

    .pagination {
        gap: 4px;
    }

    .pagination-item {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}


/* --- Улучшения для читаемости --- */

/* Добавляем эффект "стекла" для карточек и статьи */
.news-card, .news-article {
    background: rgba(16, 22, 35, 0.7) !important; /* Делаем фон полупрозрачным */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Оформление цитат в тексте */
.news-content blockquote {
    border-left: 3px solid var(--accent-it);
    padding-left: 20px;
    font-style: italic;
    color: var(--text-muted);
    margin: 20px 0;
    background: rgba(0, 210, 255, 0.05);
    padding: 15px 20px;
}

/* Улучшение списков */
.news-content ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.news-content li {
    margin-bottom: 8px;
}

/* Добавляем плавность для длинных слов */
.news-title a, .news-excerpt {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Удаление "лишнего воздуха" вокруг параграфов и br */
.news-content p {
    margin-bottom: 10px !important; /* Уменьшите, если нужно еще компактнее */
}