/* 渐进式交互主题 - 橙色紫色渐变风格 */
:root {
    --gradient-start: #ff7e5f;
    --gradient-end: #8e54e9;
    --dark-bg: #1a1a2e;
    --card-bg: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #e2e2e2;
    --accent: #f9c74f;
    --transition-speed: 0.4s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

@supports (font-variation-settings: normal) {
    * {
        font-family: 'Inter var', -apple-system, BlinkMacSystemFont, sans-serif;
    }
}

body {
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 126, 95, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(142, 84, 233, 0.1) 0%, transparent 20%);
}

/* 渐进式加载动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.progressive-load {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
}

/* 动态头部 */
header {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    padding-bottom: 3rem;
}

.header-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: white;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: white;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    transition: all var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-speed) ease;
    z-index: -1;
}

.nav-link:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

/* 主内容区 */
.main {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: -2rem auto 0;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.section {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 2.5rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition-speed) ease;
}

.section:hover {
    transform: translateY(-5px);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* 渐进式卡片网格 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.card {
    background: rgba(22, 33, 62, 0.7);
    border-radius: 1rem;
    overflow: hidden;
    transition: all var(--transition-speed) ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.card-media {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--accent);
}

/* 分类标签 */
.category-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border-radius: 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

/* 文章详情页 */
.article-header {
    text-align: center;
    margin-bottom: 3rem;
}

.article-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.3;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.article-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.article-content {
    line-height: 1.8;
    font-size: 1.05rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

/* 分页导航 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
}

.pagination-link {
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: 600;
    transition: all var(--transition-speed) ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-link:hover {
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    transform: translateY(-3px);
}

/* 友情链接 */
.friend-links {
    margin-top: 2rem;
}

.friend-links-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.friend-links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.friend-link {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2rem;
    font-size: 0.85rem;
    transition: all var(--transition-speed) ease;
}

.friend-link:hover {
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    transform: translateY(-2px);
}

/* 页脚 */
.footer {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    padding: 3rem 0 1.5rem;
    text-align: center;
    clip-path: polygon(0 10%, 100% 0, 100% 100%, 0 100%);
    margin-top: 3rem;
}

.footer-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.copyright {
    font-size: 0.9rem;
    color: white;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--card-bg);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: right 0.5s ease;
        z-index: 1000;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .section {
        padding: 1.5rem;
    }
    
    .article-title {
        font-size: 1.8rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* 加载指示器 */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    transform-origin: left;
    transform: scaleX(0);
    z-index: 1001;
    transition: transform 0.4s ease;
}

.loader.active {
    transform: scaleX(1);
}