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

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #f8f9fa;
    color: #333;
    transition: background 0.3s, color 0.3s;
    overflow-x: hidden;
    line-height: 1.6;
}

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

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

ul {
    list-style: none;
}

img {
    display: block;
    max-width: 100%;
    border-radius: 12px;
}

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

/* 按钮通用样式 */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    background: linear-gradient(135deg, #e94560, #0f3460);
    color: #fff;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
}

.btn-outline:hover {
    background: #fff;
    color: #0f3460;
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

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

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 50px;
    position: relative;
    font-weight: 700;
}

.section-title:after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #e94560;
    margin: 15px auto 0;
    border-radius: 2px;
}

/* 卡片样式 */
.card {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.85);
}

body.dark .card {
    background: rgba(22, 33, 62, 0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

body.dark .card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

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

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

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

/* 文本工具 */
.text-center {
    text-align: center;
}

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

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

/* 滚动动画 */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s, transform 0.6s;
}

.fade-up.show {
    opacity: 1;
    transform: translateY(0);
}

/* Hero 区域 */
.hero {
    background: linear-gradient(135deg, #0f3460 0%, #533483 30%, #e94560 100%);
    color: #fff;
    padding: 120px 0 80px;
    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: heroPulse 8s infinite;
}

.hero .container {
    position: relative;
    z-index: 2;
}

@keyframes heroPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.hero h1 {
    font-size: 3rem;
    line-height: 1.3;
    margin-bottom: 20px;
    font-weight: 800;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    opacity: 0.9;
    margin-bottom: 30px;
}

.hero .btn {
    margin-right: 15px;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 52, 96, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    transition: background 0.3s;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar .logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar .logo svg {
    width: 40px;
    height: 40px;
}

.nav-links {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: #e94560;
}

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

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

/* 搜索框 */
.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    padding: 5px 15px;
    margin-left: 20px;
}

.search-box input {
    background: transparent;
    border: none;
    color: #fff;
    outline: none;
    padding: 8px 0;
    width: 150px;
    font-size: 0.9rem;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-box button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1.1rem;
}

/* 暗黑模式切换 */
.dark-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    margin-left: 15px;
    transition: transform 0.3s;
}

.dark-toggle:hover {
    transform: rotate(15deg);
}

/* 移动菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    background: none;
    border: none;
    padding: 5px;
}

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

/* 移动菜单 */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(15, 52, 96, 0.98);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 25px;
    font-size: 1.3rem;
    color: #fff;
    backdrop-filter: blur(10px);
}

.mobile-menu a {
    color: #fff;
    transition: color 0.3s;
}

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

.mobile-menu .close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    color: #fff;
}

/* 面包屑导航 */
.breadcrumb {
    padding: 15px 0;
    background: #f0f0f0;
    font-size: 0.9rem;
}

body.dark .breadcrumb {
    background: #0f3460;
}

.breadcrumb a {
    color: #e94560;
}

.breadcrumb span {
    color: #888;
}

body.dark .breadcrumb span {
    color: #aaa;
}

/* Banner 轮播 */
.banner-slider {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    margin-top: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.banner-slider .slides {
    display: flex;
    transition: transform 0.5s ease;
}

.banner-slider .slide {
    min-width: 100%;
    padding: 60px;
    background: linear-gradient(135deg, #16213e, #0f3460);
    color: #fff;
    text-align: center;
}

.banner-slider .slide h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.banner-slider .slide p {
    max-width: 600px;
    margin: 0 auto 20px;
    opacity: 0.9;
}

.banner-slider .dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 20px 0;
}

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

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

/* 页脚 */
.footer {
    background: #0f3460;
    color: rgba(255, 255, 255, 0.85);
    padding: 60px 0 30px;
}

.footer .grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.footer h4 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer a {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer a:hover {
    color: #e94560;
}

.footer .copyright {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    line-height: 1.8;
}

.footer .copyright a {
    display: inline;
    margin: 0 5px;
}

.footer .qr {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 15px;
}

.footer .qr svg {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    transition: transform 0.3s;
}

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

/* 返回顶部按钮 */
.back-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e94560;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
    border: none;
}

.back-top.show {
    opacity: 1;
    visibility: visible;
}

.back-top:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
}

/* FAQ 组件 */
.faq-item {
    border-bottom: 1px solid #ddd;
    padding: 15px 0;
}

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

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    padding: 10px 0;
    transition: color 0.3s;
}

.faq-question:hover {
    color: #e94560;
}

.faq-question .icon {
    transition: transform 0.3s;
    font-size: 1.2rem;
    font-weight: 700;
}

.faq-item.open .faq-question .icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 0 15px;
    display: none;
    line-height: 1.8;
    color: #666;
    font-size: 0.95rem;
}

body.dark .faq-answer {
    color: #aaa;
}

.faq-item.open .faq-answer {
    display: block;
}

/* HowTo 步骤列表 */
.howto-steps {
    list-style: decimal;
    padding-left: 20px;
    line-height: 2;
    font-size: 1rem;
}

.howto-steps li {
    margin-bottom: 10px;
}

/* 客户评价卡片 */
.testimonial-card {
    text-align: center;
    padding: 30px 20px;
}

.testimonial-card .avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #e94560, #0f3460);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.8rem;
    font-weight: 700;
    transition: transform 0.3s;
}

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

.testimonial-card p {
    font-style: italic;
    line-height: 1.7;
    margin-bottom: 15px;
}

.testimonial-card h4 {
    color: #e94560;
}

/* 新闻卡片 */
.news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card .date {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 8px;
}

body.dark .news-card .date {
    color: #aaa;
}

.news-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.news-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    flex: 1;
}

.news-card .btn {
    align-self: flex-start;
    margin-top: 15px;
    padding: 8px 20px;
    font-size: 0.9rem;
}

/* 合作伙伴 */
.partners {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.partners a {
    padding: 10px 20px;
    background: rgba(233, 69, 96, 0.1);
    border-radius: 10px;
    transition: background 0.3s, transform 0.3s;
}

.partners a:hover {
    background: rgba(233, 69, 96, 0.2);
    transform: translateY(-2px);
}

body.dark .partners a {
    background: rgba(233, 69, 96, 0.2);
}

/* 联系信息 */
.contact-info {
    line-height: 2;
    font-size: 1rem;
}

.contact-info strong {
    color: #e94560;
}

/* 产品卡片图片 */
.card img {
    border-radius: 12px;
    margin-bottom: 15px;
    transition: transform 0.3s;
}

.card:hover img {
    transform: scale(1.02);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero h1 {
        font-size: 2.4rem;
    }
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links,
    .search-box,
    .dark-toggle {
        display: none;
    }
    .menu-toggle {
        display: flex;
    }
    .hero {
        padding: 100px 0 60px;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    .section {
        padding: 50px 0;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .footer .grid-4 {
        grid-template-columns: 1fr 1fr;
    }
    .banner-slider .slide {
        padding: 40px 20px;
    }
    .banner-slider .slide h2 {
        font-size: 1.5rem;
    }
    .back-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem;
    }
    .hero p {
        font-size: 0.95rem;
    }
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    .container {
        padding: 0 15px;
    }
    .section-title {
        font-size: 1.5rem;
    }
    .footer .grid-4 {
        grid-template-columns: 1fr;
    }
    .banner-slider .slide {
        padding: 30px 15px;
    }
    .banner-slider .slide h2 {
        font-size: 1.2rem;
    }
    .card {
        padding: 20px;
    }
}

/* 暗黑模式下的链接颜色 */
body.dark .breadcrumb a {
    color: #ff6b81;
}

/* 导航栏在暗黑模式下的背景 */
body.dark .navbar {
    background: rgba(26, 26, 46, 0.95);
}

/* 搜索框在暗黑模式下的微调 */
body.dark .search-box {
    background: rgba(255, 255, 255, 0.1);
}

/* 移动菜单在暗黑模式下的背景 */
body.dark .mobile-menu {
    background: rgba(26, 26, 46, 0.98);
}

/* 页脚在暗黑模式下的微调 */
body.dark .footer {
    background: #0a0a1a;
}

/* 确保所有图片在暗黑模式下不失真 */
body.dark img {
    filter: brightness(0.9);
}

/* 卡片内标题样式 */
.card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #0f3460;
}

body.dark .card h3 {
    color: #e94560;
}

.card h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

/* 优势图标动画 */
.card span[style*="font-size:2.5rem"] {
    display: inline-block;
    transition: transform 0.3s;
}

.card:hover span[style*="font-size:2.5rem"] {
    transform: scale(1.2);
}

/* 网站地图链接样式 */
.grid-4 a {
    transition: color 0.3s;
}

.grid-4 a:hover {
    color: #e94560;
}

/* 新闻锚点隐藏区域 */
section[style*="display:none"] {
    display: none;
}

/* 确保所有区块有合适的间距 */
.section + .section {
    padding-top: 0;
}

/* 品牌介绍图片的圆角 */
.grid-2 img {
    border-radius: 20px;
    width: 100%;
    height: auto;
}

/* 团队介绍头像微调 */
.testimonial-card .avatar + h4 {
    margin-top: 10px;
}

/* 应用行业卡片 */
.grid-4 .card.text-center {
    font-size: 1.2rem;
    font-weight: 600;
    padding: 40px 20px;
}

/* 友情链接样式优化 */
.partners a {
    font-weight: 500;
}

/* 在线留言标签样式 */
.contact-info + .card span {
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.contact-info + .card span:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.3);
}

/* 确保所有按钮在暗黑模式下可见 */
body.dark .btn {
    background: linear-gradient(135deg, #e94560, #533483);
}

body.dark .btn-outline {
    background: transparent;
    border-color: #fff;
    color: #fff;
}

body.dark .btn-outline:hover {
    background: #fff;
    color: #1a1a2e;
}

/* 滚动条美化（可选） */
::-webkit-scrollbar {
    width: 8px;
}

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

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

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

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

/* 动画性能优化 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* 确保所有内容在移动端不会溢出 */
img, svg, video {
    max-width: 100%;
    height: auto;
}

/* 表格和列表在卡片内的样式 */
.card ul, .card ol {
    padding-left: 20px;
}

.card li {
    margin-bottom: 5px;
}

/* 确保FAQ答案在暗黑模式下可读 */
body.dark .faq-answer {
    color: #ccc;
}

/* 确保HowTo步骤在暗黑模式下可读 */
body.dark .howto-steps {
    color: #ddd;
}

/* 新闻卡片在暗黑模式下的日期颜色 */
body.dark .news-card .date {
    color: #999;
}