/* 复古风格全局样式 */
:root {
    --primary-color: #d35400;
    --secondary-color: #e67e22;
    --dark-color: #2c3e50;
    --light-color: #f9f7e8;
    --accent-color: #8e44ad;
    --paper-color: #f5e7cb;
    --ink-color: #3a3226;
    --shadow-color: rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'Typewriter';
    src: url('assets/typewriter.ttf') format('truetype');
}

body {
    background-color: var(--paper-color);
    background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h100v100H0z" fill="none"/><path d="M20 20h60v60H20z" stroke="%23d4c9a5" stroke-width="1" fill="none"/></svg>');
    color: var(--ink-color);
    font-family: 'Typewriter', Courier, monospace;
    line-height: 1.6;
    letter-spacing: 0.5px;
}

a {
    text-decoration: none;
    color: var(--dark-color);
    transition: all 0.3s ease;
    border-bottom: 1px dotted var(--primary-color);
}

a:hover {
    color: var(--primary-color);
    border-bottom-style: solid;
}

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 复古头部样式 */
header {
    background-color: var(--light-color);
    padding: 20px 0;
    border-bottom: 3px double var(--primary-color);
    position: relative;
}

header::before, header::after {
    content: "";
    position: absolute;
    height: 10px;
    width: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg width="20" height="10" viewBox="0 0 20 10" xmlns="http://www.w3.org/2000/svg"><path d="M0 5 Q10 0 20 5 Q30 10 40 5 Q50 0 60 5" stroke="%23d35400" fill="none" stroke-width="1"/></svg>');
    background-repeat: repeat-x;
    left: 0;
}

header::before {
    top: -5px;
}

header::after {
    bottom: -8px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 2px 2px 0 var(--shadow-color);
    font-family: 'Typewriter', Courier, monospace;
    letter-spacing: 2px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
}

nav ul li a {
    padding: 5px 10px;
    border: 1px dotted var(--primary-color);
    border-radius: 3px;
    font-size: 16px;
}

nav ul li a:hover {
    background-color: var(--primary-color);
    color: var(--light-color);
    border-style: solid;
}

/* 复古主要内容区域 */
.main-content {
    background-color: var(--light-color);
    padding: 30px;
    margin: 30px 0;
    border: 1px solid var(--primary-color);
    box-shadow: 5px 5px 0 var(--shadow-color);
    position: relative;
}

.main-content::after {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    right: -5px;
    bottom: -5px;
    border: 1px solid var(--primary-color);
    z-index: -1;
}

.section-title {
    font-size: 24px;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px dotted var(--primary-color);
    color: var(--dark-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.section-title::after {
    content: "//";
    position: absolute;
    right: 0;
    color: var(--secondary-color);
}

/* 复古文章列表 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.article-card {
    background-color: var(--paper-color);
    border: 1px solid var(--primary-color);
    padding: 15px;
    position: relative;
    transition: all 0.3s ease;
}

.article-card::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    right: -5px;
    bottom: -5px;
    border: 1px solid var(--primary-color);
    z-index: -1;
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 3px 3px 0 var(--shadow-color);
}

.article-card:hover::before {
    transform: translate(3px, 3px);
}

.card-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border: 1px solid var(--primary-color);
    margin-bottom: 15px;
    filter: sepia(0.5) contrast(1.1);
}

.card-title {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: bold;
    line-height: 1.3;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--dark-color);
    margin-top: 15px;
    border-top: 1px dotted var(--primary-color);
    padding-top: 10px;
}

/* 复古分类标签 */
.category-tag {
    display: inline-block;
    padding: 2px 8px;
    background-color: var(--primary-color);
    color: var(--light-color);
    font-size: 12px;
    margin-bottom: 10px;
    border-radius: 2px;
}

/* 复古文章详情页 */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 2px dotted var(--primary-color);
    padding-bottom: 20px;
}

.article-title {
    font-size: 32px;
    margin-bottom: 15px;
    color: var(--dark-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 16px;
    color: var(--dark-color);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.article-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border: 3px double var(--primary-color);
    margin: 20px 0;
    filter: sepia(0.3) contrast(1.1);
}

.article-content {
    line-height: 1.8;
    font-size: 18px;
}

.article-content p {
    margin-bottom: 20px;
    text-align: justify;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--primary-color);
    margin: 20px auto;
    display: block;
    filter: sepia(0.4);
}

/* 复古分页导航 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.pagination a {
    padding: 8px 20px;
    border: 1px solid var(--primary-color);
    font-size: 16px;
    position: relative;
    overflow: hidden;
}

.pagination a:hover {
    background-color: var(--primary-color);
    color: var(--light-color);
}

.pagination a::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.5s;
}

.pagination a:hover::before {
    left: 100%;
}

/* 复古友情链接 */
.friend-links {
    background-color: var(--light-color);
    padding: 25px;
    margin: 30px 0;
    border: 1px solid var(--primary-color);
    position: relative;
}

.friend-links::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    right: -3px;
    bottom: -3px;
    border: 1px solid var(--primary-color);
    z-index: -1;
}

.friend-links h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.friend-links-container a {
    padding: 5px 15px;
    border: 1px solid var(--primary-color);
    font-size: 14px;
    transition: all 0.3s;
}

.friend-links-container a:hover {
    background-color: var(--primary-color);
    color: var(--light-color);
    transform: translateY(-3px);
}

/* 复古页脚样式 */
footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
    border-top: 3px double var(--primary-color);
    position: relative;
}

footer::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 5px;
    background-image: url('data:image/svg+xml;utf8,<svg width="20" height="5" viewBox="0 0 20 5" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="2.5" r="2" fill="%23d35400"/></svg>');
    background-repeat: repeat-x;
}

.copyright {
    font-size: 16px;
    letter-spacing: 1px;
}

/* 打字机动画效果 */
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

.typewriter-text {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    nav ul {
        justify-content: center;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 26px;
    }
    
    .article-meta {
        gap: 10px;
    }
}