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

:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(30, 30, 60, 0.75);
    --text-primary: #e0e0ff;
    --text-secondary: #a0a0c0;
    --accent-gold: #ffd700;
    --accent-gold-dark: #ccb000;
    --accent-blue: #4a90d9;
    --accent-purple: #7b2ff7;
    --gradient-hero: linear-gradient(135deg, #0a0a2e 0%, #1a1a4e 30%, #2a2a5e 60%, #1a1a3e 100%);
    --gradient-card: linear-gradient(145deg, rgba(255,215,0,0.08) 0%, rgba(74,144,217,0.05) 100%);
    --gradient-btn: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 215, 0, 0.15);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.4);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 20px rgba(255,215,0,0.15);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1200px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* 暗色模式（默认即暗色） */
@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #0a0a1a;
        --bg-secondary: #1a1a2e;
        --bg-card: rgba(30, 30, 60, 0.75);
        --text-primary: #e0e0ff;
        --text-secondary: #a0a0c0;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--accent-gold-dark);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gold);
}

/* 通用容器 */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0 20px;
    transition: var(--transition);
}

header:hover {
    background: rgba(10, 10, 26, 0.95);
}

header nav ul {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    gap: 4px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 12px 0;
    flex-wrap: wrap;
}

header nav ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    letter-spacing: 0.3px;
}

header nav ul li a:hover,
header nav ul li a[aria-current="page"] {
    color: var(--accent-gold);
    background: rgba(255, 215, 0, 0.08);
    text-shadow: 0 0 8px rgba(255,215,0,0.3);
}

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

header nav ul li a:hover::after,
header nav ul li a[aria-current="page"]::after {
    transform: translateX(-50%) scaleX(1);
}

/* 英雄区域 */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 120px 20px 80px;
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    margin-bottom: 40px;
    animation: fadeIn 1s ease-out;
}

#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.03) 0%, transparent 60%),
                radial-gradient(circle at 70% 80%, rgba(74,144,217,0.03) 0%, transparent 60%);
    animation: heroGlow 15s ease-in-out infinite alternate;
    pointer-events: none;
}

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

#hero h1 {
    font-size: clamp(2rem, 6vw, 3.8rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-gold), #fff5cc, var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
    line-height: 1.2;
    text-shadow: 0 0 40px rgba(255,215,0,0.1);
    animation: slideUp 0.8s ease-out;
}

#hero p {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 40px;
    animation: slideUp 0.8s ease-out 0.1s both;
}

#hero div {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    animation: slideUp 0.8s ease-out 0.2s both;
}

#hero div a[role="button"] {
    display: inline-block;
    padding: 16px 40px;
    background: var(--gradient-btn);
    color: #0a0a1a;
    font-weight: 700;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    box-shadow: var(--shadow-md), var(--shadow-glow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
}

#hero div a[role="button"]:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(255,215,0,0.3);
}

#hero div a[role="button"]:active {
    transform: translateY(0) scale(0.98);
}

#hero figure {
    margin-top: 50px;
    animation: slideUp 0.8s ease-out 0.3s both;
}

#hero figure img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

#hero figure img:hover {
    transform: scale(1.01);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(255,215,0,0.1);
}

/* 通用章节样式 */
section {
    margin: 60px 0;
    padding: 40px 30px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    animation: fadeInUp 0.6s ease-out;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
}

section:hover {
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    transform: translateY(-2px);
}

section h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 24px;
    position: relative;
    display: inline-block;
    letter-spacing: -0.3px;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--gradient-btn);
    border-radius: 2px;
}

section h3 {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--text-primary);
    margin: 20px 0 10px;
    font-weight: 600;
}

section p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 1rem;
    line-height: 1.8;
}

section ul, section ol {
    padding-left: 24px;
    margin: 16px 0;
    color: var(--text-secondary);
}

section ul li, section ol li {
    margin-bottom: 10px;
    line-height: 1.7;
    position: relative;
}

section ul li::marker {
    color: var(--accent-gold);
}

section ol li::marker {
    color: var(--accent-gold);
    font-weight: 600;
}

/* 产品卡片 */
#products article, #services article, #case-studies article, #insights article {
    background: var(--glass-bg);
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    margin-top: 20px;
}

#products article:hover, #services article:hover, #case-studies article:hover, #insights article:hover {
    background: rgba(255, 215, 0, 0.06);
    border-color: rgba(255, 215, 0, 0.3);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

#products article figure img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin-top: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

#products article figure img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

/* 用户评价 */
blockquote {
    background: var(--glass-bg);
    border-left: 4px solid var(--accent-gold);
    padding: 20px 24px;
    margin: 20px 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: var(--transition);
}

blockquote:hover {
    background: rgba(255, 215, 0, 0.06);
    transform: translateX(4px);
}

blockquote p {
    font-style: italic;
    font-size: 1.05rem;
    margin-bottom: 8px;
}

blockquote cite {
    color: var(--accent-gold);
    font-style: normal;
    font-weight: 500;
    font-size: 0.9rem;
}

/* 常见问题 details */
details {
    background: var(--glass-bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    margin: 12px 0;
    overflow: hidden;
    transition: var(--transition);
}

details:hover {
    border-color: rgba(255, 215, 0, 0.3);
}

details summary {
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    transition: var(--transition);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

details summary::before {
    content: '▸';
    color: var(--accent-gold);
    transition: var(--transition);
    font-size: 1.2rem;
}

details[open] summary::before {
    transform: rotate(90deg);
}

details summary:hover {
    background: rgba(255, 215, 0, 0.04);
}

details p {
    padding: 0 20px 16px;
    color: var(--text-secondary);
    margin: 0;
}

/* 联系地址 */
address {
    font-style: normal;
    background: var(--glass-bg);
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    line-height: 2;
}

address p {
    margin-bottom: 8px;
}

address p::before {
    content: '• ';
    color: var(--accent-gold);
}

/* 页脚 */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--glass-border);
    padding: 40px 20px 30px;
    margin-top: 60px;
    text-align: center;
}

footer nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin-bottom: 24px;
}

footer nav ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: var(--transition);
}

footer nav ul li a:hover {
    color: var(--accent-gold);
    background: rgba(255, 215, 0, 0.06);
}

footer p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 6px 0;
}

/* 滚动动画（基础） */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

/* 响应式设计 */
@media (max-width: 1024px) {
    main {
        padding: 0 16px;
    }
    
    section {
        padding: 30px 20px;
        margin: 40px 0;
    }
    
    #hero {
        padding: 100px 16px 60px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 15px;
    }
    
    header {
        padding: 0 12px;
    }
    
    header nav ul {
        gap: 2px;
        padding: 10px 0;
    }
    
    header nav ul li a {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    #hero {
        padding: 80px 16px 50px;
        min-height: auto;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
    
    #hero div {
        gap: 14px;
    }
    
    #hero div a[role="button"] {
        padding: 14px 30px;
        font-size: 0.95rem;
    }
    
    #hero figure {
        margin-top: 30px;
    }
    
    section {
        padding: 24px 16px;
        margin: 30px 0;
        border-radius: var(--radius-md);
    }
    
    section h2 {
        font-size: 1.4rem;
    }
    
    blockquote {
        padding: 16px 18px;
    }
    
    footer {
        padding: 30px 16px 20px;
    }
    
    footer nav ul {
        gap: 4px;
    }
    
    footer nav ul li a {
        padding: 4px 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    header nav ul li a {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    #hero h1 {
        font-size: 1.8rem;
    }
    
    #hero p {
        font-size: 0.95rem;
    }
    
    #hero div a[role="button"] {
        padding: 12px 24px;
        font-size: 0.9rem;
        width: 100%;
        max-width: 260px;
    }
    
    section {
        padding: 20px 12px;
        margin: 20px 0;
    }
    
    section ul, section ol {
        padding-left: 18px;
    }
}

/* 辅助功能与平滑 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* 焦点可见性 */
a:focus-visible,
button:focus-visible,
details summary:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* 打印样式 */
@media print {
    header {
        position: static;
        background: #fff;
        border-bottom: 1px solid #ddd;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    section {
        background: #fff;
        border: 1px solid #ddd;
        box-shadow: none;
    }
    
    #hero {
        background: #f5f5f5;
        min-height: auto;
        padding: 40px 20px;
    }
    
    #hero h1 {
        -webkit-text-fill-color: #b8860b;
        color: #b8860b;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
}