body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    background-color: #f8f9fa;
    color: #343a40;
}
header, footer {
    background-color: #003366;
    color: white;
    text-align: center;
    padding: 1rem;
}
header h1 { margin: 0; font-size: 1.8rem; }
header p { margin: 0.2rem 0 0; opacity: 0.9; }
footer a { color: #87ceeb; text-decoration: none; }
footer a:hover { text-decoration: underline; }

nav {
    display: flex;
    justify-content: center;
    background-color: #fff;
    padding: 0.75rem;
    border-bottom: 1px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.nav-button {
    background-color: transparent;
    border: 1px solid #004a99;
    color: #004a99;
    padding: 0.5rem 1.2rem;
    margin: 0 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 20px;
    transition: all 0.2s ease-in-out;
}
.nav-button:hover {
    background-color: #e9ecef;
}
.nav-button.active {
    background-color: #004a99;
    color: white;
    border-color: #004a99;
}
main {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}
.loader, .error-message {
    text-align: center;
    font-size: 1.2rem;
    color: #6c757d;
    padding: 3rem;
}
#journal-info {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
    text-align: center;
}
#journal-info h2 { font-size: 2rem; margin-bottom: 0.5rem; }
#journal-info .issue-title { font-size: 1.2rem; color: #495057; display: block; }
#journal-info .update-time { font-size: 0.9rem; color: #adb5bd; display: block; margin-top: 0.5rem; }

.article-card {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.08);
}
.article-card h3 { margin-top: 0; font-size: 1.3rem; }
.article-card .title-cn { color: #005a9c; font-weight: bold; margin: 0.5rem 0; font-size: 1.2rem; }
.article-card .authors { font-style: italic; color: #6c757d; margin-bottom: 1rem; }
.article-card .link { display: inline-block; margin-bottom: 1rem; color: #007bff; text-decoration: none; font-weight: 500; }
.article-card .link:hover { text-decoration: underline; }

/* 摘要部分的样式调整 */
.article-card details {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-top: 1rem;
    padding: 0; /* 移除外层padding */
}
.article-card summary {
    cursor: pointer;
    font-weight: bold;
    outline: none;
    padding: 0.75rem 1rem; /* 为标题行添加内边距 */
    display: block;
}
.article-card .abstract-content {
    padding: 0 1rem 1rem 1rem; /* 为摘要内容添加内边距 */
    border-top: 1px solid #e9ecef;
    margin-top: 0.5rem;
}
.article-card .abstract-content h4 {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: #495057;
}
.article-card .abstract-content p {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.7;
    white-space: pre-wrap;
}
.article-card hr {
    border: none;
    border-top: 1px dashed #ced4da;
    margin: 1rem 0;
}


/* --- 移动端响应式调整 --- */
/* 当屏幕宽度小于 768px 时应用以下样式 */
@media (max-width: 768px) {

    /* 1. 调整主要内容区域的边距 */
    main {
        margin: 1.5rem auto; /* 减小上下外边距，让内容离头部更近 */
        padding: 0 1rem;     /* 左右内边距保持不变，确保内容不贴边 */
    }

    /* 2. 调整头部信息区域的字体和间距 */
    #journal-info {
        margin-bottom: 1.5rem; /* 减小与下方内容的间距 */
    }
    #journal-info h2 {
        font-size: 1.6rem;   /* 从 2rem 减小，更适合移动端标题 */
    }
    #journal-info .issue-title {
        font-size: 1.1rem;   /* 从 1.2rem 减小 */
    }
    
    /* 3. 优化粘性导航栏按钮，使其更紧凑 */
    .nav-button {
        padding: 0.4rem 1rem; /* 减小水平内边距 */
        margin: 0 0.25rem;    /* 减小按钮间距 */
        font-size: 0.9rem;    /* 适当减小字体 */
    }

    /* 4. [核心] 调整文章卡片的样式，这是优化的关键 */
    .article-card {
        /* 减小内外边距，让卡片更紧凑，显示更多内容 */
        padding: 1.2rem 1.2rem; /* 从 1.5rem 2rem 大幅减小，特别是左右 */
        margin-bottom: 1rem;    /* 从 1.5rem 减小 */
        border-radius: 6px;     /* 略微减小圆角，视觉上更协调 */
    }

    /* 5. 调整卡片内部元素的字体大小 */
    .article-card h3 {
        font-size: 1.15rem; /* 从 1.3rem 减小 */
    }
    .article-card .title-cn {
        font-size: 1.1rem;  /* 从 1.2rem 减小 */
        line-height: 1.4;   /* 增加行高，改善中文标题的可读性 */
    }
    .article-card .authors {
        font-size: 0.9rem;  /* 减小作者字体大小 */
        margin-bottom: 0.75rem;
    }

    /* 6. 优化摘要部分的内边距 */
    .article-card summary {
        padding: 0.6rem 0.8rem; /* 减小摘要标题的内边距 */
    }
    .article-card .abstract-content {
        padding: 0 0.8rem 0.8rem 0.8rem; /* 减小摘要内容的内边距 */
    }
    .article-card .abstract-content p {
        font-size: 0.9rem; /* 减小摘要正文字体，保持与作者一致 */
    }
}
