/* 基本样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333333;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* 导航栏样式 */
header {
    background-color: #4a90e2;
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 60px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    list-style-type: none;
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

/* 主要内容区样式 */
main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    padding-top: 80px; /* 为顶栏留出空间 */
    padding-bottom: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.content-wrapper {
    display: flex;
    gap: 2rem;
}

.content {
    flex: 2;
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow-y: auto;
    max-height: 500px;
}

.sidebar {
    flex: 1;
}

/* AI聊天窗口样式 */
#ai-chat {
    background-color: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    height: 500px;
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.chat-input {
    display: flex;
}

#user-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
}

#send-button {
    padding: 10px 15px;
    background-color: #4a90e2;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
}

/* 底部样式 */
footer {
    background-color: #333333;
    color: white;
    text-align: center;
    padding: 1rem 0;
    flex-shrink: 0;
}

.social-icons a {
    color: white;
    margin: 0 10px;
    font-size: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    main {
        flex-direction: column;
    }

    .content, .sidebar {
        width: 100%;
    }

    nav {
        flex-direction: column;
        align-items: flex-start;
    }

    nav ul {
        margin-top: 1rem;
    }

    nav ul li {
        margin-left: 0;
        margin-right: 20px;
    }
}

/* 通用样式 */
h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #4a90e2;
    font-size: 1.5rem; /* 减小标题字体大小 */
}

p {
    margin-bottom: 1rem;
    font-size: 0.9rem; /* 减小正文字体大小 */
    line-height: 1.4; /* 调整行高 */
}

/* 在文件末尾添加以下样式 */

/* 重要链接按钮样式 */
.link-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1rem;
}

.link-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #4a90e2;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.link-button:hover {
    background-color: #3a7bc8;
}

#articles {
    margin-bottom: 2rem;
}

#article-list article {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

#article-list h3 {
    color: #4a90e2;
    margin-bottom: 0.5rem;
}

#article-list .article-preview,
#article-list .full-content {
    line-height: 1.6;
    margin-bottom: 1rem;
}

#article-list .read-more {
    color: #4a90e2;
    text-decoration: none;
    font-weight: bold;
}

#article-list .read-more:hover {
    text-decoration: underline;
}

.read-more {
    display: inline-block;
    color: #007bff;
    text-decoration: none;
}

.read-more:hover {
    text-decoration: underline;
}
