/* 全新独特的资讯网站样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4A90E2; /* 柔和的蓝色 */
    --secondary-color: #3A7BD5; /* 柔和蓝色的深色版本 */
    --accent-color: #f59e0b;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --border-color: #e5e7eb;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 10px 25px rgba(0, 0, 0, 0.15);
    --gradient-primary: linear-gradient(135deg, #4A90E2 0%, #3A7BD5 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    font-size: 16px;
}

/* 头部样式 */
.header {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-medium);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

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

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    border-radius: 8px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-menu a:hover::after {
    width: 100%;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 8px 16px;
    backdrop-filter: blur(10px);
}

.search-box input {
    background: none;
    border: none;
    color: white;
    outline: none;
    padding: 4px 8px;
    width: 200px;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-btn {
    background: var(--accent-color);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: #d97706;
    transform: scale(1.05);
}

/* 移动端菜单 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 主要内容区域 */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

/* 轮播图样式 */
.hero-slider {
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-heavy);
    position: relative;
}

.slider-item {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.slider-item:hover img {
    transform: scale(1.05);
}

.slider-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 30px;
    color: white;
}

.slider-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* 文章列表样式 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.article-card {
    background: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.article-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.1);
}

.article-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--gradient-accent);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.article-content {
    padding: 20px;
}

.article-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--text-primary);
    text-decoration: none;
    display: block;
}

.article-title:hover {
    color: var(--primary-color);
}

.article-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.article-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-stats {
    display: flex;
    gap: 15px;
}

.article-tags {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary-color);
    color: white;
}

/* 侧边栏样式 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.widget {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
}

.widget-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 10px;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

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

.widget-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.widget-list li:last-child {
    border-bottom: none;
}

.widget-list li:hover {
    padding-left: 10px;
    background: var(--bg-secondary);
    margin: 0 -25px;
    padding-left: 35px;
    padding-right: 25px;
}

.widget-list a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    display: block;
}

.widget-list a:hover {
    color: var(--primary-color);
}

.widget-meta {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 5px;
}

/* 热门文章卡片样式 */
.popular-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.popular-item:last-child {
    border-bottom: none;
}

.popular-image {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.popular-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.3;
}

.popular-content a {
    color: var(--text-primary);
    text-decoration: none;
}

.popular-content a:hover {
    color: var(--primary-color);
}

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

.tag-cloud .tag {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.tag-cloud .tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.05);
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.pagination ul {
    display: flex;
    list-style: none;
    gap: 8px;
}

.pagination li {
    border-radius: 8px;
    overflow: hidden;
}

.pagination a,
.pagination span {
    display: block;
    padding: 10px 15px;
    color: var(--text-primary);
    text-decoration: none;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .active span {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 底部样式 */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-content p {
    margin-bottom: 10px;
}

.footer-content a {
    color: var(--accent-color);
    text-decoration: none;
}

.footer-content a:hover {
    text-decoration: underline;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

/* 文章详情页样式 */
.article-detail {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
}

.article-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.article-detail-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.article-detail-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.article-body p {
    margin-bottom: 20px;
}

.article-body h2,
.article-body h3 {
    margin: 30px 0 15px;
    color: var(--text-primary);
}

/* 相关文章样式 */
.related-articles {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.related-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.related-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    list-style: none;
}

.related-item a {
    color: var(--text-primary);
    text-decoration: none;
    padding: 15px;
    display: block;
    background: var(--bg-secondary);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.related-item a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* 面包屑导航 */
.breadcrumb {
    background: var(--bg-secondary);
    padding: 15px 0;
    margin-bottom: 30px;
}

.breadcrumb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .search-box {
        display: none;
    }
    
    .main-container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 20px 15px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .hero-slider {
        height: 250px;
    }
    
    .slider-item {
        height: 250px;
    }
    
    .article-detail {
        padding: 25px 20px;
    }
    
    .article-detail-title {
        font-size: 1.5rem;
    }
    
    .header-container {
        padding: 0 15px;
    }
    
    .related-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .article-detail-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .popular-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .popular-image {
        width: 100%;
        height: 120px;
    }
}

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

.article-card {
    animation: fadeInUp 0.6s ease forwards;
}

.article-card:nth-child(2) {
    animation-delay: 0.1s;
}

.article-card:nth-child(3) {
    animation-delay: 0.2s;
}

.article-card:nth-child(4) {
    animation-delay: 0.3s;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}



/* 新的文章列表样式 - 更小更多的布局 */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
}

.article-item {
    display: flex;
    background: var(--bg-primary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    padding: 15px;
}

.article-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.article-thumb {
    width: 120px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 15px;
}

.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-item:hover .article-thumb img {
    transform: scale(1.1);
}

.article-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.article-item .article-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-item .article-title:hover {
    color: var(--primary-color);
}

.article-item .article-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

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

.article-item .article-meta i {
    font-size: 0.7rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .article-item {
        flex-direction: column;
        padding: 12px;
    }
    
    .article-thumb {
        width: 100%;
        height: 120px;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .article-item .article-meta {
        flex-wrap: wrap;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .article-item .article-meta {
        flex-direction: column;
        gap: 5px;
    }
}
