/* ===== 全局重置与基础 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

body.dark-mode {
    background: #1a1a2e;
    color: #e0e0e0;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* ===== 头部导航 ===== */
header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
}

body.dark-mode header {
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #f7971e, #ffd200);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    transition: transform 0.3s ease;
}

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

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav ul li a {
    color: #fff;
    font-weight: 500;
    transition: color 0.3s ease, border-color 0.3s ease;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
}

nav ul li a:hover {
    color: #ffd200;
    border-bottom-color: #ffd200;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    transition: transform 0.3s ease;
}

.hamburger:hover {
    transform: scale(1.1);
}

.hamburger span {
    width: 30px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: #1a1a2e;
    padding: 20px;
    z-index: 999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.3s ease;
}

body.dark-mode .mobile-nav {
    background: #0f0f1a;
}

.mobile-nav.active {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-nav ul {
    list-style: none;
}

.mobile-nav ul li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease;
}

.mobile-nav ul li:hover {
    background: rgba(255, 210, 0, 0.1);
}

.mobile-nav ul li a {
    color: #fff;
    display: block;
}

.dark-toggle {
    background: none;
    border: 2px solid #ffd200;
    color: #ffd200;
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.dark-toggle:hover {
    background: #ffd200;
    color: #1a1a2e;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 210, 0, 0.3);
}

/* ===== 面包屑 ===== */
.breadcrumb {
    padding: 15px 0;
    background: #f0f0f0;
    transition: background 0.3s ease;
}

body.dark-mode .breadcrumb {
    background: #111;
    color: #ccc;
}

.breadcrumb a {
    color: #f7971e;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #ffd200;
}

/* ===== Hero 区域 ===== */
.hero {
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    color: #fff;
    padding: 100px 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, 210, 0, 0.1) 0%, transparent 70%);
    animation: heroGlow 8s ease-in-out infinite;
}

@keyframes heroGlow {
    0%,
    100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(30px, 30px);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 52px;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #f7971e, #ffd200);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero p {
    font-size: 20px;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
    animation: fadeInUp 1.2s ease;
}

.hero .btn-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1.4s ease;
}

.hero .btn {
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 18px;
    transition: all 0.3s ease;
    display: inline-block;
}

.hero .btn-primary {
    background: linear-gradient(135deg, #f7971e, #ffd200);
    color: #1a1a2e;
    box-shadow: 0 8px 25px rgba(255, 210, 0, 0.3);
}

.hero .btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(255, 210, 0, 0.4);
}

.hero .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
}

.hero .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px) scale(1.02);
}

/* ===== Banner 轮播 ===== */
.banner-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.slide {
    display: none;
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.slide.active {
    display: block;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 30px;
}

.slider-dots span {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dots span:hover {
    background: rgba(255, 210, 0, 0.6);
    transform: scale(1.2);
}

.slider-dots span.active {
    background: #ffd200;
    transform: scale(1.2);
}

/* ===== 通用章节 ===== */
section {
    padding: 80px 0;
    transition: background 0.3s ease;
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #f7971e, #ffd200);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.6s ease;
}

.section-subtitle {
    text-align: center;
    font-size: 18px;
    color: #666;
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    transition: color 0.3s ease;
}

body.dark-mode .section-subtitle {
    color: #aaa;
}

/* ===== 网格布局 ===== */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

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

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

/* ===== 卡片样式 ===== */
.card {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

body.dark-mode .card {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.05);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 210, 0, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.card-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.card:hover .card-icon {
    transform: rotate(5deg) scale(1.1);
}

.card h3 {
    font-size: 22px;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.card:hover h3 {
    color: #f7971e;
}

.card p {
    color: #666;
    transition: color 0.3s ease;
}

body.dark-mode .card p {
    color: #bbb;
}

/* ===== 毛玻璃效果 ===== */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark-mode .glass {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

/* ===== 统计数据 ===== */
.stat-item {
    text-align: center;
    padding: 30px;
    transition: transform 0.3s ease;
}

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

.stat-number {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, #f7971e, #ffd200);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform 0.3s ease;
}

.stat-label {
    font-size: 18px;
    margin-top: 10px;
    color: #666;
    transition: color 0.3s ease;
}

body.dark-mode .stat-label {
    color: #aaa;
}

/* ===== 用户评价 ===== */
.testimonial-card {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: all 0.3s ease;
}

body.dark-mode .testimonial-card {
    background: rgba(255, 255, 255, 0.05);
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.testimonial-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

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

.testimonial-card p {
    font-style: italic;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.testimonial-card .name {
    font-weight: 700;
    transition: color 0.3s ease;
}

.testimonial-card:hover .name {
    color: #f7971e;
}

/* ===== 新闻网格 ===== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

body.dark-mode .news-card {
    background: rgba(255, 255, 255, 0.05);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover img {
    transform: scale(1.05);
}

.news-card .content {
    padding: 20px;
}

.news-card h4 {
    font-size: 18px;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.news-card:hover h4 {
    color: #f7971e;
}

.news-card .date {
    color: #999;
    font-size: 14px;
}

/* ===== FAQ ===== */
.faq-item {
    background: #fff;
    border-radius: 15px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

body.dark-mode .faq-item {
    background: rgba(255, 255, 255, 0.05);
}

.faq-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.faq-question {
    padding: 20px 25px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: rgba(255, 210, 0, 0.05);
}

.faq-question .arrow {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question .arrow {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    padding: 0 25px;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 0 25px 20px;
}

/* ===== 使用教程 ===== */
.howto-steps {
    counter-reset: step;
}

.howto-step {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

body.dark-mode .howto-step {
    background: rgba(255, 255, 255, 0.05);
}

.howto-step:hover {
    transform: translateX(10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.howto-step::before {
    counter-increment: step;
    content: counter(step);
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #f7971e, #ffd200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #1a1a2e;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.howto-step:hover::before {
    transform: scale(1.1);
}

/* ===== 联系信息 ===== */
.contact-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.contact-item {
    text-align: center;
    padding: 30px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

body.dark-mode .contact-item {
    background: rgba(255, 255, 255, 0.05);
}

.contact-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.contact-item h4 {
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.contact-item:hover h4 {
    color: #f7971e;
}

.contact-item p {
    color: #666;
    transition: color 0.3s ease;
}

body.dark-mode .contact-item p {
    color: #bbb;
}

/* ===== 搜索入口 ===== */
.search-entry {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 20px auto;
}

.search-entry input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 30px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.search-entry input:focus {
    border-color: #f7971e;
    box-shadow: 0 0 20px rgba(247, 151, 30, 0.2);
}

.search-entry button {
    padding: 12px 30px;
    background: linear-gradient(135deg, #f7971e, #ffd200);
    border: none;
    border-radius: 30px;
    color: #1a1a2e;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-entry button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 210, 0, 0.3);
}

/* ===== 合作伙伴 ===== */
.partner-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    align-items: center;
}

.partner-logos img {
    height: 50px;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.partner-logos img:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* ===== 相关文章 ===== */
.related-articles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.related-articles a {
    padding: 15px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

body.dark-mode .related-articles a {
    background: rgba(255, 255, 255, 0.05);
}

.related-articles a:hover {
    transform: translateX(5px);
    background: linear-gradient(135deg, #f7971e, #ffd200);
    color: #1a1a2e;
}

/* ===== 上下篇 ===== */
.prev-next {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.prev-next a {
    padding: 12px 25px;
    background: #fff;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

body.dark-mode .prev-next a {
    background: rgba(255, 255, 255, 0.05);
}

.prev-next a:hover {
    background: linear-gradient(135deg, #f7971e, #ffd200);
    color: #1a1a2e;
    transform: translateY(-2px);
}

/* ===== 页脚 ===== */
footer {
    background: #1a1a2e;
    color: #fff;
    padding: 60px 0 30px;
    transition: background 0.3s ease;
}

body.dark-mode footer {
    background: #0f0f1a;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #ffd200;
    transition: transform 0.3s ease;
}

.footer-col:hover h4 {
    transform: translateX(5px);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #ccc;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-col ul li a:hover {
    color: #ffd200;
    transform: translateX(5px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.footer-bottom a {
    color: #ffd200;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: #fff;
}

/* ===== 回到顶部 ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f7971e, #ffd200);
    border: none;
    border-radius: 50%;
    color: #1a1a2e;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 210, 0, 0.3);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: all 0.3s ease;
}

.back-to-top:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 12px 35px rgba(255, 210, 0, 0.4);
}

.back-to-top.visible {
    display: flex;
}

/* ===== 滚动动画（通用） ===== */
@media (prefers-reduced-motion: no-preference) {
    section {
        opacity: 0;
        transform: translateY(20px);
        animation: sectionFadeIn 0.8s ease forwards;
    }

    @keyframes sectionFadeIn {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    section:nth-child(2) {
        animation-delay: 0.1s;
    }
    section:nth-child(3) {
        animation-delay: 0.2s;
    }
    section:nth-child(4) {
        animation-delay: 0.3s;
    }
    section:nth-child(5) {
        animation-delay: 0.4s;
    }
    section:nth-child(6) {
        animation-delay: 0.5s;
    }
    section:nth-child(7) {
        animation-delay: 0.6s;
    }
    section:nth-child(8) {
        animation-delay: 0.7s;
    }
    section:nth-child(9) {
        animation-delay: 0.8s;
    }
    section:nth-child(10) {
        animation-delay: 0.9s;
    }
    section:nth-child(11) {
        animation-delay: 1s;
    }
    section:nth-child(12) {
        animation-delay: 1.1s;
    }
    section:nth-child(13) {
        animation-delay: 1.2s;
    }
    section:nth-child(14) {
        animation-delay: 1.3s;
    }
    section:nth-child(15) {
        animation-delay: 1.4s;
    }
}

/* ===== 响应式布局 ===== */
@media (max-width: 768px) {
    nav ul {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .footer-grid,
    .contact-info,
    .news-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

    .section-title {
        font-size: 28px;
    }

    .stat-number {
        font-size: 32px;
    }

    .related-articles {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 60px 0;
    }

    section {
        padding: 50px 0;
    }

    .card {
        padding: 20px;
    }

    .footer-grid {
        gap: 20px;
    }

    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 18px;
        bottom: 20px;
        right: 20px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 42px;
    }

    .section-title {
        font-size: 32px;
    }
}

/* ===== 暗色模式增强 ===== */
body.dark-mode .hero {
    background: linear-gradient(135deg, #0f0f1a, #1a1a2e, #16213e);
}

body.dark-mode .breadcrumb a {
    color: #ffd200;
}

body.dark-mode .search-entry input {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

body.dark-mode .search-entry input:focus {
    border-color: #ffd200;
}

body.dark-mode .faq-question:hover {
    background: rgba(255, 210, 0, 0.1);
}

/* ===== 打印优化 ===== */
@media print {
    .back-to-top,
    .dark-toggle,
    .hamburger,
    .mobile-nav,
    .banner-slider {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    .card,
    .testimonial-card,
    .news-card,
    .faq-item,
    .howto-step,
    .contact-item {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}