/* 吃瓜网样式 - 基于百度SEO优化 */

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

:root {
    --primary-color: #d32f2f;
    --secondary-color: #f44336;
    --accent-color: #ff5722;
    --dark-red: #b71c1c;
    --light-red: #ffebee;
    --bg-light: #fafafa;
    --text-dark: #212121;
    --text-light: #616161;
    --text-lighter: #9e9e9e;
    --white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.15);
    --shadow-hover: rgba(0, 0, 0, 0.25);
}

body {
    font-family: 'Microsoft YaHei', '微软雅黑', 'SimSun', '宋体', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    font-size: 16px;
}

/* 头部导航 */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    flex-wrap: wrap;
}

.logo {
    font-size: 26px;
    font-weight: bold;
    color: var(--white);
    text-decoration: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

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

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
    padding: 5px 10px;
    border-radius: 4px;
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

/* 主要内容区域 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 首页横幅 */
.hero {
    background: linear-gradient(135deg, var(--light-red), var(--white));
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 3px solid var(--primary-color);
}

.hero h1 {
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.3;
}

.hero p {
    font-size: 1.2em;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* 关键词区域 */
.keywords-section {
    background: var(--bg-light);
    padding: 40px 20px;
    margin: 40px 0;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.keywords-section h2 {
    color: var(--primary-color);
    font-size: 1.8em;
    margin-bottom: 20px;
    text-align: center;
}

/* 产品/内容卡片 */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 3px solid var(--primary-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px var(--shadow-hover);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.card-content {
    padding: 20px;
}

.card h3 {
    color: var(--primary-color);
    font-size: 1.3em;
    margin-bottom: 10px;
    font-weight: bold;
}

.card p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 15px;
}

.card a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: color 0.3s;
}

.card a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* 视频卡片 */
.video-card {
    position: relative;
    background: var(--bg-light);
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
    box-shadow: 0 4px 8px var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e0e0e0;
}

.video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px var(--shadow-hover);
}

.video-card img {
    width: 100%;
    height: auto;
    display: block;
    min-height: 300px;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(211, 47, 47, 0.85);
    color: var(--white);
    padding: 20px 35px;
    border-radius: 50%;
    font-size: 56px;
    cursor: pointer;
    transition: all 0.3s;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--white);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.video-overlay:hover {
    background: rgba(211, 47, 47, 0.95);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
    padding: 25px;
}

.video-info h3 {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 1.3em;
    font-weight: bold;
}

.video-info p {
    color: var(--text-light);
    line-height: 1.6;
}

/* 内容区域 */
.content-section {
    margin: 40px 0;
    padding: 30px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.content-section h1 {
    color: var(--primary-color);
    font-size: 2em;
    margin-bottom: 20px;
    font-weight: bold;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
}

.content-section h2 {
    color: var(--primary-color);
    font-size: 1.8em;
    margin-bottom: 20px;
    font-weight: bold;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
}

.content-section h3 {
    color: var(--secondary-color);
    font-size: 1.4em;
    margin: 25px 0 15px;
    font-weight: bold;
}

.content-section p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 16px;
}

.intro-text {
    font-size: 1.1em;
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 20px;
}

.content-section ul, .content-section ol {
    margin: 15px 0;
    padding-left: 30px;
}

.content-section li {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 8px;
}

.content-section a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.content-section a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* 专业术语高亮 */
.term {
    color: var(--primary-color);
    font-weight: bold;
    background-color: var(--light-red);
    padding: 2px 6px;
    border-radius: 3px;
}

/* 图片优化 */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.image-wrapper {
    margin: 20px 0;
    text-align: center;
}

.image-wrapper img {
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow);
    border: 1px solid #e0e0e0;
}

/* 面包屑导航 */
.breadcrumb {
    padding: 15px 0;
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 20px;
}

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

.breadcrumb a:hover {
    text-decoration: underline;
}

/* 页脚 */
footer {
    background: linear-gradient(135deg, var(--dark-red), var(--primary-color));
    color: var(--white);
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
}

footer p {
    margin: 10px 0;
}

footer a {
    color: var(--light-red);
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: var(--white);
    text-decoration: underline;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8em;
    }

    .hero p {
        font-size: 1em;
    }

    nav {
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        gap: 15px;
        justify-content: center;
        font-size: 14px;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .content-section {
        padding: 20px;
    }

    .content-section h1 {
        font-size: 1.6em;
    }

    .content-section h2 {
        font-size: 1.5em;
    }

    .content-section h3 {
        font-size: 1.2em;
    }

    .keywords-section {
        padding: 30px 15px;
    }

    .container {
        padding: 15px;
    }

    .video-overlay {
        font-size: 40px;
        width: 60px;
        height: 60px;
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5em;
    }

    .card-content {
        padding: 15px;
    }

    .video-overlay {
        font-size: 36px;
        width: 50px;
        height: 50px;
        padding: 8px 15px;
    }

    .content-section {
        padding: 15px;
    }

    .content-section h1 {
        font-size: 1.4em;
    }

    .content-section h2 {
        font-size: 1.3em;
    }

    .content-section h3 {
        font-size: 1.1em;
    }

    body {
        font-size: 14px;
    }
}

/* 加载优化 */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy-load.loaded {
    opacity: 1;
}

/* 性能优化 - 减少重绘 */
.card, .video-card, .content-section {
    will-change: transform;
}

/* 可访问性优化 */
a:focus, button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 打印样式 */
@media print {
    header, footer, .video-card, .nav-links {
        display: none;
    }
    
    .content-section {
        box-shadow: none;
        border: none;
    }
}

