* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: rgba(147, 112, 219, 0.9);
    --primary-hover: rgba(138, 43, 226, 0.95);
    --secondary-color: rgba(230, 230, 250, 0.5);
    --text-color: #333;
    --text-light: #666;
    --text-muted: #888;
    --border-color: rgba(147, 112, 219, 0.2);
    --bg-color: rgba(255, 255, 255, 0.7);
    --bg-light: linear-gradient(135deg, #e6e6fa 0%, #f0e6ff 50%, #e6e6fa 100%);
    --shadow: 0 8px 32px rgba(147, 112, 219, 0.15);
    --shadow-hover: 0 12px 40px rgba(147, 112, 219, 0.25);
    --radius: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px rgba(147, 112, 219, 0.2);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-light);
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-hover);
    transform: translateY(-1px);
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 10px;
}

/* 导航栏 - 玻璃效果 */
.navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #9370db;
}

.nav-links {
    display: flex;
    gap: 35px;
    list-style: none;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(147, 112, 219, 0.15);
    color: #9370db;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 10px 40px 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 25px;
    width: 220px;
    outline: none;
    transition: all 0.3s ease;
    background: transparent;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 15px rgba(147, 112, 219, 0.15);
}

.search-box input:focus {
    width: 280px;
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(147, 112, 219, 0.6);
    box-shadow: 0 8px 30px rgba(147, 112, 219, 0.3);
}

.search-box input::placeholder {
    color: #9370db;
    opacity: 0.7;
}

.search-box button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    object-fit: cover;
    border: 2px solid rgba(147, 112, 219, 0.3);
    box-shadow: 0 4px 15px rgba(147, 112, 219, 0.2);
    transition: all 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(147, 112, 219, 0.3);
}

/* 按钮样式 - 液态效果 */
.btn {
    padding: 10px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.btn-primary {
    background: rgba(147, 112, 219, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    box-shadow: 0 4px 15px rgba(147, 112, 219, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: rgba(147, 112, 219, 0.95);
    box-shadow: 0 8px 25px rgba(147, 112, 219, 0.4);
    color: white;
}

.btn-secondary {
    background: rgba(230, 230, 250, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-color);
    border: 1px solid rgba(147, 112, 219, 0.3);
}

.btn-secondary:hover {
    background: rgba(147, 112, 219, 0.2);
    transform: translateY(-2px);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(147, 112, 219, 0.4);
    color: #9370db;
}

.btn-outline:hover {
    background: rgba(147, 112, 219, 0.85);
    color: white;
    transform: translateY(-2px);
}

/* 卡片样式 - 玻璃液态效果 */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    padding: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(147, 112, 219, 0.25);
    border-color: rgba(147, 112, 219, 0.3);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 18px;
}

.card-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(147, 112, 219, 0.2);
}

.card-info h4 {
    font-size: 15px;
    color: var(--text-color);
    font-weight: 600;
}

.card-info span {
    font-size: 13px;
    color: var(--text-muted);
}

.card-body h3 {
    font-size: 17px;
    margin-bottom: 12px;
    color: var(--text-color);
    font-weight: 600;
}

.card-body p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(147, 112, 219, 0.1);
}

.card-actions {
    display: flex;
    gap: 25px;
}

.card-actions button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    padding: 6px 12px;
    border-radius: 20px;
}

.card-actions button:hover {
    color: #9370db;
    background: rgba(147, 112, 219, 0.1);
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(230, 230, 250, 0.6);
    border: 1px solid rgba(147, 112, 219, 0.2);
    border-radius: 20px;
    font-size: 13px;
    color: #9370db;
    margin-right: 10px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tag:hover {
    background: rgba(147, 112, 219, 0.85);
    backdrop-filter: blur(5px);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(147, 112, 219, 0.3);
}

/* 主布局 */
.main-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 25px;
    padding: 25px 0;
}

/* 侧边栏 */
.sidebar-left {
    position: sticky;
    top: 90px;
    height: fit-content;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 8px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius);
    color: var(--text-color);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(147, 112, 219, 0.15);
    color: #9370db;
    border-color: rgba(147, 112, 219, 0.2);
    transform: translateX(5px);
}

/* 内容区域 */
.content-area {
    min-height: 500px;
}

.section-title {
    font-size: 22px;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(147, 112, 219, 0.3);
    display: inline-block;
    color: #9370db;
    font-weight: 600;
}

/* 文章列表 */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 文章卡片 */
.article-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    padding: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(147, 112, 219, 0.25);
    border-color: rgba(147, 112, 219, 0.3);
}

.article-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 18px;
}

.article-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(147, 112, 219, 0.2);
}

.article-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.article-author {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.article-time {
    font-size: 13px;
    color: var(--text-muted);
}

.article-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
}

.article-title a {
    color: var(--text-color);
    transition: all 0.3s ease;
}

.article-title a:hover {
    color: #9370db;
}

.article-excerpt {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 18px;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 18px;
    border-top: 1px solid rgba(147, 112, 219, 0.1);
}

.article-category {
    font-size: 13px;
    color: #9370db;
    background: rgba(147, 112, 219, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
}

.article-stats {
    display: flex;
    gap: 20px;
}

.article-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.article-stats span:hover {
    color: #9370db;
}

/* 页脚 - 简化版 */
.footer {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    padding: 25px 0;
    margin-top: 50px;
    border-top: 1px solid rgba(147, 112, 219, 0.1);
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar-left {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .search-box input {
        width: 150px;
    }
    
    .search-box input:focus {
        width: 180px;
    }
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px;
}

.spinner {
    width: 45px;
    height: 45px;
    border: 3px solid rgba(147, 112, 219, 0.2);
    border-top-color: #9370db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 滚动条美化 - 细滚动条，悬停显示 */
::-webkit-scrollbar {
    width: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 10px;
    transition: background 0.3s ease;
}

/* 滚动时或悬停时显示滚动条 */
body:hover::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
    background: rgba(147, 112, 219, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(147, 112, 219, 0.6);
}

/* 水平滚动条 */
::-webkit-scrollbar:horizontal {
    height: 4px;
}
