/* 全局重置与变量 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #f8f9fa;
    --text: #1a1a2e;
    --primary: #1a1a2e;
    --secondary: #e94560;
    --accent: #0f3460;
    --glass: rgba(255, 255, 255, 0.7);
    --card: #ffffff;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --radius: 16px;
    --transition: 0.3s ease;
    --gradient-bg: linear-gradient(135deg, #1a1a2e, #0f3460);
    --banner-glow: rgba(233, 69, 96, 0.15);
}

.dark-mode {
    --bg: #0f0f1a;
    --text: #e0e0e0;
    --primary: #16213e;
    --glass: rgba(15, 15, 26, 0.8);
    --card: #1a1a2e;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    --gradient-bg: linear-gradient(135deg, #0f0f1a, #16213e);
    --banner-glow: rgba(233, 69, 96, 0.2);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

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

a:hover {
    color: #ff6b6b;
}

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

/* 头部导航 */
header {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s ease;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--secondary), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
    transition: all 0.3s ease;
}

.nav-links a {
    color: var(--text);
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 8px;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links a:hover::after {
    width: 60%;
}

.nav-links a:hover {
    background: var(--secondary);
    color: #fff;
}

.dark-toggle {
    background: none;
    border: 2px solid var(--text);
    color: var(--text);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: var(--glass);
}

.dark-toggle:hover {
    background: var(--text);
    color: var(--bg);
    border-color: var(--secondary);
    transform: scale(1.05);
}

.mobile-menu {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.mobile-menu:hover {
    transform: rotate(90deg);
}

/* Hero 区域 */
.hero {
    padding: 100px 0;
    text-align: center;
    background: var(--gradient-bg);
    color: #fff;
    border-radius: 0 0 40px 40px;
    position: relative;
    overflow: hidden;
    animation: gradientShift 8s ease-in-out infinite alternate;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--banner-glow) 0%, transparent 70%);
    animation: pulse 6s ease-in-out infinite;
    pointer-events: none;
}

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

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    animation: fadeInUp 1.2s ease;
}

.hero .btn {
    display: inline-block;
    background: var(--secondary);
    color: #fff;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}

.hero .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(233, 69, 96, 0.4);
    background: #ff6b6b;
}

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

/* Banner 轮播 */
.banner-carousel {
    margin-top: 40px;
    position: relative;
    z-index: 1;
}

.banner-slide {
    display: none;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.banner-slide.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.banner-slide h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.banner-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

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

.banner-dot.active {
    background: var(--secondary);
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(233, 69, 96, 0.5);
}

.banner-dot:hover {
    background: var(--secondary);
    transform: scale(1.1);
}

/* 通用 Section */
section {
    padding: 80px 0;
    opacity: 0;
    transform: translateY(30px);
    animation: sectionFadeIn 0.8s ease forwards;
}

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

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

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--secondary);
    margin: 15px auto 0;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.section-title:hover::after {
    width: 100px;
}

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

/* 卡片 */
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(233, 69, 96, 0.1), transparent);
    transition: left 0.5s ease;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--secondary);
}

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

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

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.card p {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.card:hover p {
    opacity: 1;
}

/* 关于 */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-text h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 15px;
}

.stats {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
    transition: transform 0.3s ease;
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary);
    transition: color 0.3s ease;
}

.stat-item:hover .stat-number {
    color: #ff6b6b;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* 团队 */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.team-card {
    text-align: center;
    padding: 25px;
}

.team-card svg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover svg {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 8px 20px rgba(233, 69, 96, 0.3);
}

/* 时间线 */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 40px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--secondary), var(--accent));
    opacity: 0.3;
}

.timeline-item {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    transition: transform 0.3s ease;
}

.timeline-item:hover {
    transform: translateX(10px);
}

.timeline-year {
    font-weight: 700;
    color: var(--secondary);
    min-width: 80px;
    position: relative;
}

.timeline-year::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 50%;
    width: 12px;
    height: 12px;
    background: var(--secondary);
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 10px rgba(233, 69, 96, 0.5);
}

/* 解决方案 */
.solution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

/* 案例 */
.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

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

.partner-item svg {
    width: 100px;
    height: 50px;
    opacity: 0.6;
    transition: all 0.3s ease;
    filter: grayscale(0.5);
}

.partner-item svg:hover {
    opacity: 1;
    filter: grayscale(0);
    transform: scale(1.1);
}

/* 评价 */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.testimonial-card {
    padding: 25px;
    position: relative;
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

.testimonial-card::before {
    content: '"';
    font-size: 3rem;
    color: var(--secondary);
    position: absolute;
    top: 10px;
    left: 15px;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.testimonial-card:hover::before {
    opacity: 0.6;
}

/* 新闻 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* FAQ */
.faq-item {
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.faq-question:hover {
    background: rgba(233, 69, 96, 0.1);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
    color: var(--secondary);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

/* 步骤 */
.howto-steps {
    counter-reset: step;
}

.howto-step {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: flex-start;
    transition: transform 0.3s ease;
}

.howto-step:hover {
    transform: translateX(10px);
}

.howto-step::before {
    counter-increment: step;
    content: counter(step);
    background: var(--secondary);
    color: #fff;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

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

/* 联系 */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

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

.contact-info p:hover {
    color: var(--secondary);
}

.contact-info svg {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 10px;
}

.related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.related-links a {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: var(--text);
}

.related-links a:hover {
    background: var(--secondary);
    color: #fff;
    border-color: var(--secondary);
    transform: translateY(-2px);
}

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

.breadcrumb span {
    opacity: 0.6;
}

.breadcrumb a {
    color: var(--text);
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--secondary);
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 10px;
    max-width: 400px;
    margin: 20px auto;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    background: var(--card);
    color: var(--text);
    outline: none;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 10px rgba(233, 69, 96, 0.2);
}

.search-box button {
    padding: 12px 25px;
    background: var(--secondary);
    color: #fff;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-box button:hover {
    opacity: 0.9;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination a {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
    color: var(--text);
}

.pagination a:hover {
    background: var(--secondary);
    color: #fff;
    transform: translateY(-2px);
}

/* 页脚 */
footer {
    background: var(--primary);
    color: #fff;
    padding: 60px 0 20px;
    margin-top: 80px;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary), var(--accent), var(--secondary));
}

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

.footer-grid h4 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    position: relative;
    display: inline-block;
}

.footer-grid h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--secondary);
}

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

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

.footer-grid ul li a {
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    position: relative;
    padding-left: 0;
}

.footer-grid ul li a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 40px;
    font-size: 0.9rem;
    opacity: 0.7;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: var(--secondary);
}

/* 回到顶部 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--secondary);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    z-index: 99;
    opacity: 0;
    transform: translateY(20px);
}

.back-to-top.visible {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

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

/* 响应式 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--glass);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }

    .nav-links.open {
        display: flex;
        animation: slideDown 0.3s ease;
    }

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

    .mobile-menu {
        display: block;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

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

    .about-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .stats {
        flex-direction: column;
        gap: 15px;
    }

    .section-title {
        font-size: 2rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-year::before {
        left: -10px;
    }

    .timeline-item {
        gap: 15px;
    }

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

@media (min-width: 769px) {
    .mobile-menu {
        display: none;
    }

    .nav-links {
        display: flex !important;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 4px;
}

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

/* 焦点样式 */
:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

/* 选中文本样式 */
::selection {
    background: var(--secondary);
    color: #fff;
}

/* 暗黑模式下的额外调整 */
.dark-mode .card {
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .faq-item {
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .search-box input {
    border-color: rgba(255, 255, 255, 0.2);
}

.dark-mode .pagination a {
    border-color: rgba(255, 255, 255, 0.2);
}

.dark-mode .related-links a {
    border-color: rgba(255, 255, 255, 0.2);
}