/* 51吃瓜 - 完整样式表 */
/* 全局重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.8;
    transition: background 0.4s ease, color 0.4s ease;
}

/* 暗色模式 */
.dark-mode {
    background: #1a1a2e;
    color: #e0e0e0;
}
.dark-mode .header,
.dark-mode .footer,
.dark-mode .card,
.dark-mode .article-card,
.dark-mode .faq-item,
.dark-mode .howto-step,
.dark-mode .nav-menu {
    background: #16213e;
    color: #e0e0e0;
}
.dark-mode h1,
.dark-mode h2,
.dark-mode h3,
.dark-mode h4 {
    color: #e0e0e0;
}
.dark-mode .nav-menu a {
    color: #e0e0e0;
}
.dark-mode .section-title {
    color: #e0e0e0;
}
.dark-mode .card p,
.dark-mode .about-text p,
.dark-mode .faq-answer p,
.dark-mode .howto-step .step-content p {
    color: #b0b0b0;
}
.dark-mode .about-section,
.dark-mode .faq-section,
.dark-mode .howto-section {
    background: #16213e;
}
.dark-mode .faq-item {
    border-color: #444;
}
.dark-mode .faq-question {
    background: #1e2a4a;
    color: #e0e0e0;
}
.dark-mode .faq-question:hover {
    background: #2a3a5a;
}
.dark-mode .newsletter {
    background: #1e2a4a;
}
.dark-mode .newsletter h3 {
    color: #e0e0e0;
}
.dark-mode .newsletter p {
    color: #b0b0b0;
}
.dark-mode .about-text h2 {
    color: #e0e0e0;
}
.dark-mode .howto-step .step-content h4 {
    color: #e0e0e0;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.logo {
    font-size: 28px;
    font-weight: 700;
    color: #e74c3c;
    text-decoration: none;
}
.logo span {
    color: #2c3e50;
}
.nav-menu {
    display: flex;
    gap: 25px;
    list-style: none;
}
.nav-menu a {
    text-decoration: none;
    color: #333;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}
.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #e74c3c;
    transition: width 0.3s ease;
}
.nav-menu a:hover {
    color: #e74c3c;
}
.nav-menu a:hover::after {
    width: 100%;
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #333;
    transition: transform 0.3s ease;
}
.menu-toggle:hover {
    transform: scale(1.1);
}
.dark-toggle {
    background: none;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
}
.dark-toggle:hover {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
    transform: scale(1.05);
}

/* 面包屑 */
.breadcrumb {
    padding: 15px 0;
    font-size: 14px;
    color: #999;
    max-width: 1200px;
    margin: 0 auto;
}
.breadcrumb a {
    color: #e74c3c;
    text-decoration: none;
    transition: color 0.3s ease;
}
.breadcrumb a:hover {
    text-decoration: underline;
    color: #c0392b;
}
.breadcrumb span {
    color: #999;
}

/* Hero区域 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    animation: heroGlow 6s ease-in-out infinite alternate;
}
@keyframes heroGlow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(20px, 20px); }
}
.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 800;
    position: relative;
    z-index: 1;
}
.hero p {
    font-size: 20px;
    max-width: 800px;
    margin: 0 auto 30px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}
.hero .search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
    transition: box-shadow 0.3s ease;
}
.hero .search-box:hover {
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}
.hero .search-box input {
    flex: 1;
    padding: 18px 25px;
    border: none;
    outline: none;
    font-size: 16px;
}
.hero .search-box button {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 18px 35px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}
.hero .search-box button:hover {
    background: #c0392b;
    transform: scale(1.02);
}

/* Banner轮播 */
.banner-carousel {
    position: relative;
    margin-top: 40px;
    overflow: hidden;
    border-radius: 12px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    z-index: 1;
    backdrop-filter: blur(5px);
}
.banner-slide {
    display: none;
    padding: 30px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    text-align: left;
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.banner-slide.active {
    display: block;
    animation: fadeIn 0.5s ease;
}
.banner-slide h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #fff;
}
.banner-slide p {
    font-size: 16px;
    color: rgba(255,255,255,0.9);
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 通用区块 */
.section {
    padding: 60px 0;
}
.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
    color: #2c3e50;
}
.section-title span {
    color: #e74c3c;
}

/* 网格布局 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
    animation: cardFadeIn 0.6s ease 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; }
@keyframes cardFadeIn {
    to { opacity: 1; transform: translateY(0); }
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}
.card svg {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
}
.card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #2c3e50;
}
.card p {
    font-size: 15px;
    color: #666;
    line-height: 1.7;
}

/* 关于我们 */
.about-section {
    background: #fff;
    border-radius: 12px;
    padding: 0;
}
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}
.about-content img {
    width: 100%;
    border-radius: 12px;
}
.about-text h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #2c3e50;
}
.about-text p {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.8;
}

/* 文章网格 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}
.article-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
}
.article-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}
.article-card .article-img {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    transition: transform 0.3s ease;
}
.article-card:hover .article-img {
    transform: scale(1.02);
}
.article-card .article-body {
    padding: 25px;
}
.article-card .article-body .date {
    font-size: 13px;
    color: #999;
    margin-bottom: 10px;
    display: block;
}
.article-card .article-body h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #2c3e50;
}
.article-card .article-body p {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    margin-bottom: 15px;
}
.article-card .article-body .read-more {
    color: #e74c3c;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s ease, padding-left 0.3s ease;
}
.article-card .article-body .read-more:hover {
    color: #c0392b;
    padding-left: 5px;
}

/* FAQ */
.faq-section {
    background: #fff;
}
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}
.faq-item {
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}
.faq-item.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.faq-item:hover {
    border-color: #e74c3c;
}
.faq-question {
    background: #f9f9f9;
    padding: 18px 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #2c3e50;
    transition: background 0.3s ease;
}
.faq-question:hover {
    background: #f0f0f0;
}
.faq-question .icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}
.faq-item.active .faq-question .icon {
    transform: rotate(45deg);
}
.faq-answer {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}
.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 18px 25px;
}
.faq-answer p {
    font-size: 15px;
    color: #666;
    line-height: 1.8;
}

/* How-to */
.howto-section {
    background: #f9f9f9;
}
.howto-steps {
    max-width: 800px;
    margin: 0 auto;
}
.howto-step {
    background: #fff;
    border-radius: 10px;
    padding: 25px 30px;
    margin-bottom: 15px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateX(-30px);
}
.howto-step.visible {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.howto-step:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.howto-step .step-num {
    background: #e74c3c;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}
.howto-step .step-content h4 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #2c3e50;
}
.howto-step .step-content p {
    font-size: 15px;
    color: #666;
    line-height: 1.7;
}

/* 统计区域 */
.stats-section {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}
.stat-item .stat-number {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 10px;
}
.stat-item .stat-label {
    font-size: 16px;
    opacity: 0.9;
}

/* 联系区域 */
.contact-section {
    background: #2c3e50;
    color: #fff;
}
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}
.contact-grid h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #e74c3c;
}
.contact-grid p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
    line-height: 1.6;
}

/* 邮件订阅 */
.newsletter {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    max-width: 600px;
    margin: 40px auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.newsletter:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
.newsletter h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #2c3e50;
}
.newsletter p {
    font-size: 15px;
    color: #666;
    margin-bottom: 20px;
}
.newsletter .newsletter-form {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.newsletter .newsletter-form input {
    flex: 1;
    max-width: 400px;
    padding: 14px 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s ease;
}
.newsletter .newsletter-form input:focus {
    border-color: #e74c3c;
}
.newsletter .newsletter-form button {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 14px 30px;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}
.newsletter .newsletter-form button:hover {
    background: #c0392b;
    transform: scale(1.03);
}

/* 页脚 */
.footer {
    background: #1a1a2e;
    color: #ccc;
    padding: 40px 0;
    text-align: center;
}
.footer .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}
.footer .footer-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}
.footer .footer-links a:hover {
    color: #e74c3c;
}
.footer p {
    font-size: 13px;
    opacity: 0.7;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 999;
    transition: all 0.3s ease;
}
.back-to-top:hover {
    background: #c0392b;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

/* 移动菜单遮罩 */
.mobile-menu-overlay {
    display: none;
}
.mobile-menu-overlay.active {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    animation: overlayFadeIn 0.3s ease;
}
@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 响应式 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        z-index: 1001;
        animation: slideDown 0.3s ease;
    }
    .dark-mode .nav-menu {
        background: #16213e;
    }
    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    .nav-menu.active {
        display: flex;
    }
    .menu-toggle {
        display: block;
    }
    .hero h1 {
        font-size: 32px;
    }
    .hero p {
        font-size: 16px;
    }
    .about-content {
        grid-template-columns: 1fr;
    }
    .articles-grid {
        grid-template-columns: 1fr;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .newsletter .newsletter-form {
        flex-direction: column;
    }
    .newsletter .newsletter-form input {
        max-width: 100%;
    }
    .stat-item .stat-number {
        font-size: 36px;
    }
    .section-title {
        font-size: 26px;
    }
}