/* style.css - 乐竞体育APP官方网站样式 */
/* 全局重置与变量 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a1a2e;
    --secondary: #16213e;
    --accent: #e94560;
    --accent-light: #ff6b81;
    --text: #e0e0e0;
    --text-muted: #a0a0b0;
    --bg-card: rgba(255, 255, 255, 0.06);
    --bg-glass: rgba(255, 255, 255, 0.08);
    --border-glass: rgba(255, 255, 255, 0.12);
    --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;
}

/* 基础样式 */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

/* 渐变背景动画 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 20% 50%, rgba(233, 69, 96, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, rgba(22, 33, 62, 0.4) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 80%, rgba(26, 26, 46, 0.6) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* 链接与按钮基础 */
a {
    color: var(--accent-light);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent);
    text-shadow: 0 0 8px rgba(233, 69, 96, 0.3);
}

button, [role="button"] {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    font-size: inherit;
    transition: var(--transition);
}

/* 头部导航 */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(26, 26, 46, 0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border-glass);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

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

nav > a {
    flex-shrink: 0;
}

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

nav ul li a {
    color: var(--text-muted);
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    position: relative;
    font-size: 0.95rem;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--accent);
    transition: transform 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a:focus::after {
    transform: translateX(-50%) scaleX(1);
}

nav ul li a:hover {
    color: var(--text);
    background: rgba(233, 69, 96, 0.1);
}

#darkModeToggle, #mobileMenuToggle {
    font-size: 1.4rem;
    padding: 0.4rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text);
}

#darkModeToggle:hover, #mobileMenuToggle:hover {
    background: rgba(233, 69, 96, 0.2);
    transform: scale(1.05);
}

#mobileMenuToggle {
    display: none;
}

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

/* 通用section样式 */
section {
    margin: 4rem 0;
    padding: 2.5rem 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

section:nth-child(2) { animation-delay: 0.1s; }
section:nth-child(3) { animation-delay: 0.2s; }
section:nth-child(4) { animation-delay: 0.3s; }
section:nth-child(5) { animation-delay: 0.4s; }
section:nth-child(6) { animation-delay: 0.5s; }
section:nth-child(7) { animation-delay: 0.6s; }
section:nth-child(8) { animation-delay: 0.7s; }
section:nth-child(9) { animation-delay: 0.8s; }

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

section:hover {
    border-color: rgba(233, 69, 96, 0.3);
    box-shadow: 0 12px 40px rgba(233, 69, 96, 0.08);
}

h1, h2, h3 {
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.8rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-light), #f9a825);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 2rem;
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
    border-radius: 2px;
}

h3 {
    font-size: 1.3rem;
    color: var(--accent-light);
}

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

/* Hero区域 */
#hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, rgba(22, 33, 62, 0.9), rgba(26, 26, 46, 0.8)), 
                radial-gradient(circle at 30% 70%, rgba(233, 69, 96, 0.15), transparent 60%);
    border: none;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

#hero > div {
    flex: 1;
}

#hero figure {
    flex: 0 0 380px;
    margin: 0;
}

#hero svg {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
}

#hero svg:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(233, 69, 96, 0.2);
}

#hero figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

#hero div > div {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

#hero [role="button"] {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent), #c0392b);
    color: #fff;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
    transition: var(--transition);
    border: none;
    text-align: center;
}

#hero [role="button"]:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.5);
}

#hero [role="button"]:last-child {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    box-shadow: none;
}

#hero [role="button"]:last-child:hover {
    background: var(--accent);
    color: #fff;
}

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

#products article {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

#products article:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 12px 30px rgba(233, 69, 96, 0.15);
}

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

#products article [role="button"] {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.6rem 1.6rem;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--accent), #c0392b);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.2);
}

#products article [role="button"]:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
}

/* 功能列表 */
#features ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2rem;
}

#features ul li {
    background: var(--bg-glass);
    padding: 1.2rem 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
    transition: var(--transition);
    font-size: 0.95rem;
}

#features ul li:hover {
    border-color: var(--accent);
    transform: translateX(4px);
    background: rgba(233, 69, 96, 0.06);
}

#features ul li strong {
    color: var(--accent-light);
    display: block;
    margin-bottom: 0.3rem;
}

/* FAQ */
#faq details {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    margin-bottom: 0.8rem;
    padding: 0.8rem 1.2rem;
    transition: var(--transition);
    cursor: pointer;
}

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

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

#faq summary {
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    padding: 0.3rem 0;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

#faq summary::after {
    content: '+';
    font-size: 1.4rem;
    color: var(--accent);
    transition: transform 0.3s ease;
}

#faq details[open] summary::after {
    content: '-';
    transform: rotate(180deg);
}

#faq details p {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border-glass);
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* HowTo步骤 */
#howto ol {
    list-style: none;
    counter-reset: step;
    display: grid;
    gap: 1rem;
}

#howto ol li {
    counter-increment: step;
    padding: 1rem 1.5rem 1rem 3.5rem;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
    position: relative;
    transition: var(--transition);
}

#howto ol li:hover {
    border-color: var(--accent);
    background: rgba(233, 69, 96, 0.04);
}

#howto ol li::before {
    content: counter(step);
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, var(--accent), #c0392b);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

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

#knowledge > h2 {
    grid-column: 1 / -1;
}

#knowledge article {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    transition: var(--transition);
}

#knowledge article:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(233, 69, 96, 0.1);
}

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

#knowledge article p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

#knowledge article a {
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    background: rgba(233, 69, 96, 0.1);
    color: var(--accent-light);
    display: inline-block;
}

#knowledge article a:hover {
    background: var(--accent);
    color: #fff;
}

/* 联系 */
#contact address {
    font-style: normal;
    display: grid;
    gap: 0.8rem;
}

#contact address p {
    background: var(--bg-glass);
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
    transition: var(--transition);
}

#contact address p:hover {
    border-color: var(--accent);
}

/* 底部 */
footer {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    border-top: 1px solid var(--border-glass);
    background: rgba(26, 26, 46, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

footer p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

footer ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

footer ul li a {
    font-size: 0.9rem;
    color: var(--text-muted);
}

footer ul li a:hover {
    color: var(--accent-light);
}

/* 返回顶部 */
#backToTop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #c0392b);
    color: #fff;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

#backToTop.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#backToTop:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.5);
}

/* 滚动动画与交互增强 */
@media (prefers-reduced-motion: reduce) {
    section {
        animation: none;
        opacity: 1;
        transform: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* 响应式设计 - 平板 */
@media (max-width: 1024px) {
    #hero {
        flex-direction: column;
        text-align: center;
    }
    #hero figure {
        flex: 0 0 auto;
        width: 80%;
        max-width: 400px;
    }
    #hero div > div {
        justify-content: center;
    }
    h1 {
        font-size: 2.2rem;
    }
}

/* 响应式设计 - 手机 */
@media (max-width: 768px) {
    nav ul {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: rgba(26, 26, 46, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 1rem 1.5rem;
        gap: 0.5rem;
        border-bottom: 1px solid var(--border-glass);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    }
    nav ul.open {
        display: flex;
    }
    #mobileMenuToggle {
        display: flex;
    }
    #darkModeToggle {
        order: 1;
    }
    #mobileMenuToggle {
        order: 2;
    }
    nav > a {
        order: 0;
    }
    section {
        padding: 1.5rem 1rem;
        margin: 2rem 0;
    }
    h1 {
        font-size: 1.8rem;
    }
    h2 {
        font-size: 1.5rem;
    }
    #hero {
        padding: 2rem 1rem;
    }
    #hero figure {
        width: 100%;
    }
    #features ul {
        grid-template-columns: 1fr;
    }
    #knowledge {
        grid-template-columns: 1fr;
    }
    footer {
        flex-direction: column;
        text-align: center;
    }
    footer ul {
        justify-content: center;
    }
    #backToTop {
        bottom: 1rem;
        right: 1rem;
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
    }
}

/* 暗色模式（默认已暗色，但确保兼容系统偏好） */
@media (prefers-color-scheme: light) {
    :root {
        --primary: #f5f5f7;
        --secondary: #e8e8ec;
        --text: #1a1a2e;
        --text-muted: #555;
        --bg-card: rgba(0, 0, 0, 0.03);
        --bg-glass: rgba(255, 255, 255, 0.7);
        --border-glass: rgba(0, 0, 0, 0.1);
        --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    }
    header {
        background: rgba(245, 245, 247, 0.85);
    }
    nav ul li a {
        color: #333;
    }
    nav ul li a:hover {
        background: rgba(233, 69, 96, 0.08);
        color: #1a1a2e;
    }
    #hero {
        background: linear-gradient(135deg, rgba(232, 232, 236, 0.9), rgba(245, 245, 247, 0.8)),
                    radial-gradient(circle at 30% 70%, rgba(233, 69, 96, 0.08), transparent 60%);
    }
    #products article, #features ul li, #faq details, #howto ol li,
    #knowledge article, #contact address p, footer {
        background: rgba(255, 255, 255, 0.7);
        border-color: rgba(0, 0, 0, 0.08);
    }
    #faq details[open] {
        background: rgba(233, 69, 96, 0.04);
    }
    #backToTop {
        background: linear-gradient(135deg, var(--accent), #c0392b);
        color: #fff;
    }
    footer {
        background: rgba(245, 245, 247, 0.8);
    }
    h1 {
        background: linear-gradient(135deg, #e94560, #ff6b81, #f9a825);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
}

/* 小屏额外优化 */
@media (max-width: 480px) {
    main {
        padding: 0 0.8rem;
        padding-top: 70px;
    }
    section {
        padding: 1.2rem 0.8rem;
    }
    #hero [role="button"] {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    #products article {
        padding: 1.2rem;
    }
}