/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

html, body {
    height: 100%;
}

/* 背景系统 */
body {
    background: url('img/bg-pc.jpg') center/cover fixed;
    min-height: 100vh;
    transition: 0.5s;
}

.bg-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.88);
    z-index: -1;
    backdrop-filter: blur(2px);
}

/* 导航栏 */
.nav {
    background: linear-gradient(90deg, #ff8be5, #9b7cfa);
    padding: 1.2rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(155, 124, 250, 0.2);
    transition: all 0.3s;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Comic Sans MS', cursive;
    color: white;
    font-size: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 2rem;
    transition: 0.3s;
}

.nav-links a:hover {
    color: #ffeb3b;
    transform: scale(1.1);
}

/* 主要内容容器 */
.container {
    max-width: 1200px;
    margin: 100px auto 50px;
    padding: 0 20px;
    display: flex;
    gap: 30px;
}

/* 文章卡片 */
.article-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    transition: 0.3s;
    cursor: pointer;
    opacity: 1;
    transform: translateY(20px);
    border: 2px solid transparent;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(155, 124, 250, 0.15);
    border-color: #ff8be5;
}

.article-date {
    color: #9b7cfa;
    font-size: 0.9em;
    margin-bottom: 10px;
}

/* 侧边栏 */
.sidebar {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    position: sticky;
    top: 100px;
    height: fit-content;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #ff8be5;
    margin: 0 auto 20px;
    display: block;
    transition: 0.3s;
}

.avatar:hover {
    transform: rotate(15deg);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    color: #9b7cfa;
    font-size: 1.5rem;
    transition: 0.3s;
}

.social-links a:hover {
    color: #ff8be5;
    transform: scale(1.2);
}

/* 文章详情页样式 */
.article-container {
    max-width: 800px;
    margin: 100px auto;
    padding: 0 20px;
}

.article-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(155, 124, 250, 0.1);
}

.article-header {
    border-bottom: 2px solid #ff8be5;
    margin-bottom: 30px;
    padding-bottom: 20px;
}

.article-header h1 {
    color: #9b7cfa;
    font-size: 2.2em;
    margin-bottom: 10px;
}

.article-meta {
    color: #666;
    font-size: 0.9em;
}

.article-body {
    line-height: 1.8;
    font-size: 1.1em;
}

.article-body img {
    max-width: 100%;
    border-radius: 10px;
    margin: 20px 0;
}

.back-btn {
    display: inline-block;
    margin-top: 30px;
    padding: 10px 20px;
    background: #9b7cfa;
    color: white;
    border-radius: 25px;
    text-decoration: none;
    transition: 0.3s;
}

.back-btn:hover {
    background: #ff8be5;
    transform: translateX(-5px);
}

.loading {
    text-align: center;
    font-size: 1.2em;
    color: #9b7cfa;
    padding: 50px 0;
}

.error {
    color: #ff4757;
    padding: 50px 0;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        position: static;
    }
    
    .nav-links {
        display: none;
    }

    body {
        background-image: url('img/bg-mobile.jpg');
        background-attachment: scroll;
    }

    .article-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5rem;
    }
    
    .article-card {
        padding: 15px;
    }
}