/* ===== 全局重置 & 基础 ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background: #0f0f1a;
    color: #e0e0e0;
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}
a {
    color: inherit;
    text-decoration: none;
}
ul, ol {
    list-style: none;
}
img, svg {
    max-width: 100%;
    display: block;
}

/* ===== 暗色模式 (默认) ===== */
:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(26, 26, 46, 0.7);
    --bg-glass: rgba(255, 255, 255, 0.06);
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0b0;
    --accent: #e94560;
    --accent-hover: #ff6b81;
    --border: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.3s ease;
}

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

/* ===== 通用 section 样式 ===== */
section {
    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; }
section:nth-child(9) { animation-delay: 0.9s; }
section:nth-child(10) { animation-delay: 1.0s; }
section:nth-child(11) { animation-delay: 1.1s; }
section:nth-child(12) { animation-delay: 1.2s; }
section:nth-child(13) { animation-delay: 1.3s; }
section:nth-child(14) { animation-delay: 1.4s; }

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

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
    color: #fff;
}
h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #ff8a5c);
    border-radius: 2px;
}
@media (max-width: 768px) {
    h2 {
        font-size: 1.6rem;
    }
}

/* ===== 头部导航 ===== */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(15, 15, 26, 0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}
header nav > div {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.8rem 1.5rem;
}
header nav a[aria-label="MK体育首页"] {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), #ff8a5c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform var(--transition);
}
header nav a[aria-label="MK体育首页"]:hover {
    transform: scale(1.05);
}
header nav ul {
    display: flex;
    gap: 1.5rem;
}
header nav ul li a {
    font-size: 0.95rem;
    padding: 0.4rem 0.2rem;
    position: relative;
    transition: color var(--transition);
}
header nav ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition);
}
header nav ul li a:hover {
    color: var(--accent);
}
header nav ul li a:hover::after {
    width: 100%;
}

/* ===== Hero 区域 ===== */
#hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
    overflow: hidden;
    padding: 100px 20px;
}
#hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(233, 69, 96, 0.15), transparent 60%),
                radial-gradient(circle at 70% 60%, rgba(255, 138, 92, 0.1), transparent 50%);
    animation: heroGlow 12s ease-in-out infinite alternate;
}
@keyframes heroGlow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(5%, 5%); }
}
#hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #e0e0e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}
#hero p {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 1.2rem auto;
    color: #c0c0d0;
    position: relative;
    z-index: 1;
}
#hero a {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent), #ff6b4a);
    color: #fff;
    padding: 14px 36px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 20px rgba(233, 69, 96, 0.4);
    position: relative;
    z-index: 1;
}
#hero a:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(233, 69, 96, 0.6);
}

/* ===== 通用卡片样式 ===== */
#products article,
#services ul,
#features ul,
#workflow ol,
#cases p,
#testimonials blockquote,
#knowledge ul,
#howto ol,
#faq details,
#contact ul {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}
#products article:hover,
#services ul:hover,
#features ul:hover,
#workflow ol:hover,
#cases p:hover,
#testimonials blockquote:hover,
#knowledge ul:hover,
#howto ol:hover,
#faq details:hover,
#contact ul:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

/* ===== Products 网格 ===== */
#products {
    background: #14142a;
}
#products > div {
    max-width: 1100px;
    margin: 0 auto;
}
#products .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}
#products article h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: #fff;
}
#products article p {
    color: var(--text-secondary);
}

/* ===== Services / Features / Workflow 等 ===== */
#services ul,
#features ul,
#workflow ol {
    line-height: 2;
    padding-left: 1.5rem;
}
#services ul li,
#features ul li {
    padding: 0.3rem 0;
}
#workflow ol {
    list-style: decimal inside;
}
#workflow ol li {
    padding: 0.3rem 0;
}

/* ===== Blockquote ===== */
#testimonials blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
}
#testimonials blockquote footer {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== FAQ details ===== */
#faq details {
    margin-bottom: 1rem;
    cursor: pointer;
    padding: 1rem 1.5rem;
}
#faq details summary {
    font-weight: 600;
    color: #fff;
    outline: none;
    transition: color var(--transition);
}
#faq details summary::-webkit-details-marker {
    color: var(--accent);
}
#faq details[open] summary {
    color: var(--accent);
}
#faq details p {
    margin-top: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== 知识中心 ===== */
#knowledge ul li {
    margin-bottom: 0.8rem;
}
#knowledge ul li a {
    color: var(--accent);
    transition: color var(--transition), padding-left var(--transition);
    display: inline-block;
}
#knowledge ul li a:hover {
    color: var(--accent-hover);
    padding-left: 6px;
}

/* ===== 联系 ===== */
#contact ul li {
    padding: 0.4rem 0;
}

/* ===== Footer ===== */
footer {
    background: #0a0a16;
    color: #a0a0b0;
    padding: 3rem 1.5rem;
    text-align: center;
    border-top: 1px solid var(--border);
}
footer p.footer-brand {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), #ff8a5c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
footer a {
    color: #c0c0d0;
    transition: color var(--transition);
}
footer a:hover {
    color: var(--accent);
}
footer nav a {
    margin: 0 0.8rem;
    font-size: 0.9rem;
}
footer p small {
    font-size: 0.85rem;
}

/* ===== 回到顶部 ===== */
aside a {
    background: linear-gradient(135deg, var(--accent), #ff6b4a);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(233, 69, 96, 0.5);
    transition: transform var(--transition), box-shadow var(--transition);
    font-size: 1.4rem;
}
aside a:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(233, 69, 96, 0.7);
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    #hero h1 {
        font-size: 2.2rem;
    }
    #hero p {
        font-size: 1.1rem;
    }
}
@media (max-width: 768px) {
    header nav > div {
        flex-direction: column;
        gap: 0.8rem;
        align-items: center;
    }
    header nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    #hero {
        padding: 70px 16px;
    }
    #hero h1 {
        font-size: 1.8rem;
    }
    #hero p {
        font-size: 1rem;
    }
    #products .grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    section {
        padding: 40px 16px !important;
    }
    h2 {
        font-size: 1.4rem;
    }
    footer nav a {
        display: inline-block;
        margin: 0.3rem 0.5rem;
    }
    aside a {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}
@media (max-width: 480px) {
    #hero h1 {
        font-size: 1.5rem;
    }
    #hero a {
        padding: 12px 28px;
        font-size: 1rem;
    }
    header nav a[aria-label="MK体育首页"] {
        font-size: 1.3rem;
    }
}

/* ===== 暗色模式微调（保留默认暗色） ===== */
@media (prefers-color-scheme: light) {
    body {
        background: #f5f5fa;
        color: #1a1a2e;
    }
    :root {
        --bg-primary: #f5f5fa;
        --bg-secondary: #ffffff;
        --bg-card: rgba(255, 255, 255, 0.8);
        --text-primary: #1a1a2e;
        --text-secondary: #555;
        --border: rgba(0, 0, 0, 0.08);
        --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    }
    header {
        background: rgba(255, 255, 255, 0.85);
        border-bottom: 1px solid var(--border);
    }
    #hero {
        background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    }
    #hero h1 {
        background: linear-gradient(135deg, #1a1a2e, #2d2d44);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    #hero p {
        color: #333;
    }
    #products {
        background: #eef0f6;
    }
    #products article h3,
    #faq details summary {
        color: #1a1a2e;
    }
    footer {
        background: #e8eaf0;
        color: #555;
        border-top: 1px solid var(--border);
    }
    footer a {
        color: #333;
    }
    footer a:hover {
        color: var(--accent);
    }
    aside a {
        box-shadow: 0 4px 16px rgba(233, 69, 96, 0.3);
    }
    #testimonials blockquote {
        border-left-color: var(--accent);
    }
}