/* 基础样式与变量定义 */
:root {
    /* 颜色变量 */
    --theme: #009b4c;
    --primary: #000000;
    --tech: #36CFC9;
    --finance: #FF7D00;
    --sports: #F53F3F;
    --entertainment: #722ED1;
    --dark: #1D2129;
    --medium: #4E5969;
    --light: #86909C;
    --background: #F2F3F5;
    --white: #FFFFFF;
    --gray-100: #F7F8FA;
    --gray-200: #E5E6EB;
    --gray-300: #C9CDD4;

    /* 尺寸变量 */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* 阴影变量 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
}

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--background);
    color: var(--dark);
    line-height: 1.5;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* 通用工具类 */
.text-balance {
    text-wrap: balance;
}

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

/* 动画定义 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out forwards;
    opacity: 0;
}

.slide-up {
    animation: slideUp 0.6s ease-out forwards;
    opacity: 0;
}

/* 搜索框样式 */
.search-section {
    margin-bottom: 3rem;
}

.search-bar {
    position: relative;
    max-width: 540px;
    margin: 0 auto;
}

.search-bar input {
    width: 100%;
    padding: 1.5rem 1.25rem 1.5rem 3rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
    margin-top: 30px;
}

.search-bar input:focus {
    outline: none;
    border-color: #009b4c;
    box-shadow: 0 0 0 2px rgba(0, 155, 76, 0.3);
}

.search-bar i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-300);
    margin-top: 15px;
}

/* 面包屑导航 */
.breadcrumbs {
    margin-bottom: 1.5rem;
    color: var(--light);
}

.breadcrumbs a {
    color: var(--light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.breadcrumbs span {
    color: var(--dark);
}

/* 新闻分类标题 */
.category-header {
    margin-bottom: 2.5rem;
}

.category-header h1 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.category-header h1 i {
    margin-right: 0.75rem;
    color: var(--tech);
}

.category-header p {
    color: var(--medium);
    max-width: 600px;
}

/* 新闻卡片样式 */
.news-categories {
    margin-bottom: 3rem;
}

.category-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1.5rem 0 1.0rem 0;
}

.category-title h2 {
    font-weight: 700;
    display: flex;
    align-items: center;
}

.category-title h2 i {
    margin-right: 0.75rem;
}

.view-more {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
    align-items: center;
}

.view-more i {
    margin-left: 0.25rem;
    transition: transform 0.2s ease;
}

.view-more:hover {
    color: var(--theme);
}

.view-more:hover i {
    transform: translateX(2px);
}

.news-grid {
    display: flex;
    gap: 10px;
}

.news-card {
    width: 370px;
    background-color: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.news-card-image {
    height: 12rem;
    background-color: var(--gray-200);
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-card-image img {
    transform: scale(1.05);
}

.news-card-content {
    padding: 1.25rem;
}

.news-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
    color: var(--light);
}

.news-meta i {
    margin-right: 0.25rem;
}

.news-card-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: rgba(54, 207, 201, 0.1);
    color: var(--tech);
    border-radius: 999px;
    margin-left: 0.75rem;
}

.news-card h3 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.news-card h3 a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-card h3 a:hover {
    color: var(--primary);
}

.news-card-title {
    color: #000;
}
.news-card-title:hover {
    color: #009b4c;
}

.news-card-footer p:hover {
    color: #009b4c;
}

.news-card p {
    color: var(--medium);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-card-footer .read-count {
    color: var(--light);
    display: flex;
    align-items: center;
}

.news-card-footer .read-count i {
    margin-right: 0.25rem;
    margin-left: 0.75rem;
}

.news-card-footer a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.news-card-footer a i {
    margin-left: 0.25rem;
    transition: transform 0.2s ease;
}

.news-card-footer a:hover {
    color: var(--theme);
}

.news-card-footer a:hover i {
    transform: translateX(2px);
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2.5rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--gray-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--medium);
    background-color: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background-color: var(--gray-100);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.page-number {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--medium);
    background-color: transparent;
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-number:hover:not(.active) {
    background-color: var(--gray-100);
}

.page-number.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-info {
    margin-left: 1.5rem;
    color: var(--light);
    display: none;
}

/* 新闻详情页样式 */
.news-detail {
    display: flex;
    gap: 2rem;
}

.news-content {
    flex: 2;
}

.news-sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.news-article {
    background-color: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 2rem;
}

.news-article header {
    margin-bottom: 2rem;
}

.news-article h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.news-meta-detail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    color: var(--light);
    font-size: 1.5rem;
}

.news-meta-detail div {
    display: flex;
    align-items: center;
}

.news-meta-detail i {
    margin-right: 0.5rem;
}

.article-image {
    width: 100%;
    height: 20rem;
    background-color: var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 2rem;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.article-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 1.5rem;
}

.tag-tech {
    background-color: rgba(54, 207, 201, 0.1);
    color: var(--tech);
}

.tag-primary {
    background-color: rgba(22, 93, 255, 0.1);
    color: var(--primary);
}

.tag-gray {
    background-color: var(--gray-100);
    color: var(--medium);
}

.article-content {
    color: var(--medium);
    line-height: 1.7;
    font-size: 1.8rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    color: var(--dark);
}

.article-quote {
    background-color: var(--gray-100);
    border-left: 4px solid var(--theme);
    padding: 1.25rem;
    margin: 2rem 0;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.article-quote p {
    font-style: italic;
    margin-bottom: 0.5rem;
}

.article-quote cite {
    display: block;
    text-align: right;
    font-size: 1.5rem;
    color: var(--light);
}

.article-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

.grid-item {
    background-color: var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.grid-item h3 {
    font-size: 1.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.grid-item h3 i {
    margin-right: 0.5rem;
    color: var(--primary);
    font-size: 1.9rem;
}

/* 边栏组件 */
.sidebar-module {
    background-color: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
}

.module-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    margin-top: 1.25rem;
    display: flex;
    align-items: flex-end;
}

.module-title i {
    margin-right: 0.5rem;
}

/* 热门阅读榜 */
.popular-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popular-item {
    display: flex;
    gap: 1rem;
    align-items: center
}

.rank-number {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: var(--gray-200);
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.rank-1 {
    background-color: var(--sports);
    color: white;
}

.rank-2 {
    background-color: rgba(245, 63, 63, 0.8);
    color: white;
}

.rank-3 {
    background-color: rgba(245, 63, 63, 0.6);
    color: white;
}

.popular-content h4 {
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-content h4 a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.popular-content h4 a:hover {
    color: var(--theme);
}

.popular-meta {
    font-size: 1.5rem;
    color: var(--light);
}

.text-sports {
    color: red;
}
.text-finance {
    color: var(--theme);
}

/* 关联新闻 */
.related-news {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.related-item {
    display: flex;
    gap: 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.related-item:hover {
    transform: translateX(4px);
}

.related-image {
    width: 6rem;
    height: 6rem;
    background-color: var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    flex-shrink: 0;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-content h4 {
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-content h4 a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.related-content h4 a:hover {
    color: var(--primary);
}

.related-date {
    font-size: 1.5rem;
    color: var(--light);
}

/* 相关产品 */
.product-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.product-item {
    display: flex;
    gap: 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.product-item:hover {
    transform: translateX(4px);
}

.product-image {
    width: 5rem;
    height: 5rem;
    background-color: var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-item:hover .product-image img {
    transform: scale(1.05);
}

.product-content h4 {
    font-weight: 500;
    margin-bottom: 0.25rem;
    transition: color 0.2s ease;
}

.product-item:hover h4 {
    color: var(--primary);
}

.product-price {
    font-weight: 600;
    color: var(--finance);
    font-size: 0.875rem;
}

.product-desc {
    font-size: 1.5rem;
    color: var(--light);
    margin-top: 0.25rem;
}

.view-more-products {
    width: 100%;
    margin-top: 1rem;
    padding: 0.5rem;
    border: 1px solid #bbb;
    border-radius: var(--radius-lg);
    background-color: transparent;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-more-products:hover {
    background-color: rgba(22, 93, 255, 0.05);
}

/* 响应式样式 */
/*@media (min-width: 768px) {
    .view-more-mobile {
        display: none;
    }

    .view-more {
        display: flex;
    }

    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pagination-info {
        display: block;
    }
}

@media (min-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .news-detail {
        flex-direction: row;
    }

    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .news-card-horizontal {
        flex-direction: column;
    }

    .news-card-image-horizontal {
        width: 100%;
        height: 12rem;
    }

    .view-more-mobile {
        display: inline-flex;
        align-items: center;
        color: var(--primary);
        text-decoration: none;
        margin-top: 1rem;
    }

    .view-more-mobile i {
        margin-left: 0.25rem;
    }

    .author-actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }
}*/
