* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: "Microsoft YaHei", sans-serif;
line-height: 1.6;
color: #333;
background: #f5f5f5;
}
a {
color: #2d8cf0;
text-decoration: none;
transition: 0.3s;
}
a:hover {
color: #1976d2;
}
img {
max-width: 100%;
height: auto;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 15px;
} .header {
background: #fff;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
padding: 15px 0;
position: sticky;
top: 0;
z-index: 99;
}
.logo {
font-size: 24px;
font-weight: bold;
}
.site-desc {
color: #666;
font-size: 14px;
margin-top: 5px;
}
.nav {
margin-top: 15px;
}
.nav ul {
list-style: none;
display: flex;
flex-wrap: wrap;
gap: 20px;
}
.nav a {
color: #333;
font-weight: 500;
} .main {
display: flex;
flex-wrap: wrap;
gap: 30px;
margin: 30px 0;
}
.content {
flex: 1;
min-width: 300px;
}
.sidebar {
width: 300px;
min-width: 300px;
} .post-card {
background: #fff;
border-radius: 8px;
padding: 20px;
margin-bottom: 20px;
box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.post-title {
font-size: 20px;
margin-bottom: 10px;
}
.post-meta {
color: #999;
font-size: 13px;
margin-bottom: 15px;
}
.post-excerpt {
color: #555;
margin-bottom: 15px;
}
.read-more {
display: inline-block;
padding: 6px 15px;
background: #2d8cf0;
color: #fff;
border-radius: 4px;
font-size: 14px;
} .single-post {
background: #fff;
padding: 30px;
border-radius: 8px;
}
.single-title {
font-size: 26px;
margin-bottom: 15px;
}
.post-content {
margin: 25px 0;
line-height: 1.8;
font-size: 16px;
}
.post-content p {
margin-bottom: 18px;
}
.post-nav {
display: flex;
justify-content: space-between;
margin: 30px 0;
padding: 20px;
background: #f9f9f9;
border-radius: 8px;
}
.related-posts {
margin: 40px 0;
}
.related-title {
font-size: 18px;
margin-bottom: 15px;
padding-bottom: 10px;
border-bottom: 2px solid #2d8cf0;
} .widget {
background: #fff;
padding: 20px;
border-radius: 8px;
margin-bottom: 20px;
}
.widget-title {
font-size: 16px;
margin-bottom: 15px;
padding-bottom: 8px;
border-bottom: 1px solid #eee;
}
.widget ul {
list-style: none;
}
.widget li {
padding: 8px 0;
border-bottom: 1px dashed #eee;
}
.search-form {
display: flex;
gap: 10px;
}
.search-form input {
flex: 1;
padding: 8px 10px;
border: 1px solid #eee;
border-radius: 4px;
}
.search-form button {
padding: 8px 15px;
background: #2d8cf0;
color: #fff;
border: none;
border-radius: 4px;
cursor: pointer;
} .pagination {
text-align: center;
margin: 30px 0;
}
.pagination a, .pagination span {
display: inline-block;
padding: 8px 12px;
margin: 0 3px;
background: #fff;
border-radius: 4px;
}
.pagination .current {
background: #2d8cf0;
color: #fff;
} .footer {
background: #333;
color: #fff;
text-align: center;
padding: 30px 0;
margin-top: 30px;
} @media (max-width: 768px) {
.main {
flex-direction: column;
}
.sidebar {
width: 100%;
}
.single-post {
padding: 20px;
}
.single-title {
font-size: 22px;
}
.nav ul {
gap: 10px;
} .related-posts .related-item {
flex: 0 0 100% !important;
}
} .related-posts .related-list {
display: flex;
flex-wrap: wrap;
gap: 20px;
}
.related-posts .related-item {
flex: 0 0 calc(50% - 10px); background: #fff;
padding: 15px;
border-radius: 8px;
box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}