/* =====================================================
   News Page Styles - Cabal Ethereal (Standalone)
   ===================================================== */

/* ===== Page Layout ===== */
.news-page {
    min-height: 100vh;
    padding-top: 80px;
    padding-bottom: 30px;
    background: #0d0b0c;
}

/* ===== Page Header ===== */
.news-page-header {
    text-align: center;
    padding: 35px 20px 30px;
}

.news-page-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.news-page-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 300;
    margin: 0;
}

/* ===== Content Container ===== */
.news-content {
    padding: 0 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* ===== Filter Tabs ===== */
.news-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 22px;
}

.news-tab {
    padding: 9px 24px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.25s ease;
    position: relative;
}

.news-tab:first-child {
    border-radius: 6px 0 0 6px;
}

.news-tab:last-child {
    border-radius: 0 6px 6px 0;
}

.news-tab:not(:first-child) {
    border-left: none;
}

.news-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.news-tab.active {
    color: #fff;
    background: linear-gradient(135deg, #ec1b1b, #b91c1c);
    border-color: #ec1b1b;
    font-weight: 600;
    box-shadow: 0 3px 12px rgba(236, 27, 27, 0.3);
}

.news-tab.active + .news-tab {
    border-left: none;
}

/* ===== News List ===== */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.news-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.2s ease;
    gap: 12px;
}

.news-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateX(3px);
}

.news-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

/* Category Tags */
.news-category {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.cat-all,
.cat-event {
    background: rgba(100, 116, 139, 0.3);
    color: #94a3b8;
}

.cat-promotion {
    background: rgba(234, 179, 8, 0.2);
    color: #facc15;
}

.cat-news {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.cat-game {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.cat-rule {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
}

.cat-ban {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Title */
.news-title {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-item:hover .news-title {
    color: #fff;
}

/* Date */
.news-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ===== Empty State ===== */
.news-empty {
    text-align: center;
    padding: 50px 20px;
    color: rgba(255, 255, 255, 0.3);
}

.news-empty svg {
    margin-bottom: 12px;
    opacity: 0.3;
    width: 48px;
    height: 48px;
}

.news-empty p {
    font-size: 14px;
    margin: 0;
}

/* ===== Pagination ===== */
.news-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 28px;
    padding-bottom: 20px;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.page-link:hover:not(.active):not(.disabled):not(.dots) {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.page-link.active {
    color: #fff;
    background: linear-gradient(135deg, #ec1b1b, #b91c1c);
    border-color: #ec1b1b;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(236, 27, 27, 0.3);
}

.page-link.disabled {
    color: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
    pointer-events: none;
}

.page-link.dots {
    border: none;
    background: none;
    cursor: default;
    pointer-events: none;
    color: rgba(255, 255, 255, 0.3);
}

/* =====================================================
   News Detail Page
   ===================================================== */

/* Detail Container */
.news-detail-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px 40px;
}

/* Back Button */
.news-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    transition: color 0.2s ease;
    margin-bottom: 24px;
}

.news-back-btn:hover {
    color: #ec1b1b;
}

.news-back-btn svg {
    flex-shrink: 0;
}

.news-back-bottom {
    margin-top: 30px;
    margin-bottom: 0;
}

/* Article */
.news-article {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    overflow: hidden;
}

.news-article-header {
    padding: 28px 28px 20px;
}

.news-article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.news-article-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.news-article-title {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    line-height: 1.5;
    margin: 0;
}

.news-article-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 0 28px;
}

.news-article-body {
    padding: 24px 28px 32px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.42;
}

.news-article-body p {
    margin: 0;
}

.news-article-body p:last-child {
    margin-bottom: 0;
}

.news-article-body p > br:only-child {
    display: block;
    content: "";
    margin-top: 0.5em;
}

.news-article-body h1 {
    font-size: 2em;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.news-article-body h2 {
    font-size: 1.5em;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.news-article-body h3 {
    font-size: 1.17em;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.news-article-body ul,
.news-article-body ol {
    margin: 0 0 14px;
    padding-left: 20px;
}

.news-article-body li {
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.75);
}

.news-article-body strong {
    color: #fff;
    font-weight: 600;
}

.news-article-body img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 16px 0;
    display: block;
}

.news-article-body img:first-child {
    margin-top: 0;
}

.news-article-body a {
    color: #ec1b1b;
    text-decoration: none;
}

.news-article-body a:has(> img) {
    display: contents;
}

.news-article-body a:hover {
    text-decoration: underline;
}

/* Quill Editor Content Classes */
.news-article-body .ql-align-center {
    text-align: center;
}

.news-article-body .ql-align-center img {
    margin-left: auto;
    margin-right: auto;
}

.news-article-body .ql-align-right {
    text-align: right;
}

.news-article-body .ql-align-right img {
    margin-left: auto;
    margin-right: 0;
}

.news-article-body .ql-align-justify {
    text-align: justify;
}

.news-article-body .ql-indent-1 {
    padding-left: 3em;
}

.news-article-body .ql-indent-2 {
    padding-left: 6em;
}

.news-article-body .ql-indent-3 {
    padding-left: 9em;
}

.news-article-body .ql-size-small {
    font-size: 0.75em;
}

.news-article-body .ql-size-large {
    font-size: 1.5em;
}

.news-article-body .ql-size-huge {
    font-size: 2.5em;
}

/* ===== Table Styles ===== */
.news-article-body table.news-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.news-article-body table.news-table th,
.news-article-body table.news-table td {
    padding: 12px 16px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.news-article-body table.news-table thead th {
    background: rgba(236, 27, 27, 0.12);
    color: #ec1b1b;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.3px;
    border-bottom: 2px solid rgba(236, 27, 27, 0.3);
}

.news-article-body table.news-table tbody td {
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.8);
}

.news-article-body table.news-table tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.04);
}

.news-article-body table.news-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.07);
}

.news-article-body table.news-table img {
    max-width: 80px;
    max-height: 80px;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
    width: auto;
}

/* ===== Horizontal Rule ===== */
.news-article-body hr {
    border: none;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    margin: 24px 0;
}

/* ===== Blockquote ===== */
.news-article-body blockquote {
    border-left: 4px solid #ec1b1b;
    margin: 16px 0;
    padding: 12px 20px;
    background: rgba(236, 27, 27, 0.05);
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    border-radius: 0 8px 8px 0;
}

/* ===== Video Embed ===== */
.news-article-body iframe,
.news-article-body .ql-video {
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
    border-radius: 8px;
    margin: 20px auto;
    background: #000;
}

/* ===== Blacklist Search Box ===== */
.blacklist-search-box {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.blacklist-search-inner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.blacklist-search-icon {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.4);
}

.blacklist-search-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    padding: 9px 14px;
    font-size: 13px;
    color: #fff;
    font-family: 'Prompt', sans-serif;
    outline: none;
    transition: border-color 0.2s ease;
}

.blacklist-search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.blacklist-search-input:focus {
    border-color: rgba(239, 68, 68, 0.5);
}

.blacklist-search-btn {
    flex-shrink: 0;
    padding: 9px 20px;
    background: linear-gradient(135deg, #ec1b1b, #b91c1c);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Prompt', sans-serif;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.blacklist-search-btn:hover {
    opacity: 0.85;
}

.blacklist-clear-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 9px 14px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    font-size: 13px;
    font-family: 'Prompt', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.blacklist-clear-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.blacklist-search-result {
    font-size: 12px;
    margin-top: 10px;
    min-height: 0;
}

.blacklist-search-result:empty {
    margin-top: 0;
}

.blacklist-search-result.found {
    color: #4ade80;
}

.blacklist-search-result.not-found {
    color: #f87171;
}

/* Highlight */
.blacklist-highlight {
    background: rgba(239, 68, 68, 0.4);
    color: #fff;
    padding: 1px 3px;
    border-radius: 2px;
    font-style: inherit;
}

/* Not Found State */
.news-not-found {
    text-align: center;
    padding: 80px 20px;
    color: rgba(255, 255, 255, 0.3);
}

.news-not-found svg {
    margin-bottom: 16px;
    opacity: 0.3;
}

.news-not-found h2 {
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 8px;
}

.news-not-found p {
    font-size: 13px;
    margin: 0 0 24px;
}

.news-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #ec1b1b, #b91c1c);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.news-back-link:hover {
    opacity: 0.9;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .news-page {
        padding-top: 65px;
    }

    .news-page-header {
        padding: 25px 15px 20px;
    }

    .news-page-title {
        font-size: 20px;
    }

    .news-page-subtitle {
        font-size: 12px;
    }

    .news-content {
        padding: 0 8px;
    }

    .news-tab {
        padding: 8px 16px;
        font-size: 12px;
    }

    .news-item {
        padding: 11px 12px;
        gap: 8px;
    }

    .news-category {
        min-width: 62px;
        padding: 4px 8px;
        font-size: 9px;
    }

    .news-title {
        font-size: 12px;
    }

    .news-date {
        font-size: 11px;
    }

    .blacklist-search-box {
        padding: 12px;
    }

    .blacklist-search-inner {
        flex-wrap: wrap;
    }

    .blacklist-search-icon {
        display: none;
    }

    .blacklist-search-input {
        flex: 1;
        min-width: 0;
    }

    .news-detail-container {
        padding: 20px 12px 30px;
    }

    .news-article-header {
        padding: 20px 18px 16px;
    }

    .news-article-title {
        font-size: 17px;
    }

    .news-article-divider {
        margin: 0 18px;
    }

    .news-article-body {
        padding: 18px 18px 24px;
        font-size: 13px;
    }

    .news-article-body table.news-table {
        font-size: 12px;
    }

    .news-article-body table.news-table th,
    .news-article-body table.news-table td {
        padding: 8px 10px;
    }

    .news-article-body table.news-table img {
        max-width: 60px;
        max-height: 60px;
    }
}

@media (max-width: 480px) {
    .news-page-header {
        padding: 20px 10px 15px;
    }

    .news-page-title {
        font-size: 18px;
    }

    .news-tab {
        padding: 7px 10px;
        font-size: 11px;
    }

    .news-item {
        padding: 10px 12px;
        gap: 8px;
    }

    .news-item-left {
        gap: 8px;
    }

    .news-category {
        min-width: 56px;
        padding: 3px 7px;
        font-size: 9px;
    }

    .news-date {
        font-size: 10px;
    }

    .page-link {
        min-width: 28px;
        height: 28px;
        font-size: 11px;
    }

    .news-page {
        padding-bottom: 70px;
    }

    .news-detail-container {
        padding: 15px 8px 25px;
    }

    .news-article-header {
        padding: 18px 14px 14px;
    }

    .news-article-title {
        font-size: 16px;
    }

    .news-article-divider {
        margin: 0 14px;
    }

    .news-article-body {
        padding: 16px 14px 20px;
    }

    .news-article-body h3 {
        font-size: 14px;
    }

    .news-article-body table.news-table {
        font-size: 11px;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .news-article-body table.news-table th,
    .news-article-body table.news-table td {
        padding: 6px 8px;
        white-space: nowrap;
    }

    .news-article-body table.news-table img {
        max-width: 50px;
        max-height: 50px;
    }
}
