/* 全局样式 - 高级渐变风格 */
:root {
    --primary-color: #8b5cf6;
    --primary-light: #a78bfa;
    --primary-dark: #7c3aed;
    --accent-color: #06b6d4;
    --accent-light: #22d3ee;
    --bg-color: #0c0c1d;
    --bg-secondary: rgba(15, 15, 35, 0.6);
    --card-bg: rgba(30, 30, 50, 0.8);
    --text-color: #f8fafc;
    --text-light: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: rgba(139, 92, 246, 0.2);
    --shadow: 0 4px 20px rgba(139, 92, 246, 0.15);
    --shadow-hover: 0 10px 40px rgba(139, 92, 246, 0.25);
    --radius: 16px;
    --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    --gradient-accent: linear-gradient(135deg, #a855f7 0%, #ec4899 50%, #f43f5e 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    min-height: 100vh;
    position: relative;
}

/* 动态渐变背景 */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(6, 182, 212, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 60%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--accent-color);
}

/* 头部导航 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(12, 12, 29, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--text-light);
    font-weight: 500;
    position: relative;
    padding: 8px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    position: relative;
}

.search-box input {
    background: rgba(15, 15, 35, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 16px 8px 36px;
    color: var(--text-color);
    font-size: 14px;
    width: 200px;
    transition: all 0.3s;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    width: 240px;
}

.search-box::before {
    content: '🔍';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: 0.5;
}

/* Banner */
.banner {
    margin-top: 64px;
    padding: 80px 20px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    position: relative;
    z-index: 1;
}

.banner-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.banner-subtitle {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 32px;
}

.banner-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* 主内容 */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    position: relative;
    z-index: 1;
}

/* 侧边栏 */
.sidebar-left {
    position: sticky;
    top: 88px;
    height: fit-content;
}

.widget {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.widget-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-title::before {
    content: '';
    width: 3px;
    height: 16px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 8px;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text-light);
    transition: all 0.3s;
}

.category-list a:hover,
.category-list a.active {
    background: rgba(139, 92, 246, 0.1);
    color: var(--text-color);
}

.category-list a.active {
    border-left: 3px solid var(--primary-color);
}

.category-count {
    background: rgba(139, 92, 246, 0.15);
    color: var(--primary-light);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
}

.tag-item:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
}

/* 文章列表 */
.posts-container {
    min-width: 0;
}

.posts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.posts-title {
    font-size: 24px;
    font-weight: 700;
}

.date-group {
    margin-bottom: 40px;
}

.date-header {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

/* 文章卡片 */
.post-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.post-card:hover::before {
    opacity: 1;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.post-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
    flex: 1;
}

.post-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.post-status.published {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.post-status.draft {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.post-excerpt {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 13px;
}

.post-meta {
    display: flex;
    gap: 16px;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-category {
    background: rgba(139, 92, 246, 0.15);
    color: var(--primary-light);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
}

/* 文章详情弹窗 */
.post-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.post-modal-content {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 40px;
    max-width: 800px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

.post-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s;
}

.post-modal-close:hover {
    background: #ef4444;
    color: white;
}

.post-modal-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.post-modal-meta {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.post-modal-body {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 32px;
}

.post-modal-body img {
    max-width: 100%;
    border-radius: var(--radius);
    margin: 20px 0;
}

/* 评论区 */
.comments-section {
    border-top: 1px solid var(--border-color);
    padding-top: 32px;
}

.comments-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 24px;
}

.comment-form {
    margin-bottom: 32px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    background: rgba(15, 15, 35, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-color);
    font-size: 14px;
    margin-bottom: 12px;
    transition: all 0.3s;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.comment-form textarea {
    min-height: 100px;
    resize: vertical;
}

.comment-form button {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.comment-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.comment-list {
    list-style: none;
}

.comment-item {
    background: rgba(15, 15, 35, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    color: var(--primary-light);
}

.comment-time {
    font-size: 12px;
    color: var(--text-muted);
}

.comment-text {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
}

/* 加载更多 */
.load-more {
    text-align: center;
    padding: 32px;
}

.load-more button {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    padding: 12px 32px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.load-more button:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
}

/* 公告栏 */
.announcement-bar {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--gradient-primary);
    padding: 12px 20px;
    text-align: center;
    z-index: 50;
}

.announcement-bar-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: white;
    max-width: 1200px;
    margin: 0 auto;
}

.announcement-icon {
    font-size: 18px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.announcement-text {
    font-size: 14px;
    font-weight: 500;
}

.announcement-divider {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.3);
}

.announcement-link {
    font-size: 13px;
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.announcement-link:hover {
    opacity: 1;
}

/* 响应式 */
@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar-left {
        position: static;
    }
    
    .banner-title {
        font-size: 36px;
    }
    
    .banner-stats {
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .header-right {
        flex: 1;
        justify-content: flex-end;
    }
    
    .search-box input {
        width: 150px;
    }
    
    .banner {
        padding: 60px 20px;
    }
    
    .banner-title {
        font-size: 28px;
    }
    
    .banner-stats {
        flex-direction: column;
        gap: 16px;
    }
    
    .post-modal-content {
        padding: 24px;
    }
}
