/* 皇冠·体育 Crown SPORTS - 完整样式表 */

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

:root {
    --primary: #e94560;
    --primary-light: #ff6b81;
    --secondary: #0f3460;
    --accent: #16213e;
    --bg-dark: #1a1a2e;
    --bg-light: #f8f9fa;
    --text-dark: #1a1a2e;
    --text-light: #e0e0e0;
    --card-bg: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --radius: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1200px;
}

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

body.dark-mode {
    --bg-dark: #0d0d1a;
    --text-light: #c0c0c0;
    --card-bg: rgba(255, 255, 255, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.08);
}

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

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

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

/* 导航栏 */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0 1rem;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    background: rgba(26, 26, 46, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

nav.sticky {
    background: rgba(26, 26, 46, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

nav > div a {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav > div a span {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

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

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

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

nav ul li a.active {
    color: var(--primary);
}

#darkModeToggle,
#mobileMenuBtn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-light);
    padding: 0.5rem 0.8rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

#darkModeToggle:hover,
#mobileMenuBtn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

#mobileMenuBtn {
    display: none;
}

/* 主内容区域 */
main {
    padding-top: 100px;
}

section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 4rem 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(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; }

h1, h2, h3 {
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    background: linear-gradient(135deg, #fff, var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), transparent);
    margin-top: 0.5rem;
}

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

p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* Hero 区域 */
#hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    min-height: 80vh;
    padding-top: 2rem;
}

#hero > div:first-child {
    flex: 1;
}

#hero > div:last-child {
    flex: 1;
    display: flex;
    justify-content: center;
}

#hero img {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

#hero .actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

#hero a[role="button"] {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

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

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

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

/* 关于我们 */
#about {
    text-align: center;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

#about p {
    max-width: 800px;
    margin: 0 auto 1rem;
}

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

#products article {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: var(--transition);
    cursor: default;
}

#products article:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(233, 69, 96, 0.2);
    border-color: var(--primary);
}

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

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

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

#features li:hover {
    background: rgba(233, 69, 96, 0.15);
    border-color: var(--primary);
    transform: translateX(5px);
}

#features li strong {
    color: var(--primary-light);
}

/* 注册指南 */
#howto ol {
    list-style: none;
    counter-reset: step;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

#howto li {
    counter-increment: step;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    position: relative;
    transition: var(--transition);
}

#howto li::before {
    content: counter(step);
    position: absolute;
    top: -10px;
    left: -10px;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

#howto li:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.2);
}

/* FAQ 手风琴 */
#faq details {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    margin-bottom: 0.8rem;
    overflow: hidden;
    transition: var(--transition);
}

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

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

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

#faq summary::after {
    content: '▼';
    font-size: 0.8rem;
    transition: var(--transition);
}

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

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

#faq details p {
    padding: 0 1.5rem 1rem;
    color: var(--text-light);
    opacity: 0.9;
}

/* 知识库文章 */
#articles > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

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

#articles article:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(233, 69, 96, 0.15);
    border-color: var(--primary);
}

/* 联系区域 */
#contact {
    text-align: center;
}

#contact address {
    font-style: normal;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2rem;
    display: inline-block;
    min-width: 300px;
}

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

/* 页脚 */
footer {
    background: var(--accent);
    padding: 2rem 1.5rem;
    text-align: center;
    border-top: 1px solid var(--glass-border);
}

footer nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 2rem;
    margin-bottom: 1rem;
}

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

footer nav ul li a:hover {
    color: var(--primary);
}

footer p {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* 返回顶部按钮 */
#backToTop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
    transition: var(--transition);
    display: none;
    z-index: 999;
}

#backToTop:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.6);
}

/* 响应式设计 */
@media (max-width: 768px) {
    nav {
        padding: 0.8rem 1rem;
    }

    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 1rem;
        right: 1rem;
        background: rgba(26, 26, 46, 0.95);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid var(--glass-border);
        border-radius: var(--radius);
        flex-direction: column;
        padding: 1rem;
        gap: 0.3rem;
        box-shadow: var(--shadow);
    }

    nav ul.open {
        display: flex;
    }

    #mobileMenuBtn {
        display: block;
    }

    #hero {
        flex-direction: column;
        text-align: center;
        min-height: auto;
    }

    #hero > div:last-child {
        display: none;
    }

    #hero .actions {
        justify-content: center;
    }

    section {
        padding: 2.5rem 1rem;
    }

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

    #features ul {
        grid-template-columns: 1fr;
    }

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

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

    footer nav ul {
        flex-direction: column;
        gap: 0.8rem;
    }

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

@media (max-width: 480px) {
    #howto ol {
        grid-template-columns: 1fr;
    }

    #contact address {
        min-width: auto;
        width: 100%;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* 选中文本颜色 */
::selection {
    background: var(--primary);
    color: #fff;
}

/* 暗色模式下的微调 */
body.dark-mode nav {
    background: rgba(13, 13, 26, 0.9);
}

body.dark-mode #about,
body.dark-mode #products article,
body.dark-mode #features li,
body.dark-mode #howto li,
body.dark-mode #faq details,
body.dark-mode #articles article,
body.dark-mode #contact address {
    background: rgba(255, 255, 255, 0.03);
}

/* 渐变Banner效果（在hero区使用） */
#hero {
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(233, 69, 96, 0.15), transparent 60%),
                radial-gradient(circle at 70% 50%, rgba(15, 52, 96, 0.2), transparent 60%);
    animation: gradientMove 8s ease infinite;
    z-index: -1;
}

@keyframes gradientMove {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(-5%, 5%);
    }
}

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

/* 滚动动画（IntersectionObserver 配合 CSS） */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 按钮通用样式 */
button, .btn {
    cursor: pointer;
    font-family: inherit;
    border: none;
    outline: none;
}

/* 链接通用样式 */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* 无障碍支持 */
.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;
}