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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1a1a2e;
    background: #f8f9fa;
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

body.dark {
    background: #0f0f1a;
    color: #e0e0e0;
}

a {
    color: #f59e0b;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.8;
}

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

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

/* ===== 按钮 ===== */
.btn {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    padding: 12px 28px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

/* ===== 卡片 ===== */
.card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.dark .card {
    background: rgba(30, 30, 50, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
}

/* ===== 区块通用 ===== */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title p {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.dark .section-title p {
    color: #aaa;
}

/* ===== 网格 ===== */
.grid {
    display: grid;
    gap: 30px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* ===== 工具类 ===== */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .section {
        padding: 50px 0;
    }
    .section-title h2 {
        font-size: 28px;
    }
    .container {
        padding: 0 15px;
    }
}

/* ===== 导航 ===== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background 0.3s ease;
}

.dark nav {
    background: rgba(15, 15, 26, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
}

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

.nav-links a {
    color: #333;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.dark .nav-links a {
    color: #ccc;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #f59e0b;
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}

.menu-toggle span {
    width: 28px;
    height: 3px;
    background: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.dark .menu-toggle span {
    background: #ccc;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 30px;
    z-index: 999;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dark .mobile-menu {
    background: rgba(15, 15, 26, 0.98);
}

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

.mobile-menu a {
    display: block;
    padding: 12px 0;
    font-size: 18px;
    color: #333;
    border-bottom: 1px solid #eee;
    transition: color 0.3s ease;
}

.dark .mobile-menu a {
    color: #ccc;
    border-bottom-color: #333;
}

.mobile-menu a:hover {
    color: #f59e0b;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .menu-toggle {
        display: flex;
    }
}

/* ===== Hero 区域 ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(245, 158, 11, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
    animation: heroGlow 8s ease-in-out infinite;
    pointer-events: none;
}

.dark .hero {
    background: linear-gradient(135deg, #0a0a14 0%, #111122 50%, #0a1a30 100%);
}

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

.hero-content {
    position: relative;
    z-index: 1;
    color: #fff;
    max-width: 700px;
}

.hero-content h1 {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-content h1 span {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-slider {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 2;
}

.hero-slider .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.hero-slider .dot.active {
    background: #f59e0b;
    transform: scale(1.2);
}

.hero-slider .dot:hover {
    background: rgba(245, 158, 11, 0.6);
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 32px;
    }
    .hero-content p {
        font-size: 16px;
    }
}

/* ===== 各区块背景 ===== */
.about-intro {
    background: linear-gradient(135deg, #fff 0%, #fef3cd 100%);
}

.dark .about-intro {
    background: linear-gradient(135deg, #1a1a2e 0%, #2a1a0e 100%);
}

.brand-story {
    background: #fff;
}

.dark .brand-story {
    background: #161625;
}

.culture-cards {
    text-align: center;
}

.culture-cards .card {
    padding: 40px 20px;
}

.culture-cards .card svg {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

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

.products {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
}

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

.product-advantages {
    background: #fff;
}

.dark .product-advantages {
    background: #161625;
}

.services {
    background: linear-gradient(135deg, #fef3cd 0%, #fff 100%);
}

.dark .services {
    background: linear-gradient(135deg, #2a1a0e 0%, #1a1a2e 100%);
}

.solutions {
    background: #fff;
}

.dark .solutions {
    background: #161625;
}

.scenarios {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
}

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

.stats {
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
    color: #fff;
    text-align: center;
}

.stats .grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.stats .card {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: #fff;
}

.stats .card h3 {
    font-size: 40px;
    font-weight: 800;
    color: #f59e0b;
}

.cases {
    background: #fff;
}

.dark .cases {
    background: #161625;
}

.clients {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
}

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

.testimonials {
    background: #fff;
}

.dark .testimonials {
    background: #161625;
}

.testimonials .card {
    text-align: center;
    padding: 40px 20px;
}

.testimonials .card .avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #fff;
    font-weight: 700;
    transition: transform 0.3s ease;
}

.testimonials .card:hover .avatar {
    transform: scale(1.1);
}

.news {
    background: linear-gradient(135deg, #fef3cd 0%, #fff 100%);
}

.dark .news {
    background: linear-gradient(135deg, #2a1a0e 0%, #1a1a2e 100%);
}

.articles {
    background: #fff;
}

.dark .articles {
    background: #161625;
}

.faq {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
}

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

.faq-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    cursor: pointer;
    transition: background 0.3s ease;
}

.dark .faq-item {
    border-bottom-color: #333;
}

.faq-item:hover {
    background: rgba(245, 158, 11, 0.05);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 18px;
}

.faq-question svg {
    transition: transform 0.3s ease;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

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

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

.faq-item.active .faq-answer {
    max-height: 300px;
    padding-top: 15px;
}

.howto {
    background: #fff;
}

.dark .howto {
    background: #161625;
}

.howto-step {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.howto-step .step-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.howto-step:hover .step-num {
    transform: scale(1.15);
}

.contact {
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
    color: #fff;
}

.contact .card {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
}

.contact .card svg {
    width: 30px;
    height: 30px;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.contact .card:hover svg {
    transform: scale(1.2);
}

.sitemap {
    background: #fff;
}

.dark .sitemap {
    background: #161625;
}

.sitemap .grid a {
    display: block;
    padding: 8px 0;
    color: #555;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.dark .sitemap .grid a {
    color: #aaa;
}

.sitemap .grid a:hover {
    color: #f59e0b;
    padding-left: 5px;
}

.friends {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    padding: 40px 0;
}

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

.friends .flex-center {
    flex-wrap: wrap;
    gap: 20px;
}

.friends a {
    color: #888;
    font-size: 14px;
    transition: color 0.3s ease;
}

.dark .friends a {
    color: #666;
}

.friends a:hover {
    color: #f59e0b;
}

/* ===== 页脚 ===== */
.footer {
    background: #1a1a2e;
    color: #ccc;
    padding: 40px 0;
    text-align: center;
}

.footer p {
    font-size: 14px;
    margin: 5px 0;
}

.footer a {
    color: #f59e0b;
    transition: opacity 0.3s ease;
}

.footer a:hover {
    opacity: 0.8;
}

/* ===== 返回顶部 ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 100;
    pointer-events: none;
}

.back-to-top.show {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    transform: scale(1.1);
}

/* ===== 暗黑模式切换 ===== */
.dark-toggle {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #333;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 100;
    transition: background 0.3s ease, transform 0.3s ease;
}

.dark .dark-toggle {
    background: #f59e0b;
}

.dark-toggle:hover {
    transform: scale(1.1);
}

/* ===== 搜索模态框 ===== */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.search-modal.active {
    display: flex;
}

.search-modal input {
    width: 80%;
    max-width: 500px;
    padding: 20px;
    font-size: 20px;
    border-radius: 30px;
    border: none;
    outline: none;
    background: #fff;
    color: #333;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s ease;
}

.search-modal input:focus {
    box-shadow: 0 10px 40px rgba(245, 158, 11, 0.3);
}

/* ===== 图片懒加载 ===== */
.lazy-img {
    opacity: 0;
    transition: opacity 0.5s ease;
}

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

/* ===== 滚动动画 ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 卡片内SVG图标统一 ===== */
.card svg {
    transition: transform 0.3s ease;
}

.card:hover svg {
    transform: scale(1.1);
}

/* ===== 产品卡片图标样式 ===== */
.products .card svg,
.scenarios .card svg {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
}

.services .card svg {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
}

/* ===== 新闻卡片链接 ===== */
.articles .card a {
    display: inline-block;
    margin-top: 10px;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.articles .card a:hover {
    transform: translateX(5px);
}

/* ===== 友情链接区域 ===== */
.friends a:first-child {
    font-weight: 600;
    color: #666;
}

.dark .friends a:first-child {
    color: #999;
}

/* ===== 页脚链接分隔 ===== */
.footer p a {
    margin: 0 5px;
}

/* ===== 响应式微调 ===== */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 26px;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }
    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    .dark-toggle {
        bottom: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    .search-modal input {
        width: 90%;
        padding: 15px;
        font-size: 16px;
    }
}

/* ===== 防止滚动条跳动 ===== */
html {
    scroll-behavior: smooth;
}

/* ===== 选中高亮 ===== */
::selection {
    background: #f59e0b;
    color: #fff;
}

/* ===== 滚动条样式 ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dark ::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: #f59e0b;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d97706;
}