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

:root {
    --primary: #1a1a2e;
    --accent: #ffd700;
    --accent-hover: #ffed4a;
    --bg: #0f0f1a;
    --bg-card: rgba(26, 26, 46, 0.7);
    --bg-glass: rgba(15, 15, 26, 0.6);
    --text: #e0e0e0;
    --text-muted: #a0a0b0;
    --text-light: #ffffff;
    --border: rgba(255, 215, 0, 0.2);
    --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', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

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;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* 暗色模式默认即为深色，无需额外切换，但保留变量支持 */

/* 渐变背景Banner效果 */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(15, 15, 26, 0.9));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

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

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform var(--transition);
}

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

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
    align-items: center;
}

.nav-menu li a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
}

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

.nav-menu li a:hover,
.nav-menu li a:focus-visible {
    color: var(--accent);
    background: rgba(255, 215, 0, 0.08);
}

.nav-menu li a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.dark-mode-toggle,
.mobile-menu-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--accent);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-mode-toggle:hover,
.mobile-menu-toggle:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--accent);
}

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

/* Hero区域渐变Banner */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 24px 60px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 70%, #1a1a2e 100%);
    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(255, 215, 0, 0.08) 0%, transparent 60%),
                radial-gradient(circle at 70% 50%, rgba(255, 215, 0, 0.05) 0%, transparent 50%);
    animation: heroGlow 15s ease-in-out infinite alternate;
}

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

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    text-align: center;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), #fff5b0, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease-out;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s 0.2s ease-out both;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s 0.4s ease-out both;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #e6c200);
    color: var(--primary);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.5);
    background: linear-gradient(135deg, var(--accent-hover), var(--accent));
}

.btn-secondary {
    background: transparent;
    border-color: var(--accent);
    color: var(--accent);
}

.btn-secondary:hover {
    background: rgba(255, 215, 0, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.2);
}

.hero-visual {
    position: relative;
    z-index: 2;
    margin-left: 40px;
    animation: fadeInScale 1s 0.3s ease-out both;
}

.hero-visual svg {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 0 40px rgba(255, 215, 0, 0.15));
}

/* 通用section样式 */
section {
    padding: 80px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

section h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    color: var(--text-light);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
    margin: 12px auto 0;
    border-radius: 3px;
}

section > p {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* 圆角卡片 + 毛玻璃效果 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 12px 40px rgba(255, 215, 0, 0.1), var(--shadow);
}

.card:hover::before {
    opacity: 1;
}

.card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 12px;
    transition: color var(--transition);
}

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

/* 列表样式 */
ul, ol {
    padding-left: 24px;
    margin: 20px auto;
    max-width: 700px;
    color: var(--text-muted);
}

ul li, ol li {
    margin-bottom: 10px;
    line-height: 1.6;
}

ul li strong, ol li strong {
    color: var(--accent);
}

/* FAQ 折叠面板 */
.faq-list {
    max-width: 800px;
    margin: 40px auto 0;
}

details {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    padding: 0 20px;
    transition: all var(--transition);
    overflow: hidden;
}

details[open] {
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.05);
}

summary {
    padding: 18px 0;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color var(--transition);
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: '+';
    font-size: 1.4rem;
    color: var(--accent);
    transition: transform var(--transition);
}

details[open] summary::after {
    transform: rotate(45deg);
}

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

details p {
    padding: 0 0 18px 0;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
    text-align: left;
}

/* 联系区域 */
address p {
    text-align: center;
    margin-bottom: 6px;
    color: var(--text-muted);
}

address p:first-of-type {
    color: var(--accent);
    font-weight: 600;
}

/* Footer */
footer {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(15, 15, 26, 0.9));
    border-top: 1px solid var(--border);
    padding: 40px 24px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-content nav {
    display: flex;
    gap: 20px;
}

.footer-content nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition);
}

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

/* 动画关键帧 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 滚动动画 - 使用Intersection Observer的备用方案（CSS方式）*/
@media (prefers-reduced-motion: no-preference) {
    section {
        opacity: 0;
        animation: fadeInUp 0.8s ease-out forwards;
    }
    
    #hero { animation: none; opacity: 1; }
    
    section:nth-of-type(1) { animation-delay: 0.1s; }
    section:nth-of-type(2) { animation-delay: 0.2s; }
    section:nth-of-type(3) { animation-delay: 0.3s; }
    section:nth-of-type(4) { animation-delay: 0.4s; }
    section:nth-of-type(5) { animation-delay: 0.5s; }
    section:nth-of-type(6) { animation-delay: 0.6s; }
    section:nth-of-type(7) { animation-delay: 0.7s; }
    section:nth-of-type(8) { animation-delay: 0.8s; }
    section:nth-of-type(9) { animation-delay: 0.9s; }
    section:nth-of-type(10) { animation-delay: 1.0s; }
}

/* 响应式布局 */
@media (max-width: 1024px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        width: 100%;
        background: rgba(15, 15, 26, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 16px 24px;
        border-bottom: 1px solid var(--border);
        gap: 4px;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li a {
        padding: 12px 16px;
        width: 100%;
        text-align: center;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    #hero {
        flex-direction: column;
        text-align: center;
        padding-top: 80px;
    }
    
    .hero-visual {
        margin-left: 0;
        margin-top: 40px;
    }
    
    .hero-visual svg {
        width: 300px;
        height: auto;
    }
}

@media (max-width: 768px) {
    section {
        padding: 60px 16px;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 0.95rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-content nav {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    details {
        padding: 0 14px;
    }
    
    summary {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 12px;
    }
    
    .logo svg {
        width: 100px;
        height: auto;
    }
    
    .hero-visual svg {
        width: 240px;
    }
    
    section h2 {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 24px 16px;
    }
}

/* 暗色模式显式支持（确保所有元素遵循） */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f0f1a;
        --text: #e0e0e0;
        --text-muted: #a0a0b0;
    }
}

/* 焦点可见性 */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* 选择样式 */
::selection {
    background: rgba(255, 215, 0, 0.3);
    color: var(--text-light);
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.5);
}