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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1e1e2f;
    background: #f4f6fc;
    transition: background 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
}

body.dark-mode {
    background: #0d0d1a;
    color: #e0e0f0;
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #e0e5f0;
    border-radius: 4px;
}
body.dark-mode ::-webkit-scrollbar-track {
    background: #1a1a2e;
}
::-webkit-scrollbar-thumb {
    background: #0f3460;
    border-radius: 4px;
}
body.dark-mode ::-webkit-scrollbar-thumb {
    background: #4fc3f7;
}

/* ===== 选中样式 ===== */
::selection {
    background: #0f3460;
    color: #fff;
}
body.dark-mode ::selection {
    background: #4fc3f7;
    color: #0d0d1a;
}

/* ===== 头部导航 ===== */
header {
    background: rgba(26, 26, 46, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    padding: 0.8rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease, background 0.3s ease;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

header.sticky {
    box-shadow: 0 4px 20px rgba(0,0,0,0.35);
    background: rgba(26, 26, 46, 0.98);
}

body.dark-mode header {
    background: rgba(13, 13, 26, 0.95);
    border-bottom-color: rgba(255,255,255,0.05);
}

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

nav a[aria-label="乐竞体育首页"] svg {
    display: block;
    transition: transform 0.3s ease;
}
nav a[aria-label="乐竞体育首页"]:hover svg {
    transform: scale(1.04);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

nav ul li a {
    color: #e0e0f0;
    text-decoration: none;
    padding: 0.4rem 0.9rem;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.3s, color 0.3s, transform 0.2s;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #e94560;
    transition: width 0.3s ease, left 0.3s ease;
    border-radius: 2px;
}

nav ul li a:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
    transform: translateY(-1px);
}

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

nav ul li a.active {
    background: rgba(233, 69, 96, 0.25);
    color: #fff;
}
nav ul li a.active::after {
    width: 60%;
    left: 20%;
    background: #e94560;
}

#menuToggle,
#darkModeToggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: 8px;
    transition: background 0.3s, transform 0.2s;
    line-height: 1;
}

#menuToggle:hover,
#darkModeToggle:hover {
    background: rgba(255,255,255,0.15);
    transform: scale(1.05);
}

/* ===== 主内容区 ===== */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ===== 通用卡片区域 ===== */
section {
    margin-bottom: 2.5rem;
    padding: 2.5rem 2rem;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255,255,255,0.6);
    transition: background 0.4s ease, box-shadow 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s 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; }

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

section:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.10);
    transform: translateY(-3px);
}

body.dark-mode section {
    background: rgba(30, 30, 50, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

body.dark-mode section:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

/* ===== 标题 ===== */
h1, h2, h3 {
    color: #1a1a2e;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3 {
    color: #f0f0ff;
}

h1 {
    font-size: 2.8rem;
    line-height: 1.2;
    background: linear-gradient(135deg, #fff, #e0e8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.dark-mode h1 {
    background: linear-gradient(135deg, #f0f0ff, #4fc3f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 2rem;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, #0f3460, #e94560) 1;
    padding-bottom: 0.6rem;
    display: inline-block;
}

h3 {
    font-size: 1.4rem;
    color: #0f3460;
}

body.dark-mode h3 {
    color: #4fc3f7;
}

p {
    margin-bottom: 1rem;
    color: #333;
}

body.dark-mode p {
    color: #c8c8e0;
}

/* ===== 链接 ===== */
a {
    color: #0f3460;
    text-decoration: none;
    transition: color 0.3s, border-bottom 0.3s;
}

body.dark-mode a {
    color: #4fc3f7;
}

a:hover {
    color: #e94560;
    text-decoration: underline;
}

body.dark-mode a:hover {
    color: #ff8a80;
}

/* ===== Hero 区域 ===== */
#hero {
    text-align: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
    color: #fff;
    padding: 4rem 2rem;
    border: none;
    box-shadow: 0 12px 40px rgba(15, 52, 96, 0.25);
    position: relative;
    overflow: hidden;
}

#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%);
    animation: heroGlow 8s ease-in-out infinite alternate;
}

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

#hero h1 {
    font-size: 3rem;
    margin-bottom: 0.8rem;
    position: relative;
    z-index: 1;
}

#hero p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.85);
    max-width: 600px;
    margin: 0 auto 2rem;
    position: relative;
    z-index: 1;
}

#hero div:first-of-type {
    position: relative;
    z-index: 1;
}

#hero a[role="button"] {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    margin: 0.4rem;
    background: linear-gradient(135deg, #e94560, #c23152);
    color: #fff;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.35);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    border: 1px solid rgba(255,255,255,0.15);
    position: relative;
    z-index: 1;
}

#hero a[role="button"]:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(233, 69, 96, 0.5);
    background: linear-gradient(135deg, #ff5a7a, #d43a5a);
}

#hero a[role="button"]:active {
    transform: scale(0.97);
}

/* 轮播 */
#bannerCarousel {
    margin-top: 2.5rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

#bannerCarousel figure {
    margin: 0;
    display: none;
    animation: fadeSlide 0.6s ease;
}

#bannerCarousel figure:first-child {
    display: block;
}

@keyframes fadeSlide {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

#bannerCarousel img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
}

/* ===== 产品卡片 ===== */
#products > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

#products article {
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 2rem 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode #products article {
    background: rgba(40,40,70,0.6);
    border-color: rgba(255,255,255,0.08);
}

#products article:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.10);
}

#products article h3 {
    margin-bottom: 0.8rem;
}

#products article a {
    display: inline-block;
    margin-top: 0.8rem;
    padding: 0.5rem 1.5rem;
    background: #0f3460;
    color: #fff;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.3s, transform 0.2s;
}

body.dark-mode #products article a {
    background: #4fc3f7;
    color: #0d0d1a;
}

#products article a:hover {
    background: #e94560;
    transform: scale(1.04);
    text-decoration: none;
}

/* ===== 列表样式 ===== */
ul, ol {
    padding-left: 1.8rem;
    margin-bottom: 1.2rem;
}

ul li, ol li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* ===== 引用块 ===== */
blockquote {
    border-left: 4px solid #e94560;
    padding: 0.8rem 1.2rem;
    margin: 1.2rem 0;
    font-style: italic;
    background: rgba(233,69,96,0.06);
    border-radius: 0 12px 12px 0;
    transition: background 0.3s;
}

body.dark-mode blockquote {
    background: rgba(233,69,96,0.12);
    border-left-color: #ff8a80;
}

blockquote footer {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

body.dark-mode blockquote footer {
    color: #aaa;
}

/* ===== 知识中心 ===== */
#insights {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

#insights h2 {
    grid-column: 1 / -1;
}

#insights article {
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.4);
    transition: transform 0.3s, box-shadow 0.3s;
}

body.dark-mode #insights article {
    background: rgba(40,40,70,0.5);
    border-color: rgba(255,255,255,0.06);
}

#insights article:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

#insights article h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

#insights article time {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.5rem;
}

body.dark-mode #insights article time {
    color: #999;
}

#insights article a {
    font-weight: 600;
    font-size: 0.9rem;
}

/* ===== FAQ ===== */
details {
    margin-bottom: 0.6rem;
    padding: 0.8rem 1.2rem;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 14px;
    cursor: pointer;
    background: rgba(255,255,255,0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

body.dark-mode details {
    border-color: rgba(255,255,255,0.10);
    background: rgba(30,30,50,0.4);
}

details:hover {
    border-color: #0f3460;
    box-shadow: 0 2px 12px rgba(15,52,96,0.08);
}

body.dark-mode details:hover {
    border-color: #4fc3f7;
}

details[open] {
    background: rgba(15, 52, 96, 0.06);
    border-color: #0f3460;
}

body.dark-mode details[open] {
    background: rgba(79, 195, 247, 0.08);
    border-color: #4fc3f7;
}

details summary {
    font-weight: 600;
    color: #1a1a2e;
    padding: 0.2rem 0;
    outline: none;
}

body.dark-mode details summary {
    color: #e0e0f0;
}

details[open] summary {
    color: #0f3460;
}

body.dark-mode details[open] summary {
    color: #4fc3f7;
}

details div {
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(0,0,0,0.06);
}

body.dark-mode details div {
    border-top-color: rgba(255,255,255,0.08);
}

/* ===== HowTo ===== */
#howto ol {
    counter-reset: step-counter;
    list-style: none;
    padding-left: 0;
}

#howto ol li {
    counter-increment: step-counter;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.2rem;
    padding: 1rem 1.2rem;
    background: rgba(255,255,255,0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

body.dark-mode #howto ol li {
    background: rgba(40,40,70,0.4);
    border-color: rgba(255,255,255,0.06);
}

#howto ol li:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

#howto ol li::before {
    content: counter(step-counter);
    background: linear-gradient(135deg, #0f3460, #e94560);
    color: #fff;
    font-weight: 700;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

#howto ol li div {
    flex: 1;
}

#howto ol li p {
    margin-bottom: 0;
}

/* ===== 联系我们 ===== */
address p {
    margin-bottom: 0.5rem;
    font-style: normal;
}

address a {
    font-weight: 600;
}

/* ===== 页脚 ===== */
footer {
    background: #1a1a2e;
    color: #c0c0d0;
    padding: 2.5rem 2rem;
    text-align: center;
    margin-top: 2rem;
}

body.dark-mode footer {
    background: #0d0d1a;
}

footer nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-bottom: 1.2rem;
    padding: 0;
}

footer nav ul li a {
    color: #9fa8b0;
    font-size: 0.9rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: color 0.3s, background 0.3s;
}

footer nav ul li a:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
    text-decoration: none;
}

footer p {
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    color: #8890a0;
}

body.dark-mode footer p {
    color: #6a7080;
}

/* ===== 返回顶部按钮 ===== */
#backToTop {
    display: none;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, #0f3460, #e94560);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    font-size: 1.6rem;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(15, 52, 96, 0.35);
    transition: transform 0.3s, box-shadow 0.3s, opacity 0.3s;
    z-index: 999;
    opacity: 0.9;
    line-height: 1;
}

#backToTop:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 10px 32px rgba(233, 69, 96, 0.5);
    opacity: 1;
}

#backToTop:active {
    transform: scale(0.95);
}

body.dark-mode #backToTop {
    box-shadow: 0 6px 24px rgba(79, 195, 247, 0.3);
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 1rem;
        background: rgba(26,26,46,0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 1rem;
        border-radius: 16px;
        gap: 0.4rem;
    }

    nav ul.open {
        display: flex;
    }

    #menuToggle {
        display: block;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    #hero {
        padding: 3rem 1rem;
    }

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

    section {
        padding: 1.8rem 1.2rem;
    }

    #products > div {
        grid-template-columns: 1fr;
    }

    #insights {
        grid-template-columns: 1fr;
    }

    footer nav ul {
        gap: 0.8rem;
    }

    #backToTop {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
        bottom: 1.2rem;
        right: 1.2rem;
    }
}

@media (min-width: 769px) {
    #menuToggle {
        display: none;
    }

    nav ul {
        display: flex !important;
    }
}

/* ===== 超大屏幕 ===== */
@media (min-width: 1400px) {
    main {
        max-width: 1300px;
    }

    h1 {
        font-size: 3.2rem;
    }

    #hero {
        padding: 5rem 3rem;
    }
}

/* ===== 暗黑模式微调 ===== */
body.dark-mode #hero {
    background: linear-gradient(135deg, #0d0d1a 0%, #1a1a2e 40%, #0f3460 100%);
}

body.dark-mode #hero a[role="button"] {
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
}

body.dark-mode #bannerCarousel {
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
}

/* ===== 打印样式 ===== */
@media print {
    header, #backToTop, #menuToggle, #darkModeToggle {
        display: none;
    }
    section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
        background: #fff;
    }
    body {
        color: #000;
        background: #fff;
    }
}