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

:root {
    --bg: #f0f2f5;
    --text: #1a1a2e;
    --accent: #ff6b35;
    --accent-hover: #e55a2b;
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(255, 255, 255, 0.3);
    --header-bg: rgba(26, 26, 46, 0.95);
    --footer-bg: #1a1a2e;
    --hero-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.15);
    --glass-blur: 12px;
    --radius: 16px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode {
    --bg: #0d0d1a;
    --text: #e0e0e0;
    --card-bg: rgba(30, 30, 46, 0.85);
    --card-border: rgba(255, 255, 255, 0.1);
    --header-bg: rgba(10, 10, 20, 0.95);
    --footer-bg: #0a0a14;
    --hero-gradient: linear-gradient(135deg, #0a0a14 0%, #1a1a2e 50%, #0f3460 100%);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.5);
}

html {
    scroll-behavior: smooth;
}

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

/* 滚动条美化 */
::-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(--accent-hover);
}

/* ========== 头部与导航 ========== */
header {
    background: var(--header-bg);
    color: #fff;
    padding: 1rem 2rem;
    position: relative;
    z-index: 1000;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    transition: all var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 0.6rem 2rem;
}

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

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

nav ul li a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.4rem 0;
    position: relative;
    transition: color var(--transition);
}

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

nav ul li a:hover {
    color: #fff;
}

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

#darkModeToggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all var(--transition);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#darkModeToggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

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

section {
    margin-bottom: 5rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

section:nth-child(1) { animation-delay: 0.1s; }
section:nth-child(2) { animation-delay: 0.2s; }
section:nth-child(3) { animation-delay: 0.3s; }
section:nth-child(4) { animation-delay: 0.4s; }
section:nth-child(5) { animation-delay: 0.5s; }
section:nth-child(6) { animation-delay: 0.6s; }
section:nth-child(7) { animation-delay: 0.7s; }
section:nth-child(8) { animation-delay: 0.8s; }

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

/* ========== 标题样式 ========== */
h1 {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text);
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text);
}

p {
    margin-bottom: 1.2rem;
    color: var(--text);
    opacity: 0.9;
}

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

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

/* ========== Hero 区域 ========== */
#hero {
    background: var(--hero-gradient);
    color: #fff;
    padding: 6rem 3rem;
    border-radius: var(--radius);
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

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

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

#hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

#hero a {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
    transition: all var(--transition);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

#hero a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

#hero a:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.5);
}

#hero a:hover::before {
    left: 100%;
}

/* ========== 卡片网格 ========== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.card-grid article,
.knowledge-grid article {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.card-grid article::before,
.knowledge-grid article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #ff8c00, var(--accent));
    background-size: 200% 100%;
    animation: gradientMove 3s linear infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

.card-grid article:hover,
.knowledge-grid article:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}

.card-grid article a,
.knowledge-grid article a {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 600;
    position: relative;
    padding-right: 1.5rem;
}

.card-grid article a::after,
.knowledge-grid article a::after {
    content: '→';
    position: absolute;
    right: 0;
    transition: transform var(--transition);
}

.card-grid article a:hover::after,
.knowledge-grid article a:hover::after {
    transform: translateX(4px);
}

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

/* ========== 服务列表 ========== */
#services ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

#services ul li {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    transition: all var(--transition);
    font-weight: 500;
    position: relative;
    padding-left: 2.5rem;
}

#services ul li::before {
    content: '⚡';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
}

#services ul li:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}

/* ========== FAQ 折叠面板 ========== */
.faq-list details {
    background: var(--card-bg);
    padding: 1.2rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 0.8rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    transition: all var(--transition);
    cursor: pointer;
}

.faq-list details:hover {
    border-color: var(--accent);
    transform: translateX(4px);
}

.faq-list details[open] {
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.15);
}

.faq-list summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    padding: 0.2rem 0;
    position: relative;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.faq-list summary::-webkit-details-marker {
    display: none;
}

.faq-list summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--accent);
    transition: transform var(--transition);
}

.faq-list details[open] summary::after {
    content: '−';
    transform: rotate(180deg);
}

.faq-list p {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    opacity: 0.85;
}

/* ========== 步骤列表 ========== */
#howto ol {
    list-style: none;
    counter-reset: step;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

#howto ol li {
    counter-increment: step;
    background: var(--card-bg);
    padding: 1.5rem 1.5rem 1.5rem 3.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    transition: all var(--transition);
    position: relative;
}

#howto ol li::before {
    content: counter(step);
    position: absolute;
    left: 1rem;
    top: 1.5rem;
    width: 2rem;
    height: 2rem;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

#howto ol li:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

#howto ol li strong {
    color: var(--accent);
}

/* ========== 联系信息 ========== */
address {
    font-style: normal;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

address p {
    margin: 0;
    padding: 0.8rem 1rem;
    background: rgba(255, 107, 53, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}

/* ========== 页脚 ========== */
footer {
    background: var(--footer-bg);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 3rem 2rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color var(--transition);
    position: relative;
}

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

footer a:hover {
    color: #fff;
}

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

footer p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin: 0;
}

/* ========== 返回顶部按钮 ========== */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    transition: all var(--transition);
    display: none;
    z-index: 1000;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#backToTop:hover {
    background: var(--accent-hover);
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.5);
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    main {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    #hero {
        padding: 4rem 2rem;
    }
}

@media (max-width: 768px) {
    header {
        padding: 0.8rem 1rem;
    }
    
    header.sticky {
        padding: 0.5rem 1rem;
    }
    
    nav ul {
        gap: 1rem;
        order: 3;
        width: 100%;
        justify-content: center;
        padding-top: 0.8rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    #hero {
        padding: 3rem 1.5rem;
        border-radius: 12px;
    }
    
    #hero p {
        font-size: 1rem;
    }
    
    .card-grid,
    .knowledge-grid {
        grid-template-columns: 1fr;
    }
    
    #services ul {
        grid-template-columns: 1fr;
    }
    
    #howto ol {
        grid-template-columns: 1fr;
    }
    
    address {
        grid-template-columns: 1fr;
    }
    
    section {
        margin-bottom: 3rem;
    }
    
    footer nav ul {
        gap: 1rem;
        flex-direction: column;
    }
    
    #backToTop {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    main {
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    #hero {
        padding: 2rem 1rem;
    }
    
    #hero a {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .card-grid article,
    .knowledge-grid article {
        padding: 1.2rem;
    }
    
    #services ul li {
        padding: 1rem 1rem 1rem 2.5rem;
    }
}

/* ========== 打印样式 ========== */
@media print {
    header.sticky {
        position: relative;
    }
    
    #darkModeToggle,
    #backToTop,
    #hero a {
        display: none;
    }
    
    section {
        opacity: 1;
        transform: none;
        animation: none;
    }
    
    .card-grid article::before,
    .knowledge-grid article::before {
        display: none;
    }
}