/* 妖精动漫 - 完整样式表 */
/* 基础重置与全局变量 */
:root {
    --primary: #6c5ce7;
    --primary-light: #a29bfe;
    --primary-dark: #4834d4;
    --accent: #fd79a8;
    --accent-light: #fab1c0;
    --bg: #0f0f1a;
    --bg-card: rgba(255,255,255,0.05);
    --bg-glass: rgba(255,255,255,0.08);
    --text: #e0e0e0;
    --text-light: #b0b0b0;
    --text-heading: #ffffff;
    --border: rgba(255,255,255,0.1);
    --shadow: 0 8px 32px rgba(0,0,0,0.3);
    --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;
    --banner-gradient: linear-gradient(135deg, #6c5ce7 0%, #fd79a8 50%, #fdcb6e 100%);
}

/* 暗色模式默认启用，同时支持系统偏好 */
@media (prefers-color-scheme: light) {
    :root {
        --primary: #6c5ce7;
        --primary-light: #a29bfe;
        --primary-dark: #4834d4;
        --accent: #e17055;
        --accent-light: #fab1c0;
        --bg: #f5f6fa;
        --bg-card: rgba(255,255,255,0.8);
        --bg-glass: rgba(255,255,255,0.6);
        --text: #2d3436;
        --text-light: #636e72;
        --text-heading: #2d3436;
        --border: rgba(0,0,0,0.1);
        --shadow: 0 8px 32px rgba(0,0,0,0.08);
        --banner-gradient: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 40%, #fd79a8 100%);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* 通用动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

section {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

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; }
section:nth-child(9) { animation-delay: 0.9s; }
section:nth-child(10) { animation-delay: 1.0s; }

/* 头部导航 */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    transition: var(--transition);
}

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

@media (prefers-color-scheme: light) {
    header:hover {
        background: rgba(245, 246, 250, 0.98);
    }
}

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

nav a img {
    height: 40px;
    transition: var(--transition);
    filter: drop-shadow(0 2px 8px rgba(108,92,231,0.3));
}

nav a img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 16px rgba(108,92,231,0.5));
}

nav ul {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    flex-wrap: wrap;
    justify-content: center;
}

nav ul li a {
    text-decoration: none;
    color: var(--text);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

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

nav ul li a:hover {
    color: var(--primary-light);
    background: var(--bg-card);
}

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

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

nav div input {
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: 50px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
    width: 200px;
}

nav div input:focus {
    border-color: var(--primary);
    width: 260px;
    box-shadow: 0 0 0 3px rgba(108,92,231,0.2);
}

nav div input::placeholder {
    color: var(--text-light);
}

nav div button {
    padding: 0.6rem 1.4rem;
    border: none;
    border-radius: 50px;
    background: var(--banner-gradient);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    background-size: 200% auto;
}

nav div button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108,92,231,0.4);
    background-position: right center;
}

/* Banner 主视觉 */
#banner {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
    background: var(--banner-gradient);
    position: relative;
    overflow: hidden;
    animation: none;
    opacity: 1;
}

#banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.1) 0%, transparent 60%),
                radial-gradient(circle at 80% 70%, rgba(108,92,231,0.2) 0%, transparent 50%);
    pointer-events: none;
}

#banner::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 120px;
    background: var(--bg);
    clip-path: ellipse(70% 100% at 50% 100%);
}

#banner h1 {
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    font-weight: 800;
    color: #fff;
    text-shadow: 0 4px 30px rgba(0,0,0,0.2);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    position: relative;
    z-index: 1;
    animation: float 4s ease-in-out infinite;
}

#banner p {
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: rgba(255,255,255,0.9);
    max-width: 700px;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(4px);
    padding: 1rem 2rem;
    border-radius: var(--radius);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
}

#banner a {
    display: inline-block;
    padding: 1rem 3rem;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    font-size: 1.1rem;
    transition: var(--transition);
    position: relative;
    z-index: 1;
    letter-spacing: 1px;
}

#banner a:hover {
    background: #fff;
    color: var(--primary-dark);
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    border-color: #fff;
}

/* 通用内容区 */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 5rem 0;
    border-bottom: 1px solid var(--border);
}

section:last-of-type {
    border-bottom: none;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 2.5rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--banner-gradient);
    border-radius: 4px;
}

h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 2rem 0 1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text);
    max-width: 800px;
}

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

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

/* 卡片式内容块 - 毛玻璃效果 */
#about, #products, #solutions, #cases, #news, #faq, #howto, #contact {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 3rem;
    margin: 2rem 0;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

#about:hover, #products:hover, #solutions:hover, #cases:hover, #news:hover, #faq:hover, #howto:hover, #contact:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(108,92,231,0.15);
    border-color: var(--primary-light);
}

/* 新闻文章卡片 */
#news article {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-sm);
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

#news article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--banner-gradient);
    opacity: 0;
    transition: var(--transition);
}

#news article:hover {
    transform: translateX(6px);
    border-color: var(--primary-light);
    box-shadow: 0 8px 24px rgba(108,92,231,0.1);
}

#news article:hover::before {
    opacity: 1;
}

#news article h3 {
    font-size: 1.2rem;
    margin: 0 0 0.5rem;
}

#news article time {
    font-size: 0.85rem;
    color: var(--text-light);
    display: block;
    margin-bottom: 0.75rem;
}

#news article p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

#news article a {
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

#news article a::after {
    content: '→';
    transition: var(--transition);
}

#news article a:hover::after {
    transform: translateX(4px);
}

/* FAQ 折叠面板 */
details {
    background: var(--bg-glass);
    backdrop-filter: blur(6px);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    border: 1px solid var(--border);
    transition: var(--transition);
    overflow: hidden;
}

details:hover {
    border-color: var(--primary-light);
}

details summary {
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-heading);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

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

details summary::after {
    content: '▾';
    font-size: 1.2rem;
    transition: var(--transition);
    color: var(--primary-light);
}

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

details[open] summary {
    border-bottom: 1px solid var(--border);
    background: rgba(108,92,231,0.05);
}

details p {
    padding: 1.2rem 1.5rem;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.8;
}

/* HowTo 步骤列表 */
#howto ol {
    padding-left: 1.8rem;
    margin: 1.5rem 0;
}

#howto ol li {
    padding: 0.8rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
    transition: var(--transition);
    list-style-position: inside;
}

#howto ol li:hover {
    transform: translateX(6px);
    border-left-color: var(--accent);
    background: rgba(108,92,231,0.08);
}

#howto p {
    font-size: 0.95rem;
}

/* 联系我们 */
#contact p {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#contact p:last-of-type {
    border-bottom: none;
}

#contact p::before {
    content: '✦';
    color: var(--primary-light);
    font-size: 0.8rem;
}

/* 页脚 */
footer {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: 3rem 2rem;
    margin-top: 3rem;
    border-radius: var(--radius) var(--radius) 0 0;
    text-align: center;
}

footer p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    max-width: 100%;
}

footer a {
    color: var(--text-light);
    margin: 0 0.5rem;
    font-size: 0.9rem;
}

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

/* 响应式设计 */
@media (max-width: 1024px) {
    main {
        padding: 0 1.5rem;
    }
    
    #about, #products, #solutions, #cases, #news, #faq, #howto, #contact {
        padding: 2rem 1.5rem;
    }
    
    nav div input {
        width: 150px;
    }
    
    nav div input:focus {
        width: 200px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 0 1rem;
    }
    
    nav {
        flex-direction: column;
        align-items: stretch;
        padding: 0.5rem 0;
    }
    
    nav a img {
        align-self: center;
        height: 36px;
    }
    
    nav ul {
        justify-content: center;
        gap: 0.1rem;
    }
    
    nav ul li a {
        padding: 0.4rem 0.7rem;
        font-size: 0.85rem;
    }
    
    nav div {
        justify-content: center;
    }
    
    nav div input {
        width: 140px;
        font-size: 0.85rem;
    }
    
    nav div input:focus {
        width: 180px;
    }
    
    #banner {
        padding: 6rem 1.5rem 3rem;
        min-height: 80vh;
    }
    
    #banner p {
        padding: 0.8rem 1.2rem;
        font-size: 0.95rem;
    }
    
    #banner a {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
    
    section {
        padding: 3rem 0;
    }
    
    #about, #products, #solutions, #cases, #news, #faq, #howto, #contact {
        padding: 1.5rem 1.2rem;
        margin: 1.5rem 0;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    #news article {
        padding: 1rem 1.2rem;
    }
    
    details summary {
        padding: 1rem 1.2rem;
        font-size: 0.95rem;
    }
    
    details p {
        padding: 1rem 1.2rem;
        font-size: 0.9rem;
    }
    
    footer {
        padding: 2rem 1rem;
    }
    
    footer p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    nav ul li a {
        font-size: 0.8rem;
        padding: 0.3rem 0.5rem;
    }
    
    nav div input {
        width: 110px;
        font-size: 0.8rem;
    }
    
    nav div input:focus {
        width: 140px;
    }
    
    #banner h1 {
        font-size: 1.8rem;
    }
    
    #banner p {
        font-size: 0.9rem;
    }
    
    #about, #products, #solutions, #cases, #news, #faq, #howto, #contact {
        padding: 1.2rem 1rem;
    }
}

/* 暗色模式微调 */
@media (prefers-color-scheme: dark) {
    #banner::after {
        background: #0f0f1a;
    }
    
    nav div input {
        color-scheme: dark;
    }
}

/* 打印样式 */
@media print {
    header, #banner, footer {
        display: none;
    }
    
    body {
        background: #fff;
        color: #000;
    }
    
    section {
        page-break-inside: avoid;
        border: none;
        padding: 1rem 0;
    }
}