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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* 容器样式 */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

header h1 {
    font-size: 1.8rem;
    color: #4a6fa5;
}

header nav a {
    color: #4a6fa5;
    text-decoration: none;
    margin-left: 20px;
    font-weight: 500;
    transition: color 0.3s;
}

header nav a:hover {
    color: #166088;
}

/* 主内容区样式 */
main {
    padding: 40px 0;
}

/* 文章卡片样式 */
article {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 30px;
    margin-bottom: 30px;
    transition: transform 0.3s, box-shadow 0.3s;
}

article:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

article h2 {
    color: #4a6fa5;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

article .meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

article .excerpt {
    margin-bottom: 20px;
    color: #555;
}

article a {
    color: #4a6fa5;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

article a:hover {
    color: #166088;
    text-decoration: underline;
}

/* 文章详情页样式 */
.article-content {
    margin-bottom: 40px;
    line-height: 1.8;
}

.article-content h2, .article-content h3 {
    margin: 25px 0 15px;
    color: #4a6fa5;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

/* 文章导航样式 */
.article-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.article-nav a {
    display: flex;
    align-items: center;
    color: #4a6fa5;
    text-decoration: none;
    transition: color 0.3s;
}

.article-nav a:hover {
    color: #166088;
}

.article-nav .prev::before {
    content: '← ';
    margin-right: 5px;
}

.article-nav .next::after {
    content: ' →';
    margin-left: 5px;
}

/* 跳转按钮样式 */
.jump-button {
    display: inline-block;
    background-color: #4a6fa5;
    color: white;
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s, transform 0.3s;
    margin-top: 20px;
    cursor: pointer;
}

.jump-button:hover {
    background-color: #166088;
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

/* 弹窗样式 */
.modal {
    display: none; /* 默认隐藏 */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* 半透明背景 */
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideIn 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    color: #4a6fa5;
    margin: 0;
    font-size: 1.3rem;
}

.modal-body {
    margin-bottom: 25px;
    line-height: 1.6;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}

.modal-button.primary {
    background-color: #4a6fa5;
    color: white;
}

.modal-button.primary:hover {
    background-color: #166088;
}

.modal-button.secondary {
    background-color: #e9ecef;
    color: #333;
}

.modal-button.secondary:hover {
    background-color: #dee2e6;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 15px;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
}

/* 弹窗动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 表单样式 */
form {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 30px;
}

form div {
    margin-bottom: 20px;
}

form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

form input[type="text"],
form input[type="url"],
form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

form input[type="text"]:focus,
form input[type="url"]:focus,
form textarea:focus {
    outline: none;
    border-color: #4a6fa5;
}

form textarea {
    min-height: 200px;
    resize: vertical;
}

form button {
    background-color: #4a6fa5;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

form button:hover {
    background-color: #166088;
}

/* 页脚样式 */
footer {
    background-color: #4a6fa5;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        padding: 15px;
    }
    
    header nav {
        margin-top: 15px;
    }
    
    header nav a {
        margin: 0 10px;
    }
    
    main {
        padding: 20px 0;
    }
    
    article {
        padding: 20px;
    }
    
    .article-nav {
        flex-direction: column;
    }
    
    .article-nav a {
        margin-bottom: 10px;
    }
}