:root {
    --bg-main: #0f172a; 
    --bg-card: #1e293b; 
    --bg-dark: #0b1120;
    --border: #334155; 
    --text-main: #f8fafc; 
    --text-mut: #94a3b8;
    --up: #10b981; 
    --blue: #3b82f6; 
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--bg-main); 
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    padding: 24px; 
    line-height: 1.5;
}

.container { 
    max-width: 1000px; 
    margin: 0 auto; 
}

/* Шапка сайта */
header { 
    display: flex; 
    flex-direction: column;
    align-items: center; 
    border-bottom: 1px solid var(--border); 
    padding-bottom: 16px; 
    margin-bottom: 24px; 
}
.logo {
    color: var(--up); 
    font-size: 28px;
    font-weight: bold;
    font-family: Consolas, "Courier New", monospace;
    border: 1px solid var(--border);
    background: var(--bg-card);
    border-radius: 8px;
    padding: 10px 40px;
    margin-bottom: 20px;
    letter-spacing: 2px;
}
nav {
    display: flex;
    justify-content: center;
    gap: 15px;
}
nav a {
    text-decoration: none;
    color: var(--text-main);
    background: var(--bg-dark);
    font-weight: bold;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 16px;
    transition: 0.2s;
}
nav a:hover {
    background: var(--blue);
    border-color: var(--blue);
}

/* Карточки новостей */
.news-block {
    background: var(--bg-card); 
    border: 1px solid var(--border); 
    border-radius: 12px; 
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.news-content-wrapper {
    display: flex;
    padding: 20px;
    gap: 20px;
}
.news-image {
    flex: 0 0 250px;
    height: 160px;
    background: var(--bg-dark); 
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--text-mut);
    font-family: Consolas, "Courier New", monospace;
    font-size: 24px;
    font-weight: bold;
}
.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.news-text-container {
    flex: 1;
}
.news-title {
    margin: 0 0 12px 0;
    font-size: 20px;
    color: var(--blue);
}
.news-text {
    font-size: 15px;
    line-height: 1.5;
    max-height: 65px; 
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease;
    color: var(--text-main);
}
.news-text::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0; right: 0; height: 30px;
    background: linear-gradient(to bottom, transparent, var(--bg-card));
    pointer-events: none;
}
.news-text.expanded {
    max-height: 1000px;
}
.news-text.expanded::after { display: none; }

.read-more-btn {
    display: inline-block;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    padding: 6px 12px;
    margin-top: 12px;
    color: var(--text-mut);
    transition: 0.2s;
}
.read-more-btn:hover { background: var(--border); color: var(--text-main); }

/* Подвал новости с датой и просмотрами */
.news-footer {
    display: flex;
    justify-content: space-between;
    background: rgba(11, 17, 32, 0.5); 
    border-top: 1px solid var(--border);
    padding: 10px 20px;
    font-size: 13px;
    color: var(--text-mut);
    font-family: Consolas, "Courier New", monospace;
}

/* Нумерованная пагинация */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
    flex-wrap: wrap;
}
.page-link {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-mut);
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.2s;
}
.page-link:hover {
    background: var(--border);
    color: var(--text-main);
}
.page-link.active {
    background: var(--blue);
    border-color: var(--blue);
    color: white;
}
.page-link.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Дисклеймер внизу */
.disclaimer {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-mut);
    padding: 20px;
    font-size: 12px;
    text-align: center;
    margin-top: 40px;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    body { padding: 10px; }
    .news-content-wrapper { flex-direction: column; padding: 15px; }
    .news-image { width: 100%; height: 200px; flex: none; }
    nav { flex-wrap: wrap; }
}