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

:root {
    --primary: #e94560;
    --primary-dark: #c73a52;
    --secondary: #0f3460;
    --secondary-light: #16213e;
    --bg: #1a1a2e;
    --bg-light: #232342;
    --text: #eaeaea;
    --text-muted: #a0a0b0;
    --card-bg: rgba(255,255,255,0.08);
    --card-border: rgba(255,255,255,0.12);
    --glass-bg: rgba(26,26,46,0.7);
    --glass-border: rgba(255,255,255,0.15);
    --shadow: 0 8px 32px rgba(0,0,0,0.4);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body.dark-mode {
    --bg: #0d0d1a;
    --bg-light: #151528;
    --card-bg: rgba(255,255,255,0.05);
    --glass-bg: rgba(13,13,26,0.8);
    --text: #f0f0f5;
    --text-muted: #8888a0;
}

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

a:hover {
    color: var(--primary-dark);
}

h1, h2, h3, h4 {
    line-height: 1.3;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.4rem;
    margin-bottom: 1.2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary), #ff6b6b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

h3 {
    font-size: 1.4rem;
    margin-bottom: 0.6rem;
    color: var(--primary);
}

img, svg {
    max-width: 100%;
    height: auto;
}

section {
    padding: 5rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 0.8s ease 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; }

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

/* 导航栏 */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: background var(--transition), box-shadow var(--transition);
}

header.sticky {
    background: rgba(26,26,46,0.95);
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

body.dark-mode header {
    background: rgba(13,13,26,0.8);
}

body.dark-mode header.sticky {
    background: rgba(13,13,26,0.95);
}

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

.logo a {
    display: flex;
    align-items: center;
}

.logo svg {
    transition: transform var(--transition);
}

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

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

.nav-links a {
    color: var(--text);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--primary);
    transition: transform var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-links a:hover {
    color: var(--primary);
    background: rgba(233,69,96,0.1);
}

.nav-links a.active {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-actions button {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-actions button:hover {
    background: rgba(255,255,255,0.1);
    color: var(--primary);
    transform: scale(1.1);
}

.mobile-menu-toggle {
    display: none;
}

/* Hero 区域 */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    min-height: 90vh;
    padding-top: 6rem;
    background: linear-gradient(135deg, var(--bg) 0%, var(--secondary) 50%, var(--bg-light) 100%);
    border-radius: 0 0 40px 40px;
    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(233,69,96,0.15) 0%, transparent 60%),
                radial-gradient(circle at 70% 50%, rgba(15,52,96,0.2) 0%, transparent 60%);
    animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(20px, -20px) rotate(5deg); }
}

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

.hero-content h1 {
    font-size: 3.2rem;
    margin-bottom: 1.2rem;
    background: linear-gradient(135deg, #fff, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition);
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #ff6b6b);
    color: #fff;
    box-shadow: 0 4px 20px rgba(233,69,96,0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(233,69,96,0.5);
    color: #fff;
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--primary);
    transform: translateY(-3px);
    color: var(--primary);
}

.hero-visual {
    flex: 0 0 400px;
    position: relative;
    z-index: 1;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.hero-visual svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 40px rgba(233,69,96,0.3));
}

/* 关于 */
.about {
    text-align: center;
}

.about > p {
    max-width: 700px;
    margin: 0 auto 2.5rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.about-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.about-item {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: all var(--transition);
}

.about-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

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

.about-item p {
    color: var(--text-muted);
}

/* 产品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #ff6b6b);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.product-card h3 {
    margin-bottom: 1rem;
}

.product-card p {
    color: var(--text-muted);
}

/* 服务列表 */
.service-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.service-item {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    padding: 2rem;
    transition: all var(--transition);
    text-align: center;
}

.service-item:hover {
    transform: translateY(-5px);
    background: rgba(233,69,96,0.08);
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(233,69,96,0.2);
}

.service-item h3 {
    margin-bottom: 0.8rem;
}

.service-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* 特色列表 */
.features ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    list-style: none;
    padding: 0;
}

.features li {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    padding: 1.2rem 1.5rem;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
    padding-left: 2.5rem;
}

.features li::before {
    content: '✓';
    position: absolute;
    left: 1rem;
    color: var(--primary);
    font-weight: bold;
}

.features li:hover {
    background: rgba(233,69,96,0.1);
    border-color: var(--primary);
    transform: translateX(5px);
}

/* 知识中心 */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.resource-card {
    background: var(--glass-bg);
    backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.8rem;
    transition: all var(--transition);
    cursor: default;
}

.resource-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.resource-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.8rem;
}

.resource-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* FAQ 手风琴 */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 0.8rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    transition: all var(--transition);
}

.faq-item:hover {
    border-color: var(--primary);
}

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

.faq-question:hover {
    background: rgba(255,255,255,0.05);
}

.faq-icon {
    font-size: 1.4rem;
    color: var(--primary);
    transition: transform var(--transition);
    flex-shrink: 0;
    margin-left: 1rem;
}

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

.faq-answer {
    padding: 0 1.5rem 1.2rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.faq-answer[hidden] {
    display: none;
}

/* 使用步骤 */
.howto ol {
    max-width: 700px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.howto li {
    counter-increment: step;
    padding: 1.2rem 1.5rem 1.2rem 3.5rem;
    margin-bottom: 0.8rem;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    position: relative;
    transition: all var(--transition);
}

.howto li::before {
    content: counter(step);
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, var(--primary), #ff6b6b);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.howto li:hover {
    transform: translateX(8px);
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(233,69,96,0.15);
}

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

/* 联系 */
.contact {
    text-align: center;
}

.contact > p {
    max-width: 600px;
    margin: 0 auto 2rem;
    color: var(--text-muted);
}

address {
    font-style: normal;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2.5rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 2.2;
}

address p {
    color: var(--text-muted);
}

address a {
    color: var(--primary);
    font-weight: 500;
}

address a:hover {
    text-decoration: underline;
}

/* 页脚 */
footer {
    background: var(--secondary-light);
    border-top: 1px solid var(--glass-border);
    padding: 3rem 1.5rem 2rem;
    margin-top: 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-links ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    list-style: none;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color var(--transition);
}

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

.footer-legal p {
    color: var(--text-muted);
    font-size: 0.85rem;
    opacity: 0.8;
}

/* 返回顶部 */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(233,69,96,0.4);
    transition: all var(--transition);
    z-index: 999;
}

#back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(233,69,96,0.5);
    background: var(--primary-dark);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 5rem;
        min-height: auto;
    }

    .hero-content h1 {
        font-size: 2.6rem;
    }

    .hero-content p {
        margin: 0 auto 2rem;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-visual {
        flex: 0 0 auto;
        width: 80%;
        max-width: 350px;
    }

    h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--glass-border);
        gap: 0.3rem;
    }

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

    .nav-links a {
        padding: 0.8rem 1rem;
        width: 100%;
        text-align: center;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    section {
        padding: 3rem 1rem;
    }

    .hero {
        padding: 4rem 1rem 2rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

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

    .hero-visual {
        width: 100%;
        max-width: 280px;
    }

    h2 {
        font-size: 1.7rem;
    }

    .about-details,
    .product-grid,
    .service-list,
    .resource-grid {
        grid-template-columns: 1fr;
    }

    .features ul {
        grid-template-columns: 1fr;
    }

    .footer-links ul {
        flex-direction: column;
        gap: 0.8rem;
    }

    #back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.6rem;
    }

    .btn-primary, .btn-secondary {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }

    .nav-container {
        padding: 0.6rem 1rem;
    }

    .logo svg {
        width: 100px;
        height: auto;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

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

/* 暗色模式下的额外调整 */
body.dark-mode .hero {
    background: linear-gradient(135deg, #0d0d1a 0%, #0f3460 50%, #0d0d1a 100%);
}

body.dark-mode .product-card,
body.dark-mode .resource-card,
body.dark-mode .about-item,
body.dark-mode .service-item,
body.dark-mode .faq-item,
body.dark-mode address,
body.dark-mode .howto li {
    background: rgba(255,255,255,0.04);
}

body.dark-mode .nav-links a:hover {
    background: rgba(233,69,96,0.15);
}

/* 打印样式优化 */
@media print {
    header, footer, #back-to-top, .nav-actions {
        display: none;
    }
    body {
        background: #fff;
        color: #000;
    }
    section {
        opacity: 1;
        transform: none;
        animation: none;
        page-break-inside: avoid;
    }
}