/* 全局重置与基础 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
:root {
    --primary: #ff6b6b;
    --primary-dark: #e05555;
    --secondary: #f0a500;
    --accent: #6c63ff;
    --bg: #f5f0eb;
    --bg-card: rgba(255,255,255,0.85);
    --text: #2d2d2d;
    --text-light: #555;
    --border: rgba(0,0,0,0.08);
    --shadow: 0 8px 32px rgba(0,0,0,0.1);
    --radius: 20px;
    --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1a1a2e;
        --bg-card: rgba(30,30,50,0.9);
        --text: #eee;
        --text-light: #bbb;
        --border: rgba(255,255,255,0.1);
        --shadow: 0 8px 32px rgba(0,0,0,0.5);
    }
}
html {
    scroll-behavior: smooth;
    font-size: 16px;
}
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    transition: background var(--transition), color var(--transition);
    overflow-x: hidden;
}

/* 滚动动画基础 */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 头部导航 - 毛玻璃效果 */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0.8rem 1rem;
    transition: background var(--transition);
}
@media (prefers-color-scheme: dark) {
    header {
        background: rgba(26,26,46,0.6);
    }
}
nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
}
nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.4rem 0.8rem;
    border-radius: 30px;
    transition: all var(--transition);
    position: relative;
}
nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all var(--transition);
    transform: translateX(-50%);
}
nav a:hover {
    color: var(--primary);
    background: rgba(255,107,107,0.1);
}
nav a:hover::after {
    width: 60%;
}

/* 主内容区 */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

/* 渐变Banner 用于品牌区 */
#brand {
    background: linear-gradient(135deg, #ff6b6b 0%, #f0a500 50%, #6c63ff 100%);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    margin-bottom: 2.5rem;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
    box-shadow: 0 10px 40px rgba(255,107,107,0.3);
    position: relative;
    overflow: hidden;
}
#brand::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 60%);
    pointer-events: none;
}
#brand h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
}
#brand p {
    font-size: 1.05rem;
    line-height: 1.8;
    opacity: 0.95;
    max-width: 800px;
    position: relative;
}

/* 通用section卡片样式 */
section {
    margin-bottom: 2.5rem;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 2rem 1.8rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all var(--transition);
}
section:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}
h2 {
    font-size: 1.8rem;
    margin-bottom: 1.2rem;
    color: var(--primary);
    border-left: 5px solid var(--secondary);
    padding-left: 1rem;
}
h3 {
    font-size: 1.3rem;
    margin: 1.2rem 0 0.6rem;
    color: var(--text);
}
p {
    margin-bottom: 0.8rem;
    color: var(--text-light);
}
a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover {
    color: var(--primary);
}

/* 产品、解决方案等卡片网格 */
#products, #solutions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
#products h2, #solutions h2 {
    grid-column: 1 / -1;
}
#products > *, #solutions > * {
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: all var(--transition);
}
#products > *:hover, #solutions > *:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

/* 案例卡片 */
#cases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}
#cases h2 {
    grid-column: 1 / -1;
}
#cases article {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: all var(--transition);
    position: relative;
}
#cases article:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}
#cases article h3 {
    color: var(--primary-dark);
}
#cases article p {
    font-size: 0.95rem;
}

/* 新闻中心 - 列表样式 */
#news {
    display: grid;
    gap: 1rem;
}
#news h2 {
    grid-column: 1 / -1;
}
#news article {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1.5rem;
    padding: 1rem 1.2rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all var(--transition);
}
#news article:hover {
    background: rgba(255,107,107,0.05);
    border-color: var(--primary);
    transform: translateX(5px);
}
#news article h3 {
    flex: 1 1 100%;
    margin: 0;
    font-size: 1.1rem;
}
#news article p {
    flex: 1;
    font-size: 0.9rem;
    margin: 0;
}
#news article a {
    font-weight: 600;
    white-space: nowrap;
}

/* FAQ 毛玻璃折叠卡片 */
#faq details {
    margin-bottom: 0.8rem;
    background: var(--bg-card);
    backdrop-filter: blur(6px);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    transition: all var(--transition);
    cursor: pointer;
}
#faq details[open] {
    background: rgba(255,107,107,0.08);
    border-color: var(--primary);
}
#faq summary {
    font-weight: 600;
    padding: 0.6rem 0;
    outline: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
#faq summary::-webkit-details-marker {
    display: none;
}
#faq summary::before {
    content: '▶';
    font-size: 0.8rem;
    color: var(--primary);
    transition: transform var(--transition);
}
#faq details[open] summary::before {
    transform: rotate(90deg);
}
#faq details p {
    padding: 0.5rem 0 0.8rem;
    font-size: 0.95rem;
    border-top: 1px solid var(--border);
    margin-top: 0.3rem;
}

/* HowTo 有序列表 */
#howto ol {
    padding-left: 1.5rem;
    margin: 1rem 0;
}
#howto ol li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: var(--text-light);
}
#howto strong {
    color: var(--text);
}

/* 联系我们 */
#contact p {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
#contact p::before {
    content: '•';
    color: var(--primary);
    font-weight: bold;
}

/* 网站地图 */
#sitemap ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1.5rem;
}
#sitemap ul li a {
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    transition: background var(--transition);
}
#sitemap ul li a:hover {
    background: rgba(108,99,255,0.1);
}

/* 页脚 */
footer {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: 2rem 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
}
footer p {
    margin-bottom: 0.5rem;
}
footer a {
    color: var(--accent);
}

/* 响应式 */
@media (max-width: 768px) {
    :root {
        --radius: 14px;
    }
    header {
        padding: 0.5rem;
    }
    nav a {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
    }
    #brand {
        padding: 2rem 1.2rem;
    }
    #brand h1 {
        font-size: 1.6rem;
    }
    #brand p {
        font-size: 0.95rem;
    }
    section {
        padding: 1.5rem 1rem;
    }
    h2 {
        font-size: 1.4rem;
    }
    h3 {
        font-size: 1.1rem;
    }
    #products, #solutions, #cases {
        grid-template-columns: 1fr;
    }
    #news article {
        flex-direction: column;
        gap: 0.3rem;
    }
    #sitemap ul {
        flex-direction: column;
        align-items: center;
    }
}
@media (max-width: 480px) {
    nav {
        gap: 0.3rem;
    }
    nav a {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }
    #brand h1 {
        font-size: 1.3rem;
    }
    #brand p {
        font-size: 0.88rem;
    }
    section {
        padding: 1rem 0.8rem;
    }
    h2 {
        font-size: 1.2rem;
    }
}

/* 暗色模式微调 */
@media (prefers-color-scheme: dark) {
    #brand {
        background: linear-gradient(135deg, #b33939 0%, #cc8e35 50%, #5a52d6 100%);
    }
    #brand p {
        opacity: 0.9;
    }
    nav a:hover {
        background: rgba(255,107,107,0.2);
    }
    #news article:hover {
        background: rgba(255,107,107,0.12);
    }
}

/* 滚动动画元素 */
section, #brand, #products > *, #solutions > *, #cases article, #news article, #faq details, #howto, #contact, #sitemap {
    animation: fadeSlideUp 0.8s ease forwards;
    opacity: 0;
}
@keyframes fadeSlideUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
/* 延迟动画 */
#brand { animation-delay: 0.1s; }
#products { animation-delay: 0.2s; }
#solutions { animation-delay: 0.3s; }
#cases { animation-delay: 0.4s; }
#news { animation-delay: 0.5s; }
#faq { animation-delay: 0.6s; }
#howto { animation-delay: 0.7s; }
#contact { animation-delay: 0.8s; }
#sitemap { animation-delay: 0.9s; }

/* 附加hover细节 */
nav a, .card, article, details {
    will-change: transform;
}
::selection {
    background: var(--primary);
    color: #fff;
}