* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: #0a0e17;
    color: #e0e0e0;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 电路板背景效果 */
.circuit-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(to bottom, #0a0e17, #0e1421);
    overflow: hidden;
}

.circuit-line {
    position: absolute;
    top: 0;
    height: 100%;
    width: 1px;
    background: rgba(80, 100, 140, 0.15);
    animation: flow 15s linear infinite;
}

.circuit-line:nth-child(2n) {
    background: rgba(120, 140, 180, 0.1);
    animation-duration: 10s;
}

.circuit-line:nth-child(3n) {
    background: rgba(100, 120, 160, 0.2);
    animation-duration: 20s;
}

@keyframes flow {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

/* 主容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    padding: 40px 0;
    text-align: center;
    position: relative;
    z-index: 1;
}

.logo {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #8aa8d8, #b0c4de);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(138, 168, 216, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    color: #a0b0c8;
    max-width: 600px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

/* 导航样式 */
nav {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 30px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

nav a {
    color: #b0c4de;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
}

nav a:hover {
    color: #e0e0e0;
    background: rgba(80, 100, 140, 0.3);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #8aa8d8;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav a:hover::after {
    width: 70%;
}

/* 修改导航栏选中状态 */
nav a.home {
    color: #e0e0e0 !important;
    background: rgba(100, 130, 180, 0.4);
    border: 2px solid #8aa8d8;
    box-shadow: 0 0 0 3px rgba(138, 168, 216, 0.3);
    font-weight: 600;
    padding: 6px 14px; /* 微调内边距以适应边框 */
}

/* 移除选中状态的下划线效果 */
nav a.home::after {
    display: none;
}

/* 调整悬停效果避免冲突 */
nav a.home:hover {
    background: rgba(100, 130, 180, 0.5);
    transform: none; /* 移除悬停时的移动效果 */
}



/* 主内容区 - 双列布局 */
.main-content {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 左侧文章列表占2/3，右侧边栏占1/3 */
    gap: 30px;
    padding: 20px 0 60px;
}

/* 文章卡片 */
.articles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.article-card {
    background: rgba(20, 25, 40, 0.7);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(80, 100, 140, 0.2);

    position: relative;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.4);
    border-color: rgba(100, 130, 180, 0.4);
}

.article-img {
    height: 135px;
    background: linear-gradient(45deg, #1a2a4a, #2a3a5a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8aa8d8;
    font-size: 3rem;

        position: relative;
    overflow: hidden;
}

.article-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(138, 168, 216, 0.1), transparent);
    transform: translateX(-100%);
}
.article-card:hover .article-img::after {
    animation: shine 1.2s ease;
}

@keyframes shine {
    100% {
        transform: translateX(100%);
    }
}

.article-content {
    padding: 20px;
}

.article-tag {
    display: inline-block;
    background: rgba(100, 130, 180, 0.3);
    color: #b0c4de;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.article-title {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: #e0e0e0;
}

.article-excerpt {
    color: #a0b0c8;
    line-height: 1.6;
    margin-bottom: 15px;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    color: #7a8ca0;
    font-size: 0.9rem;
    border-top: 1px solid rgba(80, 100, 140, 0.2);
    padding-top: 15px;
}

/* 右侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.widget {
    background: rgba(20, 25, 40, 0.7);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(80, 100, 140, 0.2);
}

.widget-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(80, 100, 140, 0.3);
    color: #b0c4de;
    display: flex;
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
}

/* 头像样式 */
.avatar {
    width: 103px;
    height: 103px;
    margin: 0 auto 20px;
    background: linear-gradient(45deg, #1a2a4a, #2a3a5a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
}

.avatar-portrait {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.avatar-portrait img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


.status-box {
    background: linear-gradient(45deg, #1a2a4a, #2a3a5a);
    border-radius: 20px;
    padding: 2px 10px;
    margin: 15px auto 20px;
    display: flex;
    align-items: center; /* 确保内容垂直居中 */
    justify-content: center;
    width: 100%;
    border: 1px solid rgba(100, 130, 180, 0.4);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    min-height: 36px; /* 确保最小高度 */

}

.status-icon {
    /*color: #4caf50; !* 绿色表示在线状态 *!*/
    width: 1em;
    height: 1em;
    margin-right: 10px;
    background: #4caf50;
    border-radius: 50%;
    animation: pulse 2.3s infinite;
}

/* 可选：更精确的图标位置调整 */
.status-text {
    font-size: 1rem;
    color: #b0c4de;
    font-weight: 500;
    line-height: 1.2; /* 优化行高 */
}

@keyframes pulse {
    0% { opacity: 0.2; }
    50% { opacity: 1; }
    100% { opacity: 0.2; }
}


.bio {
    color: #a0b0c8;
    line-height: 1.6;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(80, 100, 140, 0.3);
    color: #b0c4de;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: rgba(100, 130, 180, 0.5);
    color: #e0e0e0;
    transform: translateY(-3px);
}

/* 热门文章样式 */
.popular-posts li {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(80, 100, 140, 0.2);
}

.popular-posts li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.post-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: linear-gradient(45deg, #1a2a4a, #2a3a5a);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8aa8d8;
}

.post-info h4 {
    font-size: 0.95rem;
    margin-bottom: 5px;
    color: #e0e0e0;
}

.post-info span {
    color: #7a8ca0;
    font-size: 0.85rem;
}

/* 标签云样式 */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: rgba(100, 130, 180, 0.3);
    color: #b0c4de;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(100, 130, 180, 0.5);
    color: #e0e0e0;
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 30px 0;
    color: #7a8ca0;
    font-size: 0.9rem;
    border-top: 1px solid rgba(80, 100, 140, 0.2);
    margin-top: 30px;
}

/* 备案号样式 */
footer a.bei_an-link {
    display: inline-block;
    margin-top: 15px;
    font-size: 1rem;
    font-weight: bold;
    color: #6a9eff;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 5px 15px;
    border-radius: 4px;
    background: rgba(40, 70, 120, 0.3);
}

footer a.bei_an-link:hover {
    color: #ffffff;
    background: rgba(60, 100, 180, 0.5);
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .articles {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 600px) {
    .logo {
        font-size: 2.2rem;
    }

    nav {
        gap: 10px;
    }

    nav a {
        font-size: 1rem;
        padding: 6px 12px;
    }

    footer a.bei_an-link {
        font-size: 0.9rem;
        padding: 4px 10px;
    }
}