
/* === Переключение темы статьи === */
:root, [data-article-theme="light"] {
    --comments-bg: #ffffff;
    --comments-text: #1e293b;
    --comments-date: #64748b;
    --comments-input-bg: #f8fafc;
    --comments-input-border: #cbd5e1;
    --comments-input-text: #1e293b;
    --comments-btn-bg: #1f2937;
    --comments-btn-text: #ffffff;

    --card-bg: #ffffff;
    --card-border: rgba(255, 255, 255, 0.7);
    --text-primary: #1e293b;
    --text-secondary: #334155;
    --heading-color: #0f172a;
    --link-color: #2563eb;
    --widget-bg: #f8fafc;
    --widget-border: #e2e8f0;
    --btn-color: #475569;
    --btn-hover: #e2e8f0;
    --btn-active-bg: #dcfce7;
    --btn-active-color: #15803d;
    --th-bg: #e2e8f0;
    --th-color: #475569;
    --tr-bg: #ffffff;
    --tr-hover: #f1f5f9;
    --td-color: #1e293b;
    --td-num: #64748b;
    --val-color: #15803d;
}

[data-article-theme="dark"] {
    --comments-bg: #0b1724;
    --comments-text: #e2e8f0;
    --comments-date: #94a3b8;
    --comments-input-bg: #0f1e2e;
    --comments-input-border: #334155;
    --comments-input-text: #e2e8f0;
    --comments-btn-bg: #ffd605;
    --comments-btn-text: #000000;

    --card-bg: #071927;
    --card-border: rgba(255, 214, 5, 0.2);
    --text-primary: #e2e8f0;
    --text-secondary: #cbd5e1;
    --heading-color: #f8fafc;
    --link-color: #60a5fa;
    --widget-bg: #030f18;
    --widget-border: rgba(255, 255, 255, 0.08);
    --btn-color: #94a3b8;
    --btn-hover: rgba(255, 255, 255, 0.05);
    --btn-active-bg: rgba(46, 125, 50, 0.35);
    --btn-active-color: #4ade80;
    --th-bg: #0b2233;
    --th-color: #94a3b8;
    --tr-bg: rgba(255, 255, 255, 0.02);
    --tr-hover: rgba(255, 255, 255, 0.06);
    --td-color: #e2e8f0;
    --td-num: #64748b;
    --val-color: #000000;
}

/* Применение переменных */
.article__content {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    color: var(--text-primary);
    transition: background 0.3s ease, color 0.3s ease;
}

.article__content p {
    color: var(--text-secondary) !important;
}

.article__content strong {
    color: var(--heading-color) !important;
}

.article__content h2 {
    color: var(--heading-color) !important;
    border-bottom: 2px solid var(--widget-border) !important;
}

.article__content a {
    color: var(--link-color);
}

.leaderboard-widget {
    background: var(--widget-bg) !important;
    border: 1px solid var(--widget-border) !important;
}

.leaderboard-nav-btn {
    color: var(--btn-color);
}

.leaderboard-nav-btn:hover {
    background: var(--btn-hover);
}

.leaderboard-nav-btn.active {
    background: var(--btn-active-bg) !important;
    color: var(--btn-active-color) !important;
}

.analytics-panel h3 {
    color: var(--heading-color) !important;
}

.analytics-table thead th {
    background: var(--th-bg) !important;
    color: var(--th-color) !important;
}

.analytics-table tbody tr {
    background: var(--tr-bg) !important;
}

.analytics-table tbody tr:hover {
    background: var(--tr-hover) !important;
}



.analytics-table td:first-child {
    color: var(--td-num) !important;
}

.analytics-table td.value,
.analytics-table td:last-child {
    color: var(--val-color) !important;
}

/* Кнопка переключения */
.article-theme-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #1a1a1a;
    border: 2px solid #ffd605;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    font-size: 20px;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffd605;
}

.article-theme-btn:hover {
    transform: scale(1.1);
}

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

body {
    font-family: 'Roboto', Arial, sans-serif;
    background-color: #dbdbdb;
    color: #ffffff;
    min-height: 100vh;
}

.site-wrapper {
    position: relative;
    min-height: 100vh;
}

.bg-image {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: url('https://static.tildacdn.com/tild6439-3637-4434-b231-656636323839/forest.jpg') center/cover no-repeat;
    z-index: 0;
}

/* Дымка поверх фона */
.bg-image::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 27, 43, 0.55);
    z-index: 1;
    pointer-events: none;
}

.content-overlay {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Шапка */
.header {
    text-align: center;
    padding-top: 0;
}

.header__logo {
    padding: 0px 0 0;
}

.header__logo-img {
    max-width: 750px;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
}

.header__nav {
    margin-top: 0;
}

.header__burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    width: 28px;
    height: 20px;
}

.header__burger span {
    display: block;
    position: absolute;
    width: 100%;
    height: 3px;
    background: #ffffff;
    left: 0;
    transition: 0.25s ease-in-out;
}

.header__burger span:nth-child(1) { top: 0; }
.header__burger span:nth-child(2) { top: 8px; }
.header__burger span:nth-child(3) { top: 8px; }
.header__burger span:nth-child(4) { top: 16px; }

.header__burger--open span:nth-child(1) { top: 8px; width: 0; left: 50%; }
.header__burger--open span:nth-child(2) { transform: rotate(45deg); }
.header__burger--open span:nth-child(3) { transform: rotate(-45deg); }
.header__burger--open span:nth-child(4) { top: 8px; width: 0; left: 50%; }

.header__menu {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    padding: 10px 20px;
    height: 50px;
}

.header__menu-item {
    position: relative;
    padding: 0 15px;
}

.header__menu-item:first-child {
    padding-left: 0;
}

.header__menu-item:last-child {
    padding-right: 0;
}

.header__menu-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 1px;
    display: inline-block;
    transition: color 0.3s ease-in-out;
    position: relative;
}

.header__menu-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    opacity: 0;
    width: 100%;
    height: 100%;
    border-bottom: 1px solid #f0cc00;
    box-shadow: inset 0px -1px 0px 0px #f0cc00;
    transition: all 0.3s ease;
    pointer-events: none;
}

.header__menu-link:hover {
    color: #ffd605;
}

.header__menu-link:hover::after {
    opacity: 1;
}

.header__menu-link--active {
    color: #ffd605 !important;
    font-weight: 700 !important;
}

.header__arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #ffffff;
    margin-left: 5px;
    vertical-align: middle;
    transition: border-color 0.3s;
}

.header__menu-link:hover .header__arrow {
    border-top-color: #ffd605;
}

.header__submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #041b2b;
    list-style: none;
    padding: 10px 0;
    min-width: 150px;
    z-index: 100;
    margin-top: 0;
}

.header__menu-item--sub:hover .header__submenu {
    display: block;
}

.header__submenu a {
    color: #ffffff;
    text-decoration: none;
    font-size: 18px;
    padding: 8px 20px;
    display: block;
    transition: color 0.3s ease-in-out;
    white-space: nowrap;
}

.header__submenu a:hover {
    color: #ffd605;
}

.header__separator {
    height: 1px;
    background-color: #ffffff;
    margin: 0 20px;
    opacity: 1;
}

/* Главный контент */
.main-content {
    flex: 1;
    padding: 60px 0 40px;
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
}

/* Новости */
.news__title {
    font-size: 40px;
    font-weight: 700;
    text-align: left;
    margin-bottom: 30px;
    padding: 0 20px;
}

.news__list {
    display: flex;
    flex-direction: column;
}

.news__item {
    cursor: pointer;
    padding: 0 20px;
}

.news__separator {
    height: 2px;
    background-color: #ffffff;
    opacity: 1;
    margin-bottom: 15px;
}

.news__item-title {
    font-size: 24px;
    font-weight: 700;
    padding-bottom: 15px;
}

.news__item-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s;
}

.news__item-title a:hover {
    color: #000000;
}

.news__item-descr {
    font-size: 16px;
    font-weight: 500;
    padding-bottom: 10px;
}

.news__item-date {
    font-size: 14px;
    font-weight: 500;
    padding-bottom: 20px;
    display: block;
}

.news__pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
    padding: 0 20px;
}

.news__pagination-btn,
.news__pagination-page {
    color: #000000;
    background-color: #ffffff;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 15px;
    font-weight: 600;
    box-shadow: 0 0 10px rgba(0,0,0,0.6);
    transition: 0.2s ease-in-out;
}

.news__pagination-btn:hover,
.news__pagination-page:hover,
.news__pagination-page--active {
    border-color: #f2e36f;
}

.news__pagination-page--active {
    background-color: #000000;
}

/* Статьи и страницы */
/* === Светлая карточка статьи === */












/* === Светлые таблицы аналитики === */




















/* === Светлый лидерборд === */














.article {
    padding: 0 20px;
    max-width: 820px;
    margin: 0 auto;
}

.article__title {
    font-size: 34px;
    font-weight: 700;
    text-align: center;
    color: #ffffff;
    margin-bottom: 30px;
}

.article__date {
    font-size: 14px;
    color: #ffffff;
    display: block;
    margin-bottom: 30px;
    text-align: center;
}

.article__hero {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 7px;
    margin-bottom: 20px;
}







.article__content em {
    color: #000000;
}

.article__content img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

.article__content ul,
.article__content ol {
    padding-left: 25px !important;
    margin: 10px 0;
    list-style-position: outside;
}

.article__content li {
    margin-bottom: 4px;
}

.article__content hr {
    margin: 20px 0;
    border: 1px solid #ddd;
}

.article__back {
    display: inline-block;
    margin-top: 30px;
    color: #000000;
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    transition: color 0.3s;
}

.article__back:hover {
    color: #ffffff;
}

.article__content img[src*="/images/clans/"] {
    width: 1em;
    height: 1em;
    vertical-align: baseline;
}

/* Футер */
.footer {
    text-align: center;
    padding: 60px 20px 30px;
}

.footer__text {
    font-weight: 600;
    margin-bottom: 25px;
    font-size: 18px;
}

.footer__links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
}

.footer__btn {
    color: #000000;
    background-color: #ffffff;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
}

.footer__btn:hover {
    background-color: #393939;
    color: #ffffff;
}

.footer__counters {
    margin-bottom: 20px;
}

.footer__counters a,
.footer__counters img {
    margin: 0 5px;
    vertical-align: middle;
}

.footer__copy {
    font-size: 16px;
    font-style: italic;
    opacity: 0.8;
}

/* Страница состава */
.roster {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0px 20px 40px;
}

.roster__main-title {
    font-size: 40px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 20px;
}

.roster__section {
    margin-bottom: 90px;
}

.roster__section-title {
    font-size: 20px;
    font-weight: 400;
    color: #ffffff;
    text-align: center;
    margin-bottom: 60px;
    text-underline-offset: 5px;
}

.roster__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px 20px;
    justify-items: center;
}

.roster__card {
    text-align: center;
    max-width: 150px;
}

.roster__avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    margin: 0 auto 12px;
}

.roster__name {
    margin-bottom: 4px;
}

.roster__name a {
    color: #ffffff;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
    transition: color 0.3s;
    display: inline-block;
}

.roster__name a:hover {
    color: #000000;
}

.roster__role {
    color: #ffffff;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
}

.roster__grid--centered {
    display: grid !important;
    grid-template-columns: repeat(3, 150px) !important;
    justify-content: center !important;
    gap: 60px 80px;
}

/* Устав */
.law {
    max-width: 860px;
    margin: 0 auto;
    padding: 0px 20px 40px;
}

.law__title {
    font-size: 40px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 40px;
}

.law__chat {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.law__item {
    display: flex;
    max-width: 80%;
}

.law__item--q {
    align-self: flex-start;
}

.law__item--a {
    align-self: flex-end;
}

.law__bubble {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
}

.law__bubble--q {
    background-color: #4f4f4f;
    color: #ffffff;
    border-bottom-left-radius: 4px;
}

.law__bubble--a {
    background-color: #eeeeee;
    color: #000000;
    border-bottom-right-radius: 4px;
}

.law__text ol,
.law__text ul {
    padding-left: 20px;
    margin: 8px 0;
}

.law__text li {
    margin-bottom: 4px;
}

.law__text p {
    margin-bottom: 8px;
}

/* Чемпионат */
.champ {
    max-width: 960px;
    margin: 0 auto;
    padding: 0px 20px 40px;
}

.champ__title {
    font-size: 30px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 60px;
    line-height: 1.4;
}

.champ__round-title {
    text-align: center;
    background-color: #7a7a7a;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    padding: 7px;
    margin-top: 60px;
}

.champ__table-wrapper {
    overflow-x: auto;
}

.champ__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: #4d4c4c;
    text-align: left;
}

.champ__table thead th {
    background: #bcbec0;
    color: #000;
    border: 1px solid #fff;
    padding: 7px 5px;
    font-weight: 600;
    text-align: center;
}

.champ__table tbody td {
    border: 1px solid #d9d9d9;
    padding: 7px 5px;
    vertical-align: middle;
    line-height: 1.2;
}

.champ__table tbody tr {
    background: #ffffff;
}

.champ__table tbody tr.even {
    background: #eeeeee;
}

.champ__win {
    color: #5fcd5b;
    font-weight: 700;
    text-decoration: none;
}

.champ__lose {
    color: #eb5215;
    font-weight: 700;
    text-decoration: none;
}

/* Профессии */
.prof {
    max-width: 860px;
    margin: 0 auto;
    padding: 0px 20px 40px;
}

.prof__title {
    font-size: 40px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 40px;
}

.prof__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.prof__item {
    font-size: 14px;
    color: #ffffff;
    line-height: 1.5;
}

.prof__item strong {
    color: #ffffff;
}

.prof__blue {
    color: #bbd1fa;
}

.prof__sep {
    border: none;
    height: 1px;
    background: rgba(255,255,255,0.3);
    margin: 10px 0;
}

/* Карта леса */
.map {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0px 20px 40px;
    text-align: center;
}

.map__title {
    font-size: 40px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 40px;
}

.map__grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    line-height: 0;
}

.map__row {
    display: flex;
    gap: 0;
    justify-content: center;
}

.map__cell {
    width: 25%;
    height: auto;
    display: block;
    cursor: zoom-in;
    transition: opacity 0.2s;
}

.map__cell:hover {
    opacity: 0.8;
}

.zoom-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.zoom-image {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
}

.zoom-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 50px;
    cursor: pointer;
    z-index: 10000;
}

/* Магический лес */
.magic {
    max-width: 860px;
    margin: 0 auto;
    padding: 0px 20px 40px;
}

.magic__title {
    font-size: 40px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 50px;
}

.magic__list {
    display: flex;
    flex-direction: column;
    gap: 35px;
    position: relative;
    padding-left: 30px;
    border-left: 1px solid rgba(255,255,255,0.4);
}

.magic__item {
    position: relative;
}

.magic__item::before {
    content: '';
    position: absolute;
    left: -36px;
    top: 5px;
    width: 10px;
    height: 10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: transparent;
}

.magic__item-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.magic__item-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s;
}

.magic__item-title a:hover {
    color: #000000;
}

.magic__item-desc {
    font-size: 14px;
    color: #ffffff;
    margin-bottom: 6px;
    line-height: 1.5;
}

.magic__item-author {
    font-size: 13px;
}

.magic__item-author a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s;
}

.magic__item-author a:hover {
    color: #000000;
}

/* Калькуляторы */
.calc {
    max-width: 960px;
    margin: 0 auto;
    padding: 0px 20px 40px;
}

.calc__title {
    display: none;
}

.calc__buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 60px 0;
}

.calc__btn {
    display: inline-block;
    color: #ffffff;
    border: 3px solid #ffffff;
    padding: 14px 40px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
    margin-bottom: 20px;
    text-align: center;
    min-width: 300px;
}

.calc__btn:hover {
    background: #ffffff;
    color: #000000;
}

.calc__popup {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 9999;
}

.calc__popup-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
}

.calc__popup-content {
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    padding: 15px;
    border-radius: 8px;
    max-width: 750px;
    width: 95%;
}

.calc__popup-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 30px;
    height: 30px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    line-height: 30px;
    text-align: center;
}

/* Калькулятор металлурга */
.metallurg-calc h2 {
    font-size: 1.5rem;
    color: #fff;
    margin: 0 0 5px;
}
.metallurg-calc h2 small {
    font-size: 0.8rem;
    color: #aaa;
    background: #333;
    padding: 3px 12px;
    border-radius: 20px;
    font-weight: 400;
}
.metallurg-subhead {
    color: #bbb;
    font-size: 14px;
    margin-bottom: 20px;
    padding: 8px 16px;
    background: #2a2a2a;
    border-radius: 0 20px 20px 0;
    border-left: 4px solid #555;
}
.metallurg-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 20px;
}

.metallurg-field {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}
.metallurg-field label {
    min-width: 140px;
    font-weight: 500;
    font-size: 14px;
    color: #ccc;
}
.metallurg-field select,
.metallurg-field input {
    flex: 1;
    padding: 8px 14px;
    border: 1px solid #555;
    border-radius: 30px;
    font-size: 14px;
    background: #333;
    color: #fff;
    outline: none;
}
.metallurg-field select:focus,
.metallurg-field input:focus {
    border-color: #3f7bb3;
    background: #444;
}
.metallurg-result {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    background: #2a2a2a;
    border-radius: 20px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #ddd;
}
.metallurg-result span:last-child {
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
}
.metallurg-ingots {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #2a2a2a;
    border-radius: 20px;
    margin-top: 12px;
    font-size: 14px;
    color: #ddd;
}
.metallurg-big {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    background: #444;
    padding: 2px 20px;
    border-radius: 30px;
}
.metallurg-badges {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #ccc;
}
.metallurg-badges span {
    background: #333;
    padding: 4px 14px;
    border-radius: 20px;
}
.metallurg-table-wrap {
    border: 1px solid #555;
    border-radius: 16px;
    overflow-x: auto;
    margin-bottom: 10px;
}
.metallurg-table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    color: #ccc;
}
.metallurg-table-wrap th {
    background: #333;
    padding: 6px 4px;
    text-align: center;
    font-weight: 600;
    color: #ddd;
}
.metallurg-table-wrap td {
    padding: 5px 4px;
    text-align: center;
    border: 1px solid #555;
    color: #ccc;
}
.metallurg-info {
    background: #2a2a2a;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    margin-top: 8px;
    color: #bbb;
}

/* Комментарии */
.comments {
    max-width: 860px;
    margin: 40px auto 0;
    padding: 0 20px;
}

.comments__title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
}

.comments__list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comments__item {
    background: #ffffff;
    border-radius: 7px;
    padding: 15px 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.comments__item-name {
    font-weight: 700;
    font-size: 16px;
    color: #000000;
    margin-bottom: 5px;
}

.comments__item-text {
    font-size: 14px;
    color: #000000;
    margin-bottom: 8px;
    line-height: 1.4;
}

.comments__item-date {
    font-size: 10px;
    color: #686868;
}
.comments__empty {
    color: #999;
    font-size: 14px;
    text-align: center;
    padding: 15px 0;
}

.comments__form {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comments__input,
.comments__textarea {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

.comments__textarea {
    min-height: 80px;
}

.comments__btn {
    align-self: flex-end;
    padding: 10px 24px;
    background: #1f1f1f;
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s;
}

.comments__btn:hover {
    background: #444;
}

.news__item-text {
    font-size: 16px;
    color: #ffffff;
    font-weight: 500;
    padding-bottom: 10px;
    line-height: 1.5;
}

.news__item-text h2 {
    font-size: 14px;
    color: #aaa;
    font-weight: 500;
    margin: 15px 0 5px;
}

.news__item-text h2:first-child {
    margin-top: 0;
}

.news__item-text p {
    margin: 0 0 15px;
}

.news__item-text strong {
    color: #ffd605;
}

.prof__content {
    font-size: 14px;
    color: #ffffff;
    line-height: 1.6;
}

.prof__content h1,
.prof__content h2,
.prof__content h3,
.prof__content h4 {
    color: #ffffff;
    margin: 25px 0 10px;
}

.prof__content h2 {
    font-size: 22px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 8px;
}

.prof__content h3 {
    font-size: 18px;
}

.prof__content h4 {
    font-size: 16px;
}

.prof__content p {
    margin-bottom: 12px;
}

.prof__content ul,
.prof__content ol {
    padding-left: 20px;
    margin: 10px 0;
}

.prof__content li {
    margin-bottom: 6px;
}

.prof__content table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 13px;
}

.prof__content th {
    background: #333;
    color: #fff;
    padding: 8px;
    text-align: left;
    border: 1px solid #555;
}

.prof__content td {
    padding: 8px;
    border: 1px solid #555;
    background: rgba(255,255,255,0.05);
}

.prof__content strong {
    color: #ffffff;
    font-weight: 700;
}

.prof__content a {
    color: #000000;
    text-decoration: underline;
}

.prof__content a:hover {
    text-decoration: none;
    color: #ffffff;
}

.prof__content hr {
    border: 1px solid rgba(255,255,255,0.2);
    margin: 20px 0;
}


/* Мобильная версия */
@media (max-width: 980px) {
    .header {
        background-color: transparent;
        padding-bottom: 5px;
    }

    .header__nav {
        position: relative;
        background-color: transparent;
    }

    .header__burger {
        display: inline-block;
        margin: 0 auto;
        background-color: transparent;
    }

    .header__logo {
        padding: 10px 0 5px;
    }

    .header__logo-img {
        max-width: 300px;
    }

    .header__menu {
        display: none;
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 10px 0 0;
        height: auto;
    }

    .header__menu--open {
        display: flex;
    }

    .header__menu-item {
        width: 100%;
        text-align: center;
        padding: 8px 0;
    }

    .header__menu-link {
        font-size: 18px;
    }

    .header__submenu {
        position: static;
        transform: none;
        display: none;
        background-color: transparent;
    }

    .header__menu-item--sub--open .header__submenu {
        display: block;
    }

    .header__submenu a {
        font-size: 15px;
        padding: 4px 0;
    }

    .header__separator {
        margin: 5px 15px 0;
    }

    .main-content {
        padding: 30px 0 20px;
        max-width: 100%;
    }

    .news__title {
        font-size: 24px;
        text-align: center;
        padding: 0 15px;
        margin-bottom: 20px;
    }

    .news__item {
        padding: 0 15px;
    }

    .news__separator {
        margin-left: 0;
        margin-right: 0;
    }

    .news__item-title {
        font-size: 18px;
        padding: 0 0 10px;
    }

    .news__item-descr {
        padding: 0 0 5px;
    }

    .news__item-date {
        font-size: 14px;
        font-weight: 500;
        padding: 0 0 20px;
        display: block;
        margin-top: 8px;
        color: #aaa;
    }

    .news__item-text {
        padding: 0;
    }

    .article {
        padding: 0;
        max-width: 100%;
        width: 100%;
    }

    .article__title {
        font-size: 22px;
        padding: 0 15px;
        margin-bottom: 20px;
        text-align: center;
    }

    

    .article__content ul,
    .article__content ol {
        padding-left: 20px !important;
    }

    .article__hero {
        border-radius: 0;
        margin-bottom: 15px;
        height: auto !important;
        max-height: none !important;
        object-fit: contain;
    }

    .article__content img {
        max-width: 100%;
        height: auto;
    }

    .article__back {
        padding: 15px;
        font-size: 16px;
        display: block;
    }

    .footer {
        padding: 40px 15px 20px;
    }

    .footer__text {
        font-size: 16px;
    }

    .footer__links {
        gap: 8px;
    }

    .footer__btn {
        font-size: 14px;
        padding: 6px 12px;
    }

    .roster {
        padding: 30px 15px 20px;
    }
    .roster__main-title {
        font-size: 24px;
        text-align: center;
        margin-bottom: 40px;
    }
    .roster__section-title {
        font-size: 16px;
        margin-bottom: 40px;
    }
    .roster__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 10px;
    }
    .roster__grid--centered {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    .roster__avatar {
        width: 120px;
        height: 120px;
    }
    .roster__name a {
        font-size: 15px;
    }
    .roster__role {
        font-size: 13px;
    }

    .calc__popup-content {
        max-height: 90vh;
        overflow-y: auto;
        padding: 20px 12px;
        width: 95%;
    }

    .calc__popup-close {
        top: 8px;
        right: 8px;
        width: 28px;
        height: 28px;
        font-size: 18px;
        line-height: 28px;
        z-index: 10;
    }

    .metallurg-field {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .metallurg-field label {
        min-width: auto;
        font-size: 13px;
    }

    .metallurg-field select,
    .metallurg-field input {
        width: 100%;
    }

    .metallurg-calc h2 {
        font-size: 1.2rem;
        padding-right: 30px;
    }

    .comments {
        padding: 0 15px;
    }

    .comments__form {
        gap: 8px;
    }

    .comments__btn {
        align-self: stretch;
        text-align: center;
    }

        .prof__content table {
        font-size: 12px;
    }

    .prof__content th,
    .prof__content td {
        padding: 6px 4px;
    }
}
/* Таблицы в статьях — компактнее */
.article__content table {
    font-size: 12px;
    line-height: 1.3;
}

.article__content table th {
    padding: 8px 6px;
    text-align: center;
    vertical-align: middle;
    word-wrap: break-word;
    max-width: 100px;
}

.article__content table td {
    padding: 6px 4px;
    text-align: center;
    vertical-align: middle;
}


/* Таблицы в статьях — выравнивание колонок */
.article__content table td,
.article__content table th {
    text-align: center;
}

/* Колонка с названием клана — по левому краю */
.article__content table td:nth-child(2),
.article__content table th:nth-child(2) {
    text-align: left;
}

/* Позиция (первая колонка) — по центру */
.article__content table td:first-child,
.article__content table th:first-child {
    text-align: center !important;
}

/* Аналитика */
.analytics-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.analytics-tab { padding: 8px 16px; background: rgba(4,27,43,0.8); color: #fff; border: 1px solid rgba(255,214,5,0.3); border-radius: 20px; cursor: pointer; font-size: 14px; transition: all 0.3s; }
.analytics-tab:hover { background: rgba(255,214,5,0.2); border-color: #000000; }
.analytics-tab.active { background: #ffd605; color: #000; font-weight: 700; }













/* ==========================================================
   СВЕТЛАЯ ТЕМА: СТАТЬЯ И КОНТЕНТ
   ========================================================== */
.article__content {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border);
    color: var(--text-primary) !important;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    padding: 35px 40px;
    color: #1e293b;
}

.article__content p {
    color: var(--text-secondary) !important;
    font-size: 16px !important;
    line-height: 1.7 !important;
    margin-bottom: 18px;
}

.article__content strong {
    color: var(--heading-color) !important;
    font-weight: 700;
}

.article__content h2 {
    color: var(--heading-color) !important;
    font-size: 20px;
    font-weight: 700;
    margin: 35px 0 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0 !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.article__content h2::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 18px;
    background: #16a34a;
    border-radius: 2px;
}

.article__content a {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 500;
}

.article__content a:hover {
    color: #1d4ed8;
    text-decoration: none;
}

/* ==========================================================
   ВИДЖЕТ ЛИДЕРБОРДА (ПЕРЕМЕННЫЕ ДЛЯ ОБЕИХ ТЕМ)
   ========================================================== */
.leaderboard-widget {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 20px;
    background: var(--widget-bg) !important;
    border: 1px solid var(--widget-border) !important;
    border-radius: 10px;
    padding: 16px;
    margin: 15px 0 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.leaderboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-right: 1px solid var(--widget-border);
    padding-right: 12px;
}

.leaderboard-sidebar__title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--td-num);
    margin-bottom: 8px;
    padding-left: 8px;
    letter-spacing: 0.5px;
}

.leaderboard-nav-btn {
    text-align: left;
    background: transparent;
    border: none;
    border-left: 3px solid transparent;
    color: var(--btn-color);
    padding: 9px 12px;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.leaderboard-nav-btn:hover {
    background: var(--btn-hover);
    padding-left: 15px;
}

.leaderboard-nav-btn.active {
    background: var(--btn-active-bg) !important;
    color: var(--btn-active-color) !important;
    font-weight: 600;
    border-left: 3px solid var(--btn-active-color) !important;
}

.leaderboard-content {
    min-width: 0;
    padding: 4px 6px;
}

.analytics-panel h3 {
    font-size: 17px;
    color: var(--heading-color) !important;
    margin: 0 0 8px 0;
    font-weight: 700;
}

.analytics-subtitle {
    color: var(--td-num) !important;
    font-size: 12px;
    margin: -4px 0 12px 0;
    font-style: italic;
}

.analytics-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 3px;
    margin: 0;
}

.analytics-table thead th {
    background: var(--th-bg) !important;
    color: var(--th-color) !important;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 8px 12px;
    border: none;
    letter-spacing: 0.5px;
}

.analytics-table thead th:first-child { border-radius: 6px 0 0 6px; width: 45px; text-align: center; }
.analytics-table thead th:nth-child(2) { text-align: left; }
.analytics-table thead th:last-child { border-radius: 0 6px 6px 0; text-align: right; }

.analytics-table tbody tr {
    background: var(--tr-bg) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: background 0.15s ease;
}

.analytics-table tbody tr:hover {
    background: var(--tr-hover) !important;
}

.analytics-table td {
    padding: 9px 12px;
    font-size: 14px;
    color: var(--td-color) !important;
    border: none;
    vertical-align: middle;
}

.analytics-table td:first-child {
    text-align: center;
    font-weight: 700;
    color: var(--td-num) !important;
    border-radius: 6px 0 0 6px;
}

.analytics-table td:nth-child(2) {
    text-align: left;
    font-weight: 600;
}

.analytics-table td.value,
.analytics-table td:last-child {
    text-align: right;
    font-weight: 700;
    color: var(--val-color) !important;
    font-variant-numeric: tabular-nums;
    border-radius: 0 6px 6px 0;
}

.analytics-panel {
    display: none !important;
}

.analytics-panel.active {
    display: block !important;
}

@media (max-width: 768px) {
    .article {
        padding: 0;
        width: 100%;
    }

    .article__content {
        padding: 20px 14px !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
    }

    .article__title {
        font-size: 20px !important;
        padding: 0 10px;
    }

    .leaderboard-widget {
        grid-template-columns: 1fr;
        padding: 12px 8px;
        gap: 12px;
        border-radius: 8px;
        margin: 10px 0 20px;
    }

    .leaderboard-sidebar {
        flex-direction: row;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid var(--widget-border);
        padding: 2px 4px 10px;
        gap: 6px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .leaderboard-sidebar::-webkit-scrollbar {
        display: none;
    }

    .leaderboard-sidebar__title {
        display: none;
    }

    .leaderboard-nav-btn {
        flex: 0 0 auto;
        padding: 6px 12px;
        font-size: 12px;
        border-radius: 18px;
        background: var(--widget-bg);
        border: 1px solid var(--widget-border);
        color: var(--btn-color);
    }

    .leaderboard-nav-btn.active {
        background: var(--btn-active-bg) !important;
        color: var(--btn-active-color) !important;
        border-color: var(--btn-active-color) !important;
    }

    .leaderboard-content {
        max-height: 480px;
        overflow-y: auto;
        overflow-x: hidden;
        padding-right: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .analytics-table thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        background: var(--th-bg) !important;
        color: var(--th-color) !important;
        padding: 6px 8px;
        font-size: 11px;
    }

    .analytics-table td {
        padding: 7px 8px;
        font-size: 12.5px;
    }
}

/* Кнопка переключения темы — всегда видна */
.article-theme-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #1a1a1a;
    border: 2px solid #ffd605;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    font-size: 20px;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffd605;
}

.article-theme-btn:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .article-theme-btn {
        bottom: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 18px;
        z-index: 99999;
        position: fixed !important;
    }
}

/* Комментарии — переменные */
.comments__item {
    background: var(--comments-bg) !important;
    transition: background 0.3s ease;
}

.comments__item-name {
    color: var(--comments-text) !important;
}

.comments__item-text {
    color: var(--comments-text) !important;
}

.comments__item-date {
    color: var(--comments-date) !important;
}

.comments__title {
    color: var(--comments-text) !important;
}

.comments__empty {
    color: var(--comments-date) !important;
}

.comments__input,
.comments__textarea {
    background: var(--comments-input-bg) !important;
    border: 1px solid var(--comments-input-border) !important;
    color: var(--comments-input-text) !important;
}

.comments__btn {
    background: var(--comments-btn-bg) !important;
    color: var(--comments-btn-text) !important;
}

/* Комментарии — всегда светлые */
.comments__title {
    color: #ffffff !important;
}

.comments__empty {
    color: #ffffff !important;
}

/* Кнопка "Все новости" — всегда белая */
.article__back {
    color: #ffffff !important;
}

.article__back:hover {
    color: #ffd605 !important;
}

/* Картинки в новостях на мобильных */
@media (max-width: 768px) {
    .news__item-text img {
        max-width: 100%;
        height: auto !important;
        object-fit: contain;
    }
    
    .article__hero {
        width: 100%;
        height: auto !important;
        max-height: none !important;
        object-fit: contain;
    }
}

/* Картинки в статье — сохраняем пропорции */
.article img {
    height: auto !important;
    max-height: none !important;
    object-fit: contain;
}
