:root {
    --primary-color: #e74c3c;
    --secondary-color: #2c3e50;
    --accent-color: #3498db;
    --light-bg: #f9f9f9;
    --dark-text: #333;
    --light-text: #777;
    --border-color: #e0e0e0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}
@font-face {
    font-family: 'LocalNotoSansSC';
    src: local('Noto Sans SC'),
            local('Microsoft YaHei'),
            local('PingFang SC'),
            local('Hiragino Sans GB');
}

.flex{display:flex;}
.gap20{gap:20px;}
.justify-content-between{
    justify-content: space-between;
}
.justify-content-center{
    justify-content: center;
}
.a-web{text-decoration: none;color: burlywood;}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'LocalNotoSansSC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    background-color: #f5f5f5;
    color: var(--dark-text);
    line-height: 1.7;
}

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

header {
    text-align: center;
    padding: 30px 0;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    margin-bottom: 20px;
    border-radius: 0 0 10px 10px;
    box-shadow: var(--shadow);
    user-select: none;
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

nav {
    background-color: white;
    padding: 15px 0;
    margin-bottom: 25px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
}

nav ul li {
    margin: 0 15px;
    position: relative;
}

nav ul li a {
    text-decoration: none;
    color: var(--secondary-color);
    font-size: 16px;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 20px;
    transition: var(--transition);
}

nav ul li a:hover {
    background-color: var(--primary-color);
    color: white;
}

nav ul li a.active {
    background-color: var(--primary-color);
    color: white;
}

.banner {
    background: linear-gradient(90deg, var(--primary-color), #ff6b6b);
    color: white;
    padding: 15px;
    text-align: center;
    margin-bottom: 30px;
    font-size: 18px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.banner::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg,
        rgba(255,255,255,0.1) 0%,
        rgba(255,255,255,0) 20%,
        rgba(255,255,255,0.1) 40%,
        rgba(255,255,255,0) 60%,
        rgba(255,255,255,0.1) 80%,
        rgba(255,255,255,0) 100%);
    z-index: 1;
    animation: shine 3s infinite linear;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.main-content {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 30px;
    gap: 20px;
}

footer {
    text-align: center;
    padding: 25px 0;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

footer p {
    margin-bottom: 10px;
}

footer p:last-child {
    margin-bottom: 0;
}

.tag {
    display: inline-block;
    background-color: var(--light-bg);
    color: var(--secondary-color);
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 12px;
    margin-right: 5px;
    margin-bottom: 5px;
    transition: var(--transition);
}

.tag:hover {
    background-color: var(--primary-color);
    color: white;
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    nav ul {
        justify-content: center;
    }

    nav ul li {
        margin: 5px;
    }
}

/* 侧边栏样式 */
.sidebar {
    width: 320px;
}

.sidebar-item {
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    transition: var(--transition);
}

.sidebar-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1);
}

.sidebar h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    color: var(--secondary-color);
}
.sidebar-red{
    color: var(--primary-color);
    font-weight: bold;
    font-size:12px;
}
.sidebar-blue{
    color: var(--accent-color);
    font-weight: bold;
    font-size:12px;
}

.profile-content p {
    margin-bottom: 15px;
    color: #555;
    line-height: 1.6;
}

.profile-content h3 {
    font-size: 1.1rem;
    margin: 20px 0 10px;
    color: var(--secondary-color);
    position: relative;
    padding-left: 15px;
}

.profile-content h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 16px;
    background-color: var(--primary-color);
}

.profile-content ul {
    margin-left: 20px;
    margin-bottom: 15px;
    list-style-type: none;
}

.profile-content ul li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.profile-content ul li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.recent-articles-box ul,
.recent-comments-box ul {
    list-style: none;
}

.recent-articles-box li,
.recent-comments-box li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--border-color);
}

.recent-articles-box li:last-child,
.recent-comments-box li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recent-articles-box a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: block;
}

.recent-articles-box a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.recent-articles-box .date,
.recent-comments-box .date {
    display: block;
    color: var(--light-text);
    font-size: 12px;
    margin-top: 5px;
}

.recent-comments-box .author {
    color: var(--primary-color);
    font-weight: bold;
}

.recent-comments-box .content {
    color: #555;
    margin-top: 5px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
    }
}

/* 最新评论样式更新 */
.recent-comment-item .date{display:inline-block}
.comment-meta {
    flex: 1;
}

.comment-content {
    background-color: #f9f9f9; /* 浅灰色背景 */
    padding: 10px 12px;
    border-radius: 4px;
    color: #333; /* 黑色文字 */
    font-size: 14px;
    line-height: 1.5;
    margin: 8px 0;
    border-left: 3px solid #e0e0e0; /* 左侧边框 */
}

.comment-source {
    color: var(--accent-color);
    font-size: 12px;
    text-decoration: none;
}

.comment-source::before {
    content: "评论于：";
    color: var(--light-text);
}

/* 评论区域样式  */
.comments-section {
    margin-top: 50px;
    padding: 25px;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.comments-title {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

.comment-form {
    background: var(--light-bg);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.comment-form h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 15px;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

.submit-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.submit-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.comment-list {
    margin-top: 30px;
}

.comment-list h4 {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: var(--secondary-color);
}

.comment-item {
    padding: 20px 0;
    border-bottom: 1px dashed var(--border-color);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    justify-content: flex-start;
    gap:5px;
    margin-bottom: 10px;
    align-items: center;
}

.comment-author {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 15px;
}

.comment-date {
    color: var(--light-text);
    font-size: 13px;
}

.comment-content {
    color: #555;
    line-height: 1.6;
    font-size: 15px;
    margin-top: 10px;
}

.no-comments {
    color: var(--light-text);
    text-align: center;
    padding: 30px;
    font-size: 15px;
}