/* 柏坊灰蓝暗黑主题 */
:root {
    --primary-dark: #1a2a3a;
    --secondary-dark: #2c3e50;
    --accent-blue: #3498db;
    --text-primary: #ecf0f1;
    --text-secondary: #bdc3c7;
    --highlight: #2980b9;
    --card-bg: #2c3e50;
    --border-color: #34495e;
    --hover-effect: rgba(52, 152, 219, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
}

body {
    background-color: var(--primary-dark);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: var(--accent-blue);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
    color: var(--text-primary);
    text-shadow: 0 0 5px var(--highlight);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 独特的分割线头部设计 */
header {
    background: linear-gradient(to bottom, var(--secondary-dark), var(--primary-dark));
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-blue), var(--text-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-blue);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

/* 不对称内容布局 */
.main-content {
    background-color: var(--secondary-dark);
    border-radius: 8px;
    padding: 2.5rem;
    margin: 2rem 0;
    border-left: 5px solid var(--accent-blue);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    position: relative;
    color: var(--text-primary);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 2px;
    background: var(--accent-blue);
}

/* 蜂窝网格布局 */
.hex-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.hex-card {
    background-color: var(--card-bg);
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.hex-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.hex-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.hex-body {
    padding: 1.5rem;
}

.hex-title {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hex-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 1rem;
}

/* 分类标签 */
.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--hover-effect);
    color: var(--accent-blue);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* 文章详情页 - 杂志风格布局 */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    column-count: 1;
    column-gap: 2rem;
}

@media (min-width: 768px) {
    .article-container {
        column-count: 2;
    }
}

.article-header {
    margin-bottom: 2.5rem;
    text-align: center;
    column-span: all;
}

.article-title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    position: relative;
    display: inline-block;
}

.article-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 25%;
    width: 50%;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--accent-blue), transparent);
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.article-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.article-content {
    line-height: 1.8;
    font-size: 1.05rem;
    hyphens: auto;
    text-align: justify;
    break-inside: avoid;
}

.article-content p {
    margin-bottom: 1.2rem;
    orphans: 3;
    widows: 3;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1.2rem 0;
    border: 1px solid var(--border-color);
}

/* 独特的分页设计 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
}

.pagination a {
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination a:hover {
    background-color: var(--accent-blue);
    color: var(--text-primary);
    transform: translateY(-3px);
}

/* 3D效果的友情链接 */
.friend-links {
    background-color: var(--secondary-dark);
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.friend-links h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    position: relative;
    display: inline-block;
}

.friend-links h3::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, var(--accent-blue), transparent);
}

.friend-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.friend-link {
    padding: 0.75rem;
    background-color: var(--card-bg);
    border-radius: 6px;
    text-align: center;
    transition: all 0.3s ease;
    transform: translateZ(0);
    border: 1px solid var(--border-color);
}

.friend-link:hover {
    background-color: var(--hover-effect);
    transform: translateZ(10px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* 页脚设计 */
footer {
    background-color: var(--secondary-dark);
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

.copyright {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hex-grid {
        grid-template-columns: 1fr;
    }
    
    .hex-card {
        clip-path: none;
    }
    
    .article-title {
        font-size: 1.8rem;
    }
    
    .friend-links-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}