/* =========================================================
   Chamber War – News Article & Comments (Public + Portal)
   ========================================================= */

/* ---------- Public page wrapper ---------- */
.section--article {
    padding-bottom: 80px;
    background: linear-gradient(180deg, var(--stone-dark) 0%, var(--stone) 40%, var(--stone-dark) 100%);
}

.container--article {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding-inline: clamp(20px, 3vw, 40px);
}

.news-article-layout {
    width: 100%;
}

/* ---------- Back link ---------- */
.news-page-back {
    text-align: left;
    margin: 0 0 24px;
}

.news-page-back a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    color: var(--teal);
    text-decoration: none;
    font-size: 0.85rem;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.news-page-back a:hover {
    border-color: rgba(61, 214, 200, 0.35);
    color: #fff;
}

/* ---------- Article card ---------- */
.news-article {
    position: relative;
    padding: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.news-article::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, var(--teal), var(--copper), var(--teal));
}

.news-article__header {
    padding: 32px clamp(24px, 4vw, 52px) 28px;
    border-bottom: 1px solid var(--border);
}

.news-article__meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-bottom: 18px;
}

.news-article__date {
    font-size: 0.84rem;
    white-space: nowrap;
}

.news-article__comment-link {
    font-size: 0.84rem;
    text-decoration: none;
    margin-left: auto;
    padding: 3px 10px;
    border: 1px solid var(--border);
}

.news-article__comment-link:hover {
    color: var(--teal);
    border-color: rgba(61, 214, 200, 0.35);
    text-decoration: none;
}

.news-article__title {
    margin: 0 0 12px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: clamp(1.5rem, 2.8vw, 2.15rem);
    line-height: 1.3;
    color: #fff;
    letter-spacing: -0.01em;
}

.news-article__lead {
    margin: 0;
    padding-top: 14px;
    border-top: 1px solid rgba(200, 121, 65, 0.15);
    font-size: 1.08rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.news-article__author-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px clamp(24px, 4vw, 52px);
    background: rgba(0, 0, 0, 0.22);
    border-bottom: 1px solid var(--border);
}

.news-article__author {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.news-article__author-avatar {
    width: 48px;
    height: 48px;
}

.news-article__author-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.news-article__author-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
}

.news-article__author-name {
    font-size: 0.98rem;
    color: #fff;
}

.news-article__divider {
    height: 1px;
    margin: 0 clamp(24px, 4vw, 52px);
    background: linear-gradient(90deg, transparent, rgba(61, 214, 200, 0.35), transparent);
}

.news-article__body {
    padding: 36px clamp(24px, 4vw, 52px) 48px;
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

.news-article__body > *:first-child {
    margin-top: 0;
}

.news-article__body > *:last-child {
    margin-bottom: 0;
}

.news-article__body p {
    margin: 0 0 1.35rem;
}

.news-article__body h2,
.news-article__body h3,
.news-article__body h4 {
    margin: 0 0 0.85rem;
    color: #fff;
    line-height: 1.4;
}

.news-article__body h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 0;
    margin-bottom: 0.85rem;
    padding-top: 0;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-top: none;
}

.news-article__body h2 ~ h2 {
    margin-top: 2.25rem;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(200, 121, 65, 0.22);
}

.news-article__body h2::before {
    content: '';
    width: 3px;
    height: 1.1em;
    background: var(--teal);
    flex-shrink: 0;
}

.news-article__body h3 {
    margin-top: 1.75rem;
    font-size: 1.1rem;
    color: var(--teal);
}

.news-article__body h4 {
    margin-top: 1.5rem;
    font-size: 1rem;
}

.news-article__body ul,
.news-article__body ol {
    margin: 0 0 1.35rem;
    padding-left: 1.5rem;
}

.news-article__body li {
    margin-bottom: 0.45rem;
}

.news-article__body li::marker {
    color: var(--teal);
}

.news-article__body blockquote {
    margin: 1.5rem 0;
    padding: 16px 20px;
    border-left: 3px solid rgba(61, 214, 200, 0.45);
    background: rgba(61, 214, 200, 0.05);
    color: var(--text-muted);
    font-style: italic;
}

.news-article__body a {
    color: var(--teal);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.news-article__body a:hover {
    color: #fff;
}

.news-article__body img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.75rem auto;
    border: 1px solid var(--border);
}

.news-article__body pre,
.news-article__body code {
    font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.9em;
}

.news-article__body pre {
    margin: 1.5rem 0;
    padding: 16px 18px;
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border);
}

.news-article__body code {
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
}

.news-article__body pre code {
    padding: 0;
    background: none;
    border: none;
}

.news-article__body hr {
    margin: 2.25rem 0;
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.news-article__body strong {
    color: #fff;
    font-weight: 600;
}

/* ---------- Section divider ---------- */
.news-section-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 40px 0 28px;
}

.news-section-divider__line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(200, 121, 65, 0.35), transparent);
}

.news-section-divider__label {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
    white-space: nowrap;
}

/* ---------- Comments ---------- */
.news-comments {
    padding: 28px clamp(24px, 4vw, 48px) 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.news-comments__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.news-comments__head h2 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
}

.news-comments__count {
    font-size: 0.85rem;
}

.news-comments__login-hint {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    margin-bottom: 24px;
    background: rgba(61, 214, 200, 0.06);
    border: 1px solid rgba(61, 214, 200, 0.2);
    border-left: 3px solid var(--teal);
}

.news-comments__login-hint-text strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.92rem;
    color: #fff;
}

.news-comments__login-hint-text p {
    margin: 0;
    font-size: 0.88rem;
}

.news-comment-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    padding: 18px 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-left: 3px solid var(--teal);
}

.news-comment-form__label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
}

.news-comment-form textarea,
.news-comment__reply-form textarea {
    width: 100%;
    min-height: 110px;
    resize: vertical;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.55;
}

.news-comments__list {
    padding-top: 4px;
    border-top: 1px solid rgba(200, 121, 65, 0.15);
}

.news-comments__empty {
    margin: 0;
    text-align: center;
    padding: 18px 0 6px;
    border-top: 1px solid rgba(200, 121, 65, 0.15);
}

.news-comment-tree {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
}

.news-comment {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--border);
    border-left: 2px solid rgba(61, 214, 200, 0.25);
}

.news-comment--depth-2 {
    margin-left: 24px;
    border-left-color: rgba(200, 121, 65, 0.35);
}

.news-comment--depth-3 {
    margin-left: 48px;
    border-left-color: rgba(200, 121, 65, 0.2);
}

.news-comment__body {
    flex: 1;
    min-width: 0;
}

.news-comment__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.news-comment__head strong {
    color: #fff;
    font-size: 0.92rem;
}

.news-comment__time {
    font-size: 0.78rem;
    margin-left: auto;
}

.news-comment__badge {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.news-comment__badge--admin {
    background: rgba(217, 119, 87, 0.2);
    color: #f0a080;
}

.news-comment__badge--user {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.news-comment__text {
    line-height: 1.6;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.88);
    word-break: break-word;
}

.news-comment__reply-form {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ---------- Whitelist portal: use full content width ---------- */
.player-page--article {
    max-width: none;
    width: 100%;
    gap: 20px;
}

.player-page--article .news-article-layout {
    width: 100%;
    max-width: none;
}

.player-page .news-list {
    max-width: none;
    width: 100%;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .news-article__author-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .news-article__comment-link {
        margin-left: 0;
    }

    .news-comments__login-hint,
    .news-comment-form {
        flex-direction: column;
        align-items: stretch;
    }

    .news-comment--depth-2 {
        margin-left: 14px;
    }

    .news-comment--depth-3 {
        margin-left: 28px;
    }
}
