/* Seeworld · 海外媒体日报 — PC 端样式 */
:root {
    --bg: #f5f5f0;
    --surface: #ffffff;
    --text: #1a1a1a;
    --text-secondary: #666;
    --border: #e0ddd5;
    --accent: #c0392b;
    --accent-light: #fdf2f0;
    --tag-bg: #f0ede8;
    --shadow: 0 1px 3px rgba(0,0,0,0.06);
}

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

body {
    font-family: -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 15px;
}

/* Header */
.header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
}
.tagline {
    font-size: 14px;
    color: var(--text-secondary);
}
.nav-date {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}
.btn-nav {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 14px;
    cursor: pointer;
    color: var(--text);
    transition: all 0.15s;
}
.btn-nav:hover { background: var(--tag-bg); }
.btn-nav:disabled { opacity: 0.3; cursor: not-allowed; }
.date-display {
    font-size: 16px;
    font-weight: 600;
    min-width: 120px;
    text-align: center;
}

/* Container */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px;
}

/* Meta bar */
.meta-bar {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

/* Events */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.loading {
    text-align: center;
    padding: 60px 0;
    color: var(--text-secondary);
    font-size: 16px;
}

/* Event card */
.event-card {
    background: var(--surface);
    border-radius: 10px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: border-color 0.15s;
}
.event-card:hover {
    border-color: #ccc;
}

.event-banner {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
    background: #e8e5dd;
}
.event-banner::before {
    /* 图片加载失败时的占位 */
    content: '';
    display: none;
}
.event-banner[src=""] {
    display: none;
}
.event-banner-placeholder,
.event-banner-fallback {
    display: none;
}

.event-body {
    padding: 20px 24px 24px;
}

.event-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.stars {
    font-size: 15px;
    letter-spacing: 2px;
    color: #e6b800;
}
.stars[data-score="5"] { color: #c0392b; }
.stars[data-score="4"] { color: #e67e22; }
.stars[data-score="3"] { color: #f1c40f; }
.stars[data-score="2"] { color: #95a5a6; }
.stars[data-score="1"] { color: #bdc3c7; }

.event-articles-count {
    font-size: 12px;
    color: var(--text-secondary);
}

.event-index {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.event-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.event-summary {
    font-size: 15px;
    color: #333;
    line-height: 1.8;
    margin-bottom: 16px;
    padding: 16px 20px;
    background: #fafaf7;
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}

/* Articles list */
.articles-list {
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.article-item {
    padding: 10px 0;
    border-bottom: 1px solid #f0eee8;
}
.article-item:last-child { border-bottom: none; }

.article-source {
    font-size: 12px;
    color: var(--accent);
    font-weight: 600;
    display: inline-block;
    margin-bottom: 4px;
}
.article-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}
.article-title a {
    color: var(--text);
    text-decoration: none;
}
.article-title a:hover {
    color: var(--accent);
    text-decoration: underline;
}
.article-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    padding: 2px 0;
}
.article-toggle:hover { color: var(--accent); }

.article-translation {
    display: none;
    margin-top: 8px;
    padding: 12px 16px;
    background: var(--accent-light);
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.8;
    color: #333;
    max-height: 400px;
    overflow-y: auto;
}
.article-translation.open {
    display: block;
}

/* 文章阅读弹窗 */
#articleModal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    overflow-y: auto;
}
#articleModal.open {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 780px;
    width: 100%;
    margin: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px 32px 0;
}
.modal-source {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.5px;
}
.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
    line-height: 1;
    transition: all 0.15s;
}
.modal-close:hover {
    color: #333;
    background: #f5f5f0;
}

.modal-title {
    padding: 12px 32px 20px;
    border-bottom: 1px solid var(--border);
}
.modal-title-cn {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.5;
    margin-bottom: 6px;
}
.modal-title-en {
    font-size: 13px;
    color: #888;
    line-height: 1.5;
    font-weight: 400;
}

.modal-body {
    padding: 28px 32px 36px;
    font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", "Songti SC", Georgia, serif;
    font-size: 17px;
    line-height: 2;
    color: #1a1a1a;
    max-height: 62vh;
    overflow-y: auto;
}
.modal-body p {
    margin-bottom: 1.6em;
    text-align: justify;
    text-indent: 2em;
    word-spacing: 0.05em;
    letter-spacing: 0.01em;
}
.modal-body p:last-child {
    margin-bottom: 0;
}
.modal-body .modal-empty {
    text-align: center;
    color: #999;
    text-indent: 0;
    padding: 40px 0;
}

/* 移动端弹窗适配 */
@media (max-width: 640px) {
    .modal-content {
        border-radius: 0;
        max-width: 100%;
        min-height: 100vh;
    }
    .modal-header {
        padding: 20px 20px 0;
    }
    .modal-title {
        padding: 10px 20px 16px;
    }
    .modal-body {
        padding: 20px 20px 30px;
        font-size: 16px;
        line-height: 1.9;
        max-height: none;
    }
    .modal-body p {
        text-indent: 2em;
    }
    #articleModal {
        padding: 0;
        align-items: stretch;
    }
}

/* 文章标题区 */
.article-title-link {
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s;
}
.article-title-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.article-read-btn {
    display: inline-block;
    font-size: 12px;
    color: var(--accent);
    cursor: pointer;
    padding: 3px 12px;
    border: 1px solid var(--accent);
    border-radius: 4px;
    transition: all 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.article-read-btn:hover {
    background: var(--accent);
    color: #fff;
}

.article-origin-link {
    font-size: 14px;
    color: #999;
    text-decoration: none;
    margin-left: 6px;
    transition: color 0.15s;
}
.article-origin-link:hover {
    color: var(--accent);
}

/* 全文预览区（有译文时显示） */
.article-fulltext-preview {
    margin-top: 8px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.article-fulltext-preview-text {
    font-size: 13px;
    color: #666;
    line-height: 1.7;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Footer */
.footer {
    max-width: 960px;
    margin: 40px auto;
    padding: 0 24px 24px;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.8;
}
