/* 基础样式设置 */
:root {
    --primary-color: #e53935;
    --secondary-color: #212121;
    --accent-color: #ff9e80;
    --text-color: #333333;
    --light-text: #757575;
    --lighter-text: #9e9e9e;
    --background-color: #ffffff;
    --light-bg: #f5f5f5;
    --border-color: #e0e0e0;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}

h1 {
    font-size: 2.25rem;
}

h2 {
    font-size: 1.875rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 16px;
    line-height: 1.6;
}

section {
    padding: 40px 0;
}

/* 头部导航 */
.header {
    background-color: var(--background-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo a {
    display: flex;
    align-items: center;
}

.logo h1 {
    font-size: 1.75rem;
    margin: 0;
    color: var(--secondary-color);
    font-weight: 700;
}

.logo span {
    color: var(--primary-color);
}

.main-nav ul {
    display: flex;
    gap: 24px;
}

.main-nav a {
    font-weight: 500;
    color: var(--secondary-color);
    padding: 8px 0;
    position: relative;
}

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

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

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

.search-box form {
    display: flex;
    align-items: center;
}

.search-box input {
    width: 200px;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px 0 0 4px;
    font-size: 0.875rem;
    outline: none;
}

.search-box button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 9px 16px;
    border-radius: 0 4px 4px 0;
    transition: var(--transition);
}

.search-box button:hover {
    background-color: var(--secondary-color);
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--secondary-color);
    cursor: pointer;
}

/* 热门轮播 */
.hero-section {
    padding: 32px 0;
}

.hero-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.featured-post {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    height: 100%;
}

.featured-post .post-image {
    height: 400px;
    position: relative;
}

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

.featured-post:hover img {
    transform: scale(1.03);
}

.featured-post .post-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
}

.post-category {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 12px;
}

.featured-post h2 {
    font-size: 1.75rem;
    margin-bottom: 12px;
}

.post-meta {
    display: flex;
    gap: 16px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

.hero-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-post {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    height: calc(50% - 12px);
}

.sidebar-post .post-image {
    height: 188px;
    position: relative;
}

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

.sidebar-post:hover img {
    transform: scale(1.03);
}

.sidebar-post .post-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
}

.sidebar-post h3 {
    font-size: 1.125rem;
    margin-bottom: 8px;
}

/* 分类导航 */
.category-nav {
    padding: 16px 0;
    background-color: var(--light-bg);
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.category-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: var(--background-color);
    border-radius: 24px;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.875rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.category-list a:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 区块头部 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 1.5rem;
    position: relative;
    padding-left: 16px;
    margin-bottom: 0;
}

.section-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    height: 24px;
    width: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.view-all {
    font-size: 0.875rem;
    color: var(--light-text);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}

.view-all:hover {
    color: var(--primary-color);
}

/* 文章卡片 */
.post-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.post-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    background-color: var(--background-color);
    transition: var(--transition);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.post-card .post-image {
    height: 180px;
    position: relative;
}

.post-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card .post-category {
    position: absolute;
    top: 12px;
    left: 12px;
}

.post-card .post-content {
    padding: 16px;
}

.post-card h3 {
    font-size: 1.125rem;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card p {
    color: var(--light-text);
    font-size: 0.875rem;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card .post-meta {
    color: var(--lighter-text);
}

/* 热门爆料 */
.trending-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.trending-post {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    background-color: var(--background-color);
    transition: var(--transition);
}

.trending-post:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.trending-post .post-image {
    height: 240px;
    position: relative;
}

.trending-post img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trending-post .post-content {
    padding: 16px;
}

.trending-post h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.trending-post p {
    color: var(--light-text);
    margin-bottom: 12px;
}

.trending-post .post-meta {
    color: var(--lighter-text);
}

.trending-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.list-post {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 8px;
    background-color: var(--background-color);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.list-post:hover {
    transform: translateX(4px);
    background-color: var(--light-bg);
}

.post-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    opacity: 0.8;
    min-width: 40px;
    text-align: center;
}

.list-post .post-content {
    flex: 1;
}

.list-post h4 {
    font-size: 1rem;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-post .post-meta {
    display: flex;
    justify-content: space-between;
    color: var(--lighter-text);
    font-size: 0.75rem;
}

.list-post .post-category {
    background: none;
    color: var(--primary-color);
    padding: 0;
    margin: 0;
}

/* 视频区域 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.video-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    background-color: var(--background-color);
    transition: var(--transition);
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.video-image {
    height: 180px;
    position: relative;
}

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

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    transition: var(--transition);
}

.video-card:hover .play-icon {
    background-color: var(--primary-color);
}

.video-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.video-content {
    padding: 16px;
}

.video-content h3 {
    font-size: 1.125rem;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-content .post-meta {
    color: var(--lighter-text);
}

/* 订阅区域 */
.subscribe-section {
    background-color: var(--primary-color);
    color: white;
    padding: 48px 0;
    margin: 40px 0;
}

.subscribe-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.subscribe-content h2 {
    margin-bottom: 8px;
}

.subscribe-content p {
    opacity: 0.9;
    margin-bottom: 0;
}

.subscribe-form form {
    display: flex;
    gap: 12px;
}

.subscribe-form input {
    width: 280px;
    padding: 12px 16px;
    border: none;
    border-radius: 4px;
    outline: none;
    font-size: 0.875rem;
}

.subscribe-form button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 500;
    transition: var(--transition);
}

.subscribe-form button:hover {
    background-color: black;
}

/* 底部区域 */
.footer {
    background-color: var(--light-bg);
    padding: 48px 0 24px;
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.footer-logo h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.footer-logo span {
    color: var(--primary-color);
}

.footer-logo p {
    color: var(--light-text);
}

.footer-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.footer-nav-column h3 {
    font-size: 1.125rem;
    margin-bottom: 16px;
    color: var(--secondary-color);
}

.footer-nav-column ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-nav-column a {
    color: var(--light-text);
    font-size: 0.875rem;
}

.footer-nav-column a:hover {
    color: var(--primary-color);
}

.social-links a {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--lighter-text);
    font-size: 0.875rem;
}

.footer-bottom p {
    margin-bottom: 8px;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 900;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--secondary-color);
}