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

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --text-primary: #1a1a1a;
    --text-secondary: #4a5568;
    --accent: #667eea;
    --accent-hover: #5a67d8;
    --card-bg: #ffffff;
    --border: rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.06), 0 4px 6px rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.8;
    color: var(--text-primary);
    background: #ffffff;
    min-height: 100vh;
    letter-spacing: 0.02em;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* 头部样式 - 三栏布局 */
header {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
    padding: 10px 0;
    margin-bottom: 0;
    position: relative;
    z-index: 50;
    box-shadow: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Logo 在最左边 */
.site-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.8);
    letter-spacing: 0.02em;
    transition: all 0.4s;
    cursor: pointer;
    justify-self: start;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.9);
}

.site-logo img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transition: all 0.4s;
}

.site-logo:hover img {
    transform: scale(1.08) rotate(5deg);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.25);
}

.site-logo:hover {
    color: var(--accent);
}

/* 导航栏居中 */
.main-nav {
    display: flex;
    gap: 30px;
    align-items: center;
    justify-self: center;
}

.nav-link {
    color: rgba(0, 0, 0, 0.75);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
    padding: 4px 0;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.9);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), #a78bfa);
    border-radius: 2px;
    transition: width 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
}

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

/* 搜索框在最右边 */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-self: end;
}

#search-input {
    width: 180px;
    padding: 6px 32px 6px 14px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-primary);
    font-size: 0.8rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

#search-input:focus {
    outline: none;
    border-color: var(--accent);
    background: white;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.12);
    transform: translateY(-1px);
}

#search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.search-icon {
    position: absolute;
    right: 10px;
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.3s;
    width: 14px;
    height: 14px;
}

#search-input:focus + .search-icon {
    color: var(--accent);
    transform: scale(1.1);
}

/* Hero 区域 - 视频背景 */
.hero-section {
    text-align: center;
    padding: 0 0 120px 0;
    margin: 0 calc(-50vw + 50%) 80px calc(-50vw + 50%);
    width: 100vw;
    position: relative;
    overflow: hidden;
    min-height: 450px;
}

/* 顶部容器包裹导航和hero */
.top-section {
    position: relative;
    margin: 0 calc(-50vw + 50%);
    width: 100vw;
    background: transparent;
}

/* 视频背景 */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    image-rendering: high-quality;
    image-rendering: -webkit-optimize-contrast;
}

/* 半透明遮罩层 */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.15);
    z-index: 1;
}

/* 移除遮罩层 */

.hero-title {
    font-size: 5rem;
    font-weight: 700;
    margin-bottom: 32px;
    margin-top: 60px;
    color: rgba(0, 0, 0, 0.8);
    letter-spacing: -0.02em;
    line-height: 1.1;
    position: relative;
    z-index: 2;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.9);
}

.hero-subtitle {
    font-size: 1.75rem;
    color: rgba(0, 0, 0, 0.7);
    font-weight: 400;
    letter-spacing: 0.15em;
    font-style: italic;
    position: relative;
    z-index: 2;
    font-family: 'KaiTi', 'STKaiti', 'SimSun', serif;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.9);
}

/* 主容器布局 - 移除侧边栏 */
.main-container {
    max-width: 1000px;
}

.content-wrapper {
    display: block;
}

.main-content {
    width: 100%;
}

/* 文章卡片 */
.post-card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 32px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, var(--accent), #a78bfa);
    border-radius: 0 4px 4px 0;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    border-color: rgba(102, 126, 234, 0.2);
}

.post-card:hover::before {
    height: 100%;
}

.post-card h2 {
    font-size: 1.75rem;
    margin-bottom: 16px;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.4;
}

.post-card h2 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
    background-image: linear-gradient(to right, var(--accent) 0%, var(--accent) 100%);
    background-size: 0 2px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.3s, color 0.3s;
}

.post-card h2 a:hover {
    color: var(--accent);
    background-size: 100% 2px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
    font-weight: 500;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-item svg {
    opacity: 0.6;
}

.post-excerpt {
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 24px;
    font-size: 1.05rem;
}

.post-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.tag {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.06), rgba(167, 139, 250, 0.06));
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(102, 126, 234, 0.12);
    transition: all 0.3s;
}

.tag:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(167, 139, 250, 0.1));
    border-color: rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.read-more::after {
    content: '→';
    font-size: 1.1rem;
    transition: transform 0.3s;
}

.read-more:hover::after {
    transform: translateX(4px);
}

/* 侧边栏 */
.sidebar {
    position: sticky;
    top: 120px;
}

.widget {
    background: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.03);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.04);
}

/* 最近文章 */
.recent-posts {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.recent-post-item {
    display: flex;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.recent-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.recent-post-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    font-weight: 600;
}

.recent-post-title {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-primary);
    text-decoration: none;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

.recent-post-title:hover {
    color: var(--accent);
}

/* 统计信息 */
.stats-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    background: var(--bg-secondary);
    border-radius: 10px;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--accent);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 60px 0 40px;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: var(--card-bg);
    color: var(--text-primary);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

.page-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.page-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.page-dots {
    color: var(--text-secondary);
    padding: 0 8px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 100px 20px;
    animation: fadeInUp 0.6s ease-out;
}

.empty-icon {
    font-size: 4.5rem;
    margin-bottom: 24px;
    animation: float 3s ease-in-out infinite;
}

.empty-state h3 {
    font-size: 1.6rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 600;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* Footer */
footer {
    margin-top: 120px;
    padding: 50px 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card {
    animation: fadeInUp 0.6s ease-out backwards;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.2);
    border-radius: 4px;
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.4);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 126, 234, 0.2) transparent;
}

/* 响应式 */
@media (max-width: 1024px) {
    .header-content {
        grid-template-columns: auto 1fr auto;
        gap: 24px;
    }
    
    .main-nav {
        justify-self: start;
        gap: 32px;
    }
    
    #search-input {
        width: 200px;
    }
    
    .hero-section {
        padding: 120px 40px 100px;
        margin: 0 calc(-50vw + 50%) 70px calc(-50vw + 50%);
        width: 100vw;
    }
    
    .hero-title {
        font-size: 4.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .header-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .site-logo,
    .main-nav,
    .search-box {
        justify-self: center;
    }
    
    .main-nav {
        gap: 24px;
    }
    
    .hero-section {
        padding: 100px 30px 80px;
        margin: 0 calc(-50vw + 50%) 60px calc(-50vw + 50%);
        width: 100vw;
    }
    
    .hero-title {
        font-size: 3.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .post-card {
        padding: 28px;
    }
    
    #search-input {
        width: 100%;
    }
}
