/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #0a0e17;
    color: #e0e0e0;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.3) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.2) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 100px 100px, 150px 150px, 200px 200px;
    z-index: -1;
    opacity: 0.3;
}

a {
    color: #64b5f6;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #90caf9;
}

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

/* 头部样式 */
header {
    padding: 30px 0;
    position: relative;
    overflow: hidden;
}

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

.logo {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 10px rgba(100, 181, 246, 0.8), 0 0 20px rgba(100, 181, 246, 0.5);
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #64b5f6, transparent);
}

/* 导航栏样式 */
nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    font-size: 1.1rem;
    font-weight: 500;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #64b5f6;
    transition: width 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

nav ul li a.active {
    color: #90caf9;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #fff;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* 主要内容区域 */
.main-content {
    display: flex;
    margin: 40px 0;
}

/* 文章区域 */
.articles {
    flex: 2;
    margin-right: 30px;
}

.article {
    background-color: rgba(18, 26, 38, 0.8);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.6s ease forwards;
}

.article:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #64b5f6, #1976d2);
}

.article-header {
    margin-bottom: 15px;
}

.article-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #fff;
}

.article-meta {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #9e9e9e;
}

.article-meta span {
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.article-meta i {
    margin-right: 5px;
}

.article-content {
    margin-bottom: 20px;
    line-height: 1.8;
}

.read-more {
    display: inline-block;
    padding: 8px 20px;
    background-color: rgba(100, 181, 246, 0.2);
    border: 1px solid #64b5f6;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.read-more:hover {
    background-color: rgba(100, 181, 246, 0.3);
    transform: translateX(5px);
}

/* 侧边栏样式 */
.sidebar {
    flex: 1;
}

.sidebar-widget {
    background-color: rgba(18, 26, 38, 0.8);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.widget-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(100, 181, 246, 0.3);
    color: #fff;
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: #64b5f6;
}

/* 关于我部分 */
.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 15px;
    border: 3px solid rgba(100, 181, 246, 0.3);
}

.profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-me p {
    text-align: center;
    margin-bottom: 15px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-links a {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    background-color: rgba(100, 181, 246, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: rgba(100, 181, 246, 0.4);
    transform: translateY(-3px);
}

/* 文章分类部分 */
.categories ul {
    list-style: none;
}

.categories ul li {
    margin-bottom: 10px;
}

.categories ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.categories ul li a:hover {
    background-color: rgba(100, 181, 246, 0.2);
    transform: translateX(5px);
}

.categories .count {
    background-color: rgba(100, 181, 246, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* 最近文章部分 */
.recent-posts ul {
    list-style: none;
}

.recent-posts ul li {
    margin-bottom: 15px;
}

.recent-posts ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.recent-posts ul li a:hover {
    background-color: rgba(100, 181, 246, 0.2);
    transform: translateX(5px);
}

.recent-posts .date {
    font-size: 0.8rem;
    color: #9e9e9e;
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 5px 10px;
    background-color: rgba(100, 181, 246, 0.2);
    border-radius: 5px;
    margin-right: 10px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.tag:hover {
    background-color: rgba(100, 181, 246, 0.4);
    transform: translateY(-2px);
}

/* 文章详情页样式 */
.article-detail {
    background-color: rgba(18, 26, 38, 0.8);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.article-detail .article-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: #fff;
}

.article-detail .article-meta {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(100, 181, 246, 0.3);
}

.article-detail .article-content {
    margin-bottom: 30px;
}

.article-tags {
    margin-top: 20px;
}

/* 页脚样式 */
footer {
    background-color: rgba(15, 23, 36, 0.8);
    padding: 50px 0 20px;
    position: relative;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: #fff;
    margin-bottom: 20px;
    position: relative;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #64b5f6;
}

.footer-section p {
    margin-bottom: 10px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    transition: all 0.3s ease;
}

.footer-section ul li a:hover {
    transform: translateX(5px);
    display: inline-block;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 响应式设计 */
@media screen and (max-width: 992px) {
    .main-content {
        flex-direction: column;
    }
    
    .articles {
        margin-right: 0;
        margin-bottom: 30px;
    }
}

@media screen and (max-width: 768px) {
    .header-content {
        position: relative;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    nav {
        position: absolute;
        top: 100%;
        right: 0;
        width: 250px;
        background-color: rgba(15, 23, 36, 0.95);
        padding: 20px;
        border-radius: 10px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px);
        transition: all 0.3s ease;
        z-index: 100;
    }
    
    nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav ul li {
        margin: 0 0 15px 0;
    }
    
    .menu-toggle.active span:first-child {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:last-child {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .footer-content {
        flex-direction: column;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.star {
    position: fixed;
    background-color: #fff;
    border-radius: 50%;
    animation: twinkle 4s infinite;
    z-index: -1;
}

@keyframes twinkle {
    0% { opacity: 0.3; }
    50% { opacity: 0.8; }
    100% { opacity: 0.3; }
} 