/* 全局样式与暗色主题（默认） */
:root {
    --primary: #1a1a2e;
    --secondary: #16213e;
    --accent: #e94560;
    --accent2: #0f3460;
    --text: #f5f5f5;
    --bg: #0f0f1a;
    --card-bg: #1e1e36;
    --card-glass: rgba(30, 30, 54, 0.7);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --glow: 0 0 30px rgba(233, 69, 96, 0.3);
    --radius: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 明亮主题 */
[data-theme="light"] {
    --primary: #f0f0f5;
    --secondary: #e0e0ec;
    --accent: #c0392b;
    --accent2: #2980b9;
    --text: #1a1a2e;
    --bg: #fafafa;
    --card-bg: #ffffff;
    --card-glass: rgba(255, 255, 255, 0.7);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --glow: 0 0 30px rgba(192, 57, 43, 0.2);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

/* 辅助类 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(233, 69, 96, 0.2);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::after {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(233, 69, 96, 0.4), var(--glow);
}

.btn:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
}

.btn-outline:hover {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 6px 24px rgba(255, 255, 255, 0.2);
}

/* 卡片 */
.card {
    background: var(--card-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), var(--glow);
    border-color: rgba(233, 69, 96, 0.2);
}

/* 标题 */
h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 24px;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin-top: 8px;
    border-radius: 2px;
    transition: width 0.3s;
}

h2:hover::after {
    width: 100px;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

/* 区块 */
.section {
    padding: 80px 0;
    animation: fadeInUp 0.8s ease-out;
}

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

/* 网格 */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* 响应式 */
@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .section {
        padding: 48px 0;
    }
}

/* 页眉 */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--primary);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    transition: background 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.logo svg {
    width: 32px;
    height: 32px;
}

nav {
    display: flex;
    gap: 24px;
    align-items: center;
}

nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    font-size: 0.95rem;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

nav a:hover::after {
    width: 100%;
}

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

.theme-toggle {
    background: transparent;
    border: 2px solid var(--text);
    color: var(--text);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: rotate(180deg);
}

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

.mobile-menu:hover {
    color: var(--accent);
}

@media (max-width: 768px) {
    .mobile-menu {
        display: block;
    }

    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
        animation: slideDown 0.3s ease-out;
    }

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

    nav.active {
        display: flex;
    }

    nav a {
        font-size: 1.1rem;
    }
}

/* 英雄区域 */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent2));
    padding: 100px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' opacity='0.05'%3E%3Ccircle cx='50' cy='50' r='40' fill='none' stroke='%23fff' stroke-width='0.5'/%3E%3C/svg%3E") repeat;
    pointer-events: none;
    animation: float 20s linear infinite;
}

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

.hero::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(233, 69, 96, 0.1), transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(15, 52, 96, 0.1), transparent 50%);
    pointer-events: none;
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

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

.hero h1 {
    margin-bottom: 16px;
    color: #fff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    animation: slideInLeft 1s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 32px;
    color: rgba(255, 255, 255, 0.85);
    animation: slideInRight 1s ease-out 0.3s both;
}

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

.hero .btn {
    margin: 0 8px 8px;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero .btn-outline {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
}

.hero .btn-outline:hover {
    background: #fff;
    color: var(--primary);
}

@media (max-width: 768px) {
    .hero {
        padding: 60px 0 40px;
    }
}

/* 关于 */
.about p {
    max-width: 800px;
    font-size: 1.05rem;
    margin-bottom: 16px;
}

.about .stats {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 32px;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    transition: var(--transition);
}

.stat-number:hover {
    transform: scale(1.1);
}

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

@media (max-width: 768px) {
    .stat-number {
        font-size: 2rem;
    }
}

/* 服务 */
.service-card {
    padding: 28px;
    text-align: center;
}

.service-card svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    fill: var(--accent);
    transition: var(--transition);
}

.service-card:hover svg {
    transform: rotate(360deg);
    fill: var(--accent2);
}

.service-card h3 {
    color: var(--accent);
}

/* 优势 */
.advantages .grid-3 {
    text-align: center;
}

.advantage-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    transition: var(--transition);
}

.card:hover .advantage-icon {
    transform: scale(1.2) rotate(10deg);
}

/* 评价 */
.testimonial-card {
    font-style: italic;
    position: relative;
    padding: 32px 24px 24px;
}

.testimonial-card::before {
    content: '"';
    font-size: 4rem;
    position: absolute;
    top: 0;
    left: 16px;
    opacity: 0.2;
    color: var(--accent);
    line-height: 1;
    transition: var(--transition);
}

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

.testimonial-author {
    font-style: normal;
    font-weight: 600;
    margin-top: 16px;
    color: var(--accent);
}

/* FAQ */
.faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 0;
    transition: var(--transition);
}

.faq-item:hover {
    padding-left: 8px;
}

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

.faq-question:hover {
    color: var(--accent);
}

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

.faq-item.active .faq-question::after {
    content: '−';
    transform: rotate(180deg);
}

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

.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 12px 8px 16px;
}

/* 使用指南 */
.howto-step {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    align-items: flex-start;
    transition: var(--transition);
}

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

.howto-step-number {
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    transition: var(--transition);
}

.howto-step:hover .howto-step-number {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(233, 69, 96, 0.4);
}

/* 文章卡片 */
.article-card .date {
    font-size: 0.85rem;
    opacity: 0.6;
    margin-bottom: 8px;
}

.article-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.article-card p {
    font-size: 0.95rem;
    opacity: 0.8;
    margin-bottom: 12px;
}

.article-card .read-more {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.article-card .read-more:hover {
    padding-left: 8px;
    opacity: 0.8;
}

/* 联系 */
.contact-info p {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-info svg {
    width: 20px;
    height: 20px;
    fill: var(--accent);
    flex-shrink: 0;
    transition: var(--transition);
}

.contact-info p:hover svg {
    transform: scale(1.2);
}

/* 页脚 */
footer {
    background: var(--primary);
    padding: 40px 0 20px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.footer-grid h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--accent);
}

.footer-grid a {
    display: block;
    color: var(--text);
    text-decoration: none;
    margin-bottom: 8px;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.2s, padding-left 0.2s;
}

.footer-grid a:hover {
    opacity: 1;
    padding-left: 4px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
    opacity: 0.7;
}

.footer-bottom a {
    color: var(--text);
    margin: 0 8px;
    text-decoration: none;
    transition: var(--transition);
}

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

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* 返回顶部 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 99;
    box-shadow: 0 4px 16px rgba(233, 69, 96, 0.4);
}

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

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

/* 轮播 */
.carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    margin: 32px 0;
}

.carousel-slide {
    display: none;
    padding: 40px;
    background: var(--card-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-align: center;
    min-height: 200px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.carousel-slide.active {
    display: flex;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 2;
    transition: var(--transition);
}

.carousel-btn:hover {
    background: var(--accent);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: 16px;
}

.carousel-btn.next {
    right: 16px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px 0;
}

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

.carousel-dots button.active {
    background: var(--accent);
    transform: scale(1.3);
}

.carousel-dots button:hover {
    background: var(--accent);
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 8px;
    max-width: 500px;
    margin: 0 auto 32px;
}

.search-box input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text);
    font-size: 1rem;
    transition: var(--transition);
}

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

.search-box button {
    padding: 12px 24px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover {
    background: var(--accent2);
    transform: translateY(-2px);
}

/* 滚动触发动画（视口可见时触发） */
@media (prefers-reduced-motion: no-preference) {
    .section {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    }

    .section.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

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

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

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

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

/* 打印样式 */
@media print {
    header,
    footer,
    .back-to-top,
    .carousel-btn,
    .search-box {
        display: none !important;
    }

    .section {
        padding: 20px 0;
        page-break-inside: avoid;
    }
}