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

:root {
    --bg: #f8f9fa;
    --text: #1a1a2e;
    --card-bg: #ffffff;
    --nav-bg: rgba(26, 26, 46, 0.95);
    --primary: #f5c518;
    --accent: #e94560;
    --dark-bg: #0f0f23;
    --dark-text: #e0e0e0;
    --dark-card: #1a1a2e;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --radius: 16px;
    --gradient-banner: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.08);
}

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

body.dark-mode {
    --bg: var(--dark-bg);
    --text: var(--dark-text);
    --card-bg: var(--dark-card);
    --nav-bg: rgba(15, 15, 35, 0.98);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.05);
}

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

a:hover {
    color: var(--accent);
}

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

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.8rem;
}

h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 12px auto 0;
    border-radius: 2px;
}

h3 {
    font-size: 1.4rem;
}

p {
    margin-bottom: 1rem;
}

section {
    padding: 80px 0;
}

.btn-primary {
    display: inline-block;
    padding: 12px 32px;
    background: linear-gradient(135deg, var(--primary), #e6b800);
    color: #1a1a2e;
    font-weight: 700;
    border-radius: 50px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245, 197, 24, 0.4);
    color: #1a1a2e;
}

/* 导航 */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 28px;
}

.nav-links a {
    color: #fff;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s, color 0.3s;
}

.nav-links a.active,
.nav-links a:hover {
    border-bottom-color: var(--primary);
    color: var(--primary);
}

.nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: background 0.3s;
}

.nav-actions button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-bar {
    display: none;
    padding: 12px 24px;
    background: rgba(26, 26, 46, 0.98);
    max-width: 1200px;
    margin: 0 auto;
}

.search-bar.active {
    display: flex;
    gap: 12px;
}

.search-bar input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #444;
    border-radius: 8px;
    background: #2d2d44;
    color: #fff;
    font-size: 1rem;
}

.search-bar button {
    padding: 10px 24px;
    background: var(--primary);
    color: #1a1a2e;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

.menu-toggle {
    display: none;
}

/* Hero 渐变Banner */
.hero {
    padding-top: 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-banner);
    position: relative;
    overflow: hidden;
}

.hero-banner {
    width: 100%;
    position: relative;
}

.slide {
    display: none;
    padding: 60px 20px;
    text-align: center;
}

.slide.active {
    display: block;
    animation: fadeIn 0.6s ease;
}

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

.slide-content {
    max-width: 800px;
    margin: 0 auto;
    color: #fff;
}

.slide-content h1,
.slide-content h2 {
    color: #fff;
    font-size: 3.2rem;
    margin-bottom: 0.5rem;
}

.slide-content .highlight {
    color: var(--primary);
}

.slide-content p {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat .num {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.stat span {
    font-size: 1.2rem;
    color: var(--primary);
}

.stat p {
    color: #ccc;
    font-size: 0.9rem;
    margin-top: 4px;
}

.banner-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}

.banner-controls button {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 1.8rem;
    padding: 8px 18px;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.3s;
}

.banner-controls button:hover {
    background: var(--primary);
    color: #1a1a2e;
}

.dots {
    display: flex;
    gap: 8px;
}

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

.dot.active {
    background: var(--primary);
}

/* About */
.about {
    background: var(--card-bg);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.about-card {
    background: var(--bg);
    padding: 36px 24px;
    border-radius: var(--radius);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: var(--shadow);
}

.about-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.about-card svg {
    margin-bottom: 16px;
}

/* Products 毛玻璃效果 */
.products {
    background: var(--bg);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--card-bg);
    padding: 32px 20px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.product-card:hover {
    transform: scale(1.03);
}

.product-card svg {
    margin-bottom: 16px;
}

/* Solutions 毛玻璃 */
.solutions {
    background: var(--gradient-banner);
    color: #fff;
}

.solutions h2 {
    color: #fff;
}

.solutions h2::after {
    background: var(--primary);
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.solution-item {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 28px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    transition: transform 0.3s;
}

.solution-item:hover {
    transform: translateY(-4px);
}

.solution-item h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* Cases */
.cases {
    background: var(--card-bg);
}

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

.case-card {
    background: var(--bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.case-card:hover {
    transform: translateY(-4px);
}

.case-card h3,
.case-card p {
    padding: 0 20px 12px;
}

.case-card h3 {
    padding-top: 16px;
}

/* Partners */
.partners {
    background: var(--bg);
}

.partners-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.partners-grid svg {
    transition: transform 0.3s;
}

.partners-grid svg:hover {
    transform: scale(1.05);
}

/* Testimonials */
.testimonials {
    background: var(--card-bg);
}

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

blockquote {
    background: var(--bg);
    padding: 28px 24px;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow);
}

blockquote p {
    font-style: italic;
}

blockquote footer {
    font-weight: 600;
    color: var(--primary);
    margin-top: 12px;
}

/* News */
.news {
    background: var(--bg);
}

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

.news-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.news-card:hover {
    transform: translateY(-4px);
}

.news-card h3,
.news-card p,
.news-card time {
    padding: 0 20px 12px;
}

.news-card h3 {
    padding-top: 16px;
}

.news-card time {
    display: block;
    font-size: 0.85rem;
    color: #888;
}

.related-articles {
    margin-top: 40px;
    padding: 24px;
    background: var(--card-bg);
    border-radius: var(--radius);
}

.related-articles h3 {
    margin-bottom: 12px;
}

.related-articles ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.related-articles a {
    color: var(--text);
}

.related-articles a:hover {
    color: var(--primary);
}

.pagination {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
}

.pagination a {
    padding: 10px 24px;
    background: var(--card-bg);
    border-radius: 50px;
    font-weight: 600;
    box-shadow: var(--shadow);
}

/* FAQ */
.faq {
    background: var(--card-bg);
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #444;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    text-align: left;
}

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

.faq-question[aria-expanded="true"] .icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-answer p {
    padding: 0 0 16px;
}

/* HowTo */
.howto {
    background: var(--bg);
}

.howto-steps {
    max-width: 600px;
    margin: 0 auto;
    list-style: decimal;
    padding-left: 24px;
}

.howto-steps li {
    padding: 12px 0;
    font-size: 1.1rem;
}

.howto-steps li strong {
    color: var(--primary);
}

/* Contact */
.contact {
    background: var(--gradient-banner);
    color: #fff;
}

.contact h2 {
    color: #fff;
}

.contact h2::after {
    background: var(--primary);
}

.contact-info {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.contact-info strong {
    color: var(--primary);
}

/* Friends */
.friends {
    background: var(--card-bg);
}

.friend-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    list-style: none;
}

.friend-links a {
    color: var(--text);
    opacity: 0.7;
    transition: opacity 0.3s;
}

.friend-links a:hover {
    opacity: 1;
    color: var(--primary);
}

/* Sitemap */
.sitemap {
    background: var(--bg);
}

.sitemap ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    list-style: none;
}

.sitemap a {
    color: var(--text);
    opacity: 0.7;
}

.sitemap a:hover {
    opacity: 1;
    color: var(--primary);
}

/* Footer */
footer {
    background: #0f0f23;
    color: #aaa;
    padding: 60px 0 30px;
}

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

.footer-brand {
    text-align: center;
    margin-bottom: 32px;
}

.footer-brand p {
    margin-top: 8px;
    font-size: 0.95rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 12px;
    font-size: 1rem;
}

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

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

.footer-col a {
    color: #aaa;
    font-size: 0.9rem;
}

.footer-col a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid #2d2d44;
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
}

.footer-bottom p {
    margin-bottom: 6px;
}

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: #1a1a2e;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 999;
    box-shadow: 0 4px 16px rgba(245, 197, 24, 0.3);
}

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

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

/* 滚动动画支持 */
@media (prefers-reduced-motion: no-preference) {
    .about-card,
    .product-card,
    .solution-item,
    .case-card,
    .news-card,
    blockquote {
        opacity: 0;
        transform: translateY(30px);
        animation: scrollFadeIn 0.6s forwards;
    }

    .about-grid .about-card:nth-child(1) { animation-delay: 0.1s; }
    .about-grid .about-card:nth-child(2) { animation-delay: 0.2s; }
    .about-grid .about-card:nth-child(3) { animation-delay: 0.3s; }
    .about-grid .about-card:nth-child(4) { animation-delay: 0.4s; }
    .products-grid .product-card:nth-child(1) { animation-delay: 0.1s; }
    .products-grid .product-card:nth-child(2) { animation-delay: 0.2s; }
    .products-grid .product-card:nth-child(3) { animation-delay: 0.3s; }
    .products-grid .product-card:nth-child(4) { animation-delay: 0.4s; }
    .solutions-grid .solution-item:nth-child(1) { animation-delay: 0.1s; }
    .solutions-grid .solution-item:nth-child(2) { animation-delay: 0.2s; }
    .solutions-grid .solution-item:nth-child(3) { animation-delay: 0.3s; }
    .solutions-grid .solution-item:nth-child(4) { animation-delay: 0.4s; }
    .cases-grid .case-card:nth-child(1) { animation-delay: 0.1s; }
    .cases-grid .case-card:nth-child(2) { animation-delay: 0.2s; }
    .cases-grid .case-card:nth-child(3) { animation-delay: 0.3s; }
    .news-grid .news-card:nth-child(1) { animation-delay: 0.1s; }
    .news-grid .news-card:nth-child(2) { animation-delay: 0.2s; }
    .news-grid .news-card:nth-child(3) { animation-delay: 0.3s; }
    .testimonials-grid blockquote:nth-child(1) { animation-delay: 0.1s; }
    .testimonials-grid blockquote:nth-child(2) { animation-delay: 0.2s; }
    .testimonials-grid blockquote:nth-child(3) { animation-delay: 0.3s; }

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

/* 响应式布局 */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--nav-bg);
        padding: 20px;
        gap: 16px;
    }

    .nav-links.open {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .hero-stats {
        gap: 20px;
    }

    .stat .num {
        font-size: 1.8rem;
    }

    .slide-content h1,
    .slide-content h2 {
        font-size: 2.2rem;
    }

    section {
        padding: 50px 0;
    }

    .products-grid,
    .cases-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }

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

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

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

    .footer-links {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .products-grid,
    .cases-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }

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

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

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

    .footer-links {
        grid-template-columns: 1fr;
    }

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

    .nav-container {
        padding: 10px 16px;
    }

    .slide-content h1,
    .slide-content h2 {
        font-size: 1.8rem;
    }

    .btn-primary {
        padding: 10px 24px;
        font-size: 0.9rem;
    }
}