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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover {
    color: #ff6b81;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

/* ===== 自定义属性 ===== */
:root {
    --primary: #1a1a2e;
    --secondary: #16213e;
    --accent: #e94560;
    --accent2: #0f3460;
    --text: #f5f5f5;
    --text2: #b0b0b0;
    --card: #16213e;
    --bg: #0f0f23;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --radius: 16px;
    --transition: 0.3s ease;
    --glass-bg: rgba(15, 15, 35, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --hero-gradient: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
}

/* ===== 容器 ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== 区块 ===== */
section {
    padding: 80px 0;
}

/* ===== 标题 ===== */
h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin-top: 8px;
    border-radius: 2px;
    transition: width 0.4s ease;
}

h2:hover::after {
    width: 100px;
}

h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

p {
    color: var(--text2);
    margin-bottom: 1rem;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-block;
    padding: 12px 32px;
    background: var(--accent);
    color: #fff;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(233, 69, 96, 0.4);
    color: #fff;
    background: #d63851;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ===== 卡片 ===== */
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(233, 69, 96, 0.3);
}

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

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* ===== 工具类 ===== */
.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-2 {
    margin-top: 2rem;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gap-1 {
    gap: 1rem;
}

.gap-2 {
    gap: 2rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== 毛玻璃效果 ===== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

/* ===== Header ===== */
#header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(15, 15, 35, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.3s, box-shadow 0.3s;
}

#header.scrolled {
    background: rgba(15, 15, 35, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

#header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

#header a[aria-label="mk体育 首页"] {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    transition: color var(--transition);
}

#header a[aria-label="mk体育 首页"]:hover {
    color: var(--accent);
}

#header nav ul {
    display: flex;
    gap: 24px;
    list-style: none;
    font-weight: 500;
    font-size: 0.95rem;
}

#header nav ul li a {
    position: relative;
    padding: 4px 0;
    transition: color var(--transition);
}

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

#header nav ul li a:hover::after,
#header nav ul li a.active::after {
    width: 100%;
}

#header nav ul li a.active {
    color: var(--accent);
}

#mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    transition: color var(--transition);
}

#mobile-menu-btn:hover {
    color: var(--accent);
}

/* ===== Hero 区域 ===== */
#hero {
    padding-top: 120px;
    padding-bottom: 100px;
    background: var(--hero-gradient);
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(233, 69, 96, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: float 8s ease-in-out infinite;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(15, 52, 96, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: float 10s ease-in-out infinite reverse;
}

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

#hero .container {
    position: relative;
    z-index: 1;
}

#hero h1 {
    animation: fadeInUp 0.8s ease forwards;
}

#hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

#hero .btn {
    animation: fadeInUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

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

/* ===== 关于我们 ===== */
#about .grid-2 {
    align-items: center;
}

#about .card {
    background: var(--secondary);
    border-color: rgba(233, 69, 96, 0.2);
}

/* ===== 产品 ===== */
#products {
    background: var(--secondary);
}

#products .card div:first-child {
    width: 60px;
    height: 60px;
    background: var(--accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    transition: transform var(--transition), background var(--transition);
}

#products .card:hover div:first-child {
    transform: rotate(5deg) scale(1.1);
    background: #d63851;
}

#products .card a {
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
    transition: transform var(--transition);
}

#products .card a:hover {
    transform: translateX(4px);
}

/* ===== 服务 ===== */
#services .card {
    transition: transform var(--transition), background var(--transition);
}

#services .card:hover {
    background: rgba(233, 69, 96, 0.05);
}

/* ===== 优势 ===== */
#advantages {
    background: var(--secondary);
}

#advantages .card {
    padding: 24px 16px;
    text-align: center;
    transition: transform var(--transition), background var(--transition);
}

#advantages .card:hover {
    transform: translateY(-6px);
    background: rgba(233, 69, 96, 0.08);
}

#advantages .card div:first-child {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    transition: transform var(--transition);
}

#advantages .card:hover div:first-child {
    transform: scale(1.2);
}

#advantages .card p {
    font-size: 0.9rem;
}

/* ===== 用户心声 ===== */
#testimonials blockquote.card {
    font-style: italic;
    transition: transform var(--transition), border-color var(--transition);
}

#testimonials blockquote.card:hover {
    border-color: var(--accent);
}

#testimonials blockquote.card footer {
    margin-top: 1rem;
    font-style: normal;
    font-weight: 600;
    color: var(--accent);
}

/* ===== 洞察 ===== */
#insights {
    background: var(--secondary);
}

#insights .card {
    transition: transform var(--transition), background var(--transition);
}

#insights .card:hover {
    background: rgba(233, 69, 96, 0.05);
}

#insights .card p {
    font-size: 0.9rem;
}

#insights .card div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text2);
}

#insights .card div a {
    transition: transform var(--transition);
}

#insights .card div a:hover {
    transform: translateX(4px);
}

/* ===== 操作指南 ===== */
#howto .grid-2 {
    max-width: 800px;
    margin: 0 auto;
}

#howto .card {
    transition: transform var(--transition), border-color var(--transition);
}

#howto .card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

#howto .text-center p {
    font-size: 0.9rem;
    color: var(--text2);
}

/* ===== FAQ ===== */
#faq {
    background: var(--secondary);
}

#faq details.card {
    margin-bottom: 12px;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}

#faq details.card:hover {
    border-color: rgba(233, 69, 96, 0.3);
    background: rgba(233, 69, 96, 0.03);
}

#faq details.card[open] {
    border-color: var(--accent);
    background: rgba(233, 69, 96, 0.05);
}

#faq details.card summary {
    font-weight: 600;
    font-size: 1.05rem;
    padding: 8px 0;
    transition: color var(--transition);
}

#faq details.card[open] summary {
    color: var(--accent);
}

#faq details.card p {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===== 联系我们 ===== */
#contact .grid-2 {
    max-width: 800px;
    margin: 0 auto;
}

#contact .card p {
    margin-bottom: 0.5rem;
}

#contact .card p:last-child {
    margin-bottom: 0;
}

/* ===== Footer ===== */
footer {
    background: var(--card);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 48px 0 24px;
}

footer .grid-4 {
    margin-bottom: 32px;
}

footer h4 {
    margin-bottom: 12px;
    transition: color var(--transition);
}

footer h4:first-child {
    color: var(--accent);
}

footer ul {
    list-style: none;
    font-size: 0.9rem;
}

footer ul li {
    margin-bottom: 6px;
}

footer ul li a {
    transition: color var(--transition), padding-left var(--transition);
}

footer ul li a:hover {
    color: var(--accent);
    padding-left: 4px;
}

footer .container > div:last-child {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 16px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text2);
}

footer .container > div:last-child p {
    margin-bottom: 4px;
}

/* ===== 返回顶部 ===== */
#back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    display: none;
    z-index: 999;
    transition: opacity 0.3s, transform 0.3s, background 0.3s;
}

#back-to-top:hover {
    transform: translateY(-4px);
    background: #d63851;
    box-shadow: 0 8px 24px rgba(233, 69, 96, 0.4);
}

/* ===== 滚动动画 ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }

    .container {
        padding: 0 16px;
    }

    .card {
        padding: 24px;
    }

    #header .container {
        height: 56px;
    }

    #header nav ul {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: rgba(15, 15, 35, 0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 16px 24px;
        gap: 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    }

    #header nav ul.show {
        display: flex;
    }

    #mobile-menu-btn {
        display: block;
    }

    #hero {
        padding-top: 100px;
        padding-bottom: 80px;
    }

    #hero h1 {
        font-size: 2rem;
    }

    #hero p {
        font-size: 1rem;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        gap: 16px;
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    #back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    #howto .grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .grid-4 {
        grid-template-columns: 1fr;
    }

    #hero .btn {
        padding: 10px 24px;
        font-size: 0.9rem;
    }

    #hero .btn + .btn {
        margin-top: 8px;
    }

    footer .grid-4 {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* ===== 暗色模式增强 ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f0f23;
        --text: #f5f5f5;
        --text2: #b0b0b0;
        --card: #16213e;
        --primary: #1a1a2e;
        --secondary: #16213e;
    }
}

/* ===== 打印样式 ===== */
@media print {
    #header,
    #back-to-top,
    #mobile-menu-btn {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}