/* 基础样式重置与设计系统 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #f5f5fa;
    color: #1a1a2e;
    line-height: 1.7;
    transition: background 0.3s, color 0.3s;
}

body.dark-mode {
    background: #0a0a1a;
    color: #e0e0f0;
}

a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    text-decoration: underline;
    color: #0052a3;
}

body.dark-mode a {
    color: #66b3ff;
}

body.dark-mode a:hover {
    color: #99ccff;
}

/* 头部导航 */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    transition: background 0.3s;
}

body.dark-mode header {
    background: rgba(18, 18, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
    font-weight: bold;
    color: #1a1a2e;
    transition: color 0.3s;
}

body.dark-mode .logo a {
    color: #ffcc00;
}

.logo svg {
    transition: transform 0.3s;
}

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

.nav-links {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-links a {
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.3s, color 0.3s, transform 0.2s;
}

.nav-links a:hover {
    background: rgba(0, 102, 204, 0.1);
    text-decoration: none;
    transform: translateY(-1px);
}

body.dark-mode .nav-links a:hover {
    background: rgba(255, 204, 0, 0.1);
}

.theme-toggle {
    background: none;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 20px;
    padding: 0.3rem 0.8rem;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.3s, border-color 0.3s, transform 0.2s;
}

.theme-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.05);
}

body.dark-mode .theme-toggle {
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Hero 区域 */
.hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem;
    padding: 4rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 80vh;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(0, 102, 204, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(255, 204, 0, 0.05) 0%, transparent 50%);
    z-index: 0;
    animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(2%, 2%) rotate(2deg); }
}

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

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #1a1a2e, #0066cc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease-out;
}

body.dark-mode .hero-content h1 {
    background: linear-gradient(135deg, #ffcc00, #66b3ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.15rem;
    margin-bottom: 2rem;
    color: #555;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

body.dark-mode .hero-content p {
    color: #aaa;
}

.cta-button {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    background: linear-gradient(135deg, #0066cc, #0052a3);
    color: #fff;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1.05rem;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.4);
    text-decoration: none;
    background: linear-gradient(135deg, #0052a3, #003d7a);
}

body.dark-mode .cta-button {
    background: linear-gradient(135deg, #ffcc00, #e6b800);
    color: #1a1a2e;
    box-shadow: 0 4px 15px rgba(255, 204, 0, 0.3);
}

body.dark-mode .cta-button:hover {
    box-shadow: 0 8px 25px rgba(255, 204, 0, 0.4);
    background: linear-gradient(135deg, #e6b800, #cca300);
}

.hero-banner {
    flex: 1 1 500px;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    min-height: 350px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

body.dark-mode .hero-banner {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.banner-slide.active {
    opacity: 1;
    position: relative;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 16px;
}

/* 通用 section 样式 */
section {
    padding: 3rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out forwards;
}

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: 1.0s; }
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; }
section:nth-child(16) { animation-delay: 1.5s; }

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

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #0066cc;
    display: inline-block;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50px;
    height: 3px;
    background: #ffcc00;
    transition: width 0.3s;
}

section:hover h2::after {
    width: 100%;
}

body.dark-mode h2 {
    border-bottom-color: #ffcc00;
}

/* 卡片样式 */
article, .about p, .company p, .services ul, .solutions article, .industries ul, .features ul, .benefits ul, .workflow ol, .case-studies article, .testimonials blockquote, .knowledge-center article, .faq details, .howto ol, .contact address {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}

body.dark-mode article,
body.dark-mode .about p,
body.dark-mode .company p,
body.dark-mode .services ul,
body.dark-mode .solutions article,
body.dark-mode .industries ul,
body.dark-mode .features ul,
body.dark-mode .benefits ul,
body.dark-mode .workflow ol,
body.dark-mode .case-studies article,
body.dark-mode .testimonials blockquote,
body.dark-mode .knowledge-center article,
body.dark-mode .faq details,
body.dark-mode .howto ol,
body.dark-mode .contact address {
    background: rgba(26, 26, 46, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

article:hover, .solutions article:hover, .case-studies article:hover, .knowledge-center article:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

body.dark-mode article:hover,
body.dark-mode .solutions article:hover,
body.dark-mode .case-studies article:hover,
body.dark-mode .knowledge-center article:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

/* 列表样式 */
ul, ol {
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* 引用块 */
blockquote {
    border-left: 4px solid #0066cc;
    padding: 1.2rem;
    font-style: italic;
    background: rgba(0, 102, 204, 0.05);
    border-radius: 0 12px 12px 0;
}

body.dark-mode blockquote {
    background: rgba(255, 204, 0, 0.05);
    border-left-color: #ffcc00;
}

/* FAQ details */
details {
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 0.8rem 1.2rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

details:hover {
    border-color: #0066cc;
    box-shadow: 0 2px 10px rgba(0, 102, 204, 0.1);
}

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

body.dark-mode details:hover {
    border-color: #ffcc00;
    box-shadow: 0 2px 10px rgba(255, 204, 0, 0.1);
}

summary {
    cursor: pointer;
    font-weight: bold;
    font-size: 1.05rem;
    padding: 0.3rem 0;
    transition: color 0.3s;
}

details[open] summary {
    color: #0066cc;
}

body.dark-mode details[open] summary {
    color: #ffcc00;
}

details p {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark-mode details p {
    border-top-color: rgba(255, 255, 255, 0.05);
}

/* 页脚 */
footer {
    background: linear-gradient(135deg, #1a1a2e, #0a0a1a);
    color: #ccc;
    padding: 3rem 1rem 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
}

.footer-section {
    flex: 1 1 200px;
}

.footer-section h3, .footer-section h4 {
    margin-bottom: 1rem;
    color: #ffcc00;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #aaa;
    transition: color 0.3s, padding-left 0.3s;
}

.footer-section a:hover {
    color: #ffcc00;
    padding-left: 5px;
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 1.5rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.footer-bottom p {
    font-size: 0.9rem;
    color: #888;
}

/* 返回顶部 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, #0066cc, #0052a3);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
    transition: transform 0.3s, box-shadow 0.3s, opacity 0.3s;
    opacity: 0.8;
    z-index: 99;
}

.back-to-top:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.4);
    text-decoration: none;
    opacity: 1;
}

body.dark-mode .back-to-top {
    background: linear-gradient(135deg, #ffcc00, #e6b800);
    color: #1a1a2e;
    box-shadow: 0 4px 15px rgba(255, 204, 0, 0.3);
}

body.dark-mode .back-to-top:hover {
    box-shadow: 0 8px 25px rgba(255, 204, 0, 0.4);
}

/* 图片懒加载占位 */
img[loading="lazy"] {
    background: linear-gradient(135deg, #e0e0e0, #f0f0f0);
    transition: background 0.3s;
}

body.dark-mode img[loading="lazy"] {
    background: linear-gradient(135deg, #2a2a3e, #1a1a2e);
}

/* 响应式 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero {
        flex-direction: column;
        padding: 2rem 1rem;
        min-height: auto;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .hero-banner {
        min-height: 250px;
    }
    
    section {
        padding: 2rem 1rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .cta-button {
        padding: 0.7rem 1.8rem;
        font-size: 0.95rem;
    }
    
    .hero-banner {
        min-height: 200px;
    }
    
    article, .about p, .company p, .services ul, .solutions article, .industries ul, .features ul, .benefits ul, .workflow ol, .case-studies article, .testimonials blockquote, .knowledge-center article, .faq details, .howto ol, .contact address {
        padding: 1rem;
    }
}

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

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

body.dark-mode ::-webkit-scrollbar-track {
    background: #0a0a1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #0066cc, #0052a3);
    border-radius: 4px;
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ffcc00, #e6b800);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0052a3, #003d7a);
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #e6b800, #cca300);
}