/* ============================================================
   style.css – B体育Bsports 官方下载页面
   风格：现代科技 + 运动活力（渐变Banner / 圆角卡片 / 毛玻璃 / 暗色模式 / 滚动动画 / hover动画）
   响应式 + 性能优化（CSS内联输出，无外部依赖）
   ============================================================ */

/* ---------- 全局重置 & CSS变量 ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* 主色板 – 随机风格：蓝紫渐变 + 金色点缀 */
    --bg: #fafcff;
    --bg-alt: #f0f4fe;
    --text: #1a1a2e;
    --text-light: #4a4a6a;
    --primary: #1a1a2e;
    --accent: #ffd700;
    --accent-dark: #e6c200;
    --card-bg: rgba(255, 255, 255, 0.85);
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.14);
    --radius: 20px;
    --radius-sm: 12px;
    --max-width: 1200px;
    --nav-height: 68px;
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

[data-theme="dark"] {
    --bg: #0c0c1a;
    --bg-alt: #141428;
    --text: #e6e6f0;
    --text-light: #9a9ab8;
    --card-bg: rgba(30, 30, 50, 0.85);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.12);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.6);
    --primary: #ffd700;
    --accent: #ffd700;
    --accent-dark: #e6c200;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    transition: background var(--transition), color var(--transition);
    overflow-x: hidden;
}

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

a:hover {
    color: var(--accent);
}

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

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

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

/* ---------- 滚动动画 (Intersection Observer 配合) ---------- */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ---------- Header & Navigation ---------- */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    height: var(--nav-height);
    transition: background var(--transition), border-color var(--transition);
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 24px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #1a1a2e, #2a2a5e);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    letter-spacing: -0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
}

.nav-links a {
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 0;
    position: relative;
    transition: color var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition);
    border-radius: 2px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--accent);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: 12px;
}

.nav-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--text);
    margin: 6px 0;
    transition: var(--transition);
    border-radius: 2px;
}

.theme-toggle {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 8px 18px;
    cursor: pointer;
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.theme-toggle:hover {
    background: var(--accent);
    color: var(--primary);
    border-color: var(--accent);
    transform: translateY(-1px);
}

/* ---------- Hero ---------- */
.hero {
    padding: 140px 20px 100px;
    background: linear-gradient(135deg, #1a1a2e 0%, #2a2a5e 40%, #1e1e4a 100%);
    color: #fff;
    text-align: center;
    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(255, 215, 0, 0.08) 0%, transparent 60%),
                radial-gradient(circle at 70% 80%, rgba(100, 100, 255, 0.06) 0%, transparent 50%);
    animation: heroGlow 12s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-10%, -10%) scale(1.1); }
}

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

.hero h1 {
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 18px;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff 60%, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    max-width: 680px;
    margin: 0 auto 36px;
    opacity: 0.92;
    line-height: 1.8;
}

.hero .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: var(--primary);
    padding: 18px 48px;
    border-radius: 60px;
    font-weight: 700;
    font-size: 1.15rem;
    transition: all var(--transition);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.35);
    border: none;
    cursor: pointer;
}

.hero .btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 16px 48px rgba(255, 215, 0, 0.5);
}

.hero .meta {
    margin-top: 28px;
    font-size: 0.9rem;
    opacity: 0.6;
    letter-spacing: 0.5px;
}

/* ---------- Sections ---------- */
section {
    padding: 100px 20px;
    transition: background var(--transition);
}

section:nth-child(even) {
    background: var(--bg-alt);
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 56px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 70px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-dark));
    margin: 14px auto 0;
    border-radius: 4px;
}

/* ---------- Grids ---------- */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

/* ---------- Cards (毛玻璃 + 圆角 + hover) ---------- */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 36px 28px;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.04), transparent);
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(255, 215, 0, 0.15);
}

.card:hover::before {
    opacity: 1;
}

.card h3 {
    font-size: 1.35rem;
    margin-bottom: 14px;
    font-weight: 600;
}

.card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

.card .icon {
    font-size: 2.8rem;
    margin-bottom: 18px;
    display: block;
    transition: transform var(--transition);
}

.card:hover .icon {
    transform: scale(1.1) rotate(-5deg);
}

/* ---------- About ---------- */
.about-content {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.05rem;
    color: var(--text-light);
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 40px 48px;
    box-shadow: var(--shadow);
    border: 1px solid var(--glass-border);
}

.about-content p {
    margin-bottom: 18px;
}

.about-content strong {
    color: var(--accent);
}

/* ---------- Testimonials ---------- */
.testimonial {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 32px 28px;
    box-shadow: var(--shadow);
    position: relative;
    border: 1px solid var(--glass-border);
    transition: all var(--transition);
}

.testimonial:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.testimonial::before {
    content: '"';
    font-size: 4.5rem;
    position: absolute;
    top: 8px;
    left: 22px;
    color: var(--accent);
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial p {
    font-style: italic;
    margin-bottom: 14px;
    padding-left: 20px;
}

.testimonial .author {
    font-weight: 600;
    color: var(--text);
    padding-left: 20px;
}

/* ---------- HowTo ---------- */
.howto-step {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
    align-items: flex-start;
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-sm);
    padding: 24px 28px;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    border: 1px solid transparent;
}

.howto-step:hover {
    transform: translateX(6px);
    border-color: rgba(255, 215, 0, 0.2);
    box-shadow: var(--shadow-hover);
}

.howto-step .step-num {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: var(--primary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.howto-step .step-content h4 {
    font-size: 1.15rem;
    margin-bottom: 6px;
    font-weight: 600;
}

.howto-step .step-content p {
    color: var(--text-light);
    line-height: 1.7;
}

/* ---------- FAQ ---------- */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--glass-border);
    padding: 18px 0;
    transition: background var(--transition);
}

.faq-item:first-child {
    border-top: 1px solid var(--glass-border);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    padding: 10px 0;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    color: var(--text);
    transition: color var(--transition);
}

.faq-question:hover {
    color: var(--accent);
}

.faq-question::after {
    content: '+';
    font-size: 1.6rem;
    transition: transform 0.4s ease, color var(--transition);
    color: var(--accent);
    font-weight: 300;
    line-height: 1;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
    color: var(--accent-dark);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.3s ease;
    padding: 0 12px;
    color: var(--text-light);
}

.faq-item.active .faq-answer {
    max-height: 400px;
    padding: 14px 12px 10px;
}

/* ---------- Article Cards ---------- */
.article-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(255, 215, 0, 0.15);
}

.article-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.4;
}

.article-card .meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 10px;
    opacity: 0.7;
}

.article-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 14px;
    flex-grow: 1;
}

.article-card .read-more {
    font-weight: 600;
    color: var(--accent);
    align-self: flex-start;
    transition: all var(--transition);
}

.article-card .read-more:hover {
    color: var(--accent-dark);
    transform: translateX(4px);
}

/* ---------- Contact ---------- */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
    text-align: center;
}

.contact-info .item {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 28px 20px;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    border: 1px solid transparent;
}

.contact-info .item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(255, 215, 0, 0.15);
}

.contact-info .item .label {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.contact-info .item .value {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ---------- Footer ---------- */
footer {
    background: linear-gradient(135deg, #0f0f1e, #1a1a3e);
    color: #b0b0c8;
    padding: 70px 20px 40px;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

footer .container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 48px;
}

footer h4 {
    color: #fff;
    margin-bottom: 18px;
    font-size: 1.1rem;
    font-weight: 600;
    position: relative;
    display: inline-block;
}

footer h4::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background: var(--accent);
    margin-top: 6px;
    border-radius: 2px;
}

footer ul {
    list-style: none;
}

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

footer ul li a {
    color: #9a9ab8;
    font-size: 0.9rem;
    transition: all var(--transition);
    display: inline-block;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 28px;
    text-align: center;
    font-size: 0.85rem;
    color: #7a7a9a;
}

.footer-bottom a {
    color: var(--accent);
}

.footer-bottom p {
    margin-bottom: 6px;
}

/* ---------- Back to Top ---------- */
.back-to-top {
    position: fixed;
    bottom: 36px;
    right: 36px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: var(--primary);
    border: none;
    cursor: pointer;
    font-size: 1.6rem;
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    transform: translateY(20px) scale(0.9);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 36px rgba(255, 215, 0, 0.5);
}

/* ---------- Banner Carousel (基础) ---------- */
.banner-carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    margin-bottom: 48px;
    box-shadow: var(--shadow);
}

.banner-slide {
    display: none;
    padding: 48px 40px;
    text-align: center;
    background: linear-gradient(135deg, #1a1a2e, #2a2a5e);
    color: #fff;
    min-height: 220px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.banner-slide.active {
    display: flex;
}

.banner-slide h3 {
    font-size: 1.6rem;
    margin-bottom: 14px;
    font-weight: 700;
}

.banner-slide p {
    opacity: 0.9;
    max-width: 600px;
}

.carousel-dots {
    text-align: center;
    margin-top: 16px;
}

.carousel-dots button {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 6px;
    cursor: pointer;
    transition: all var(--transition);
}

.carousel-dots button.active {
    background: var(--accent);
    transform: scale(1.2);
}

/* ---------- Stat Animation ---------- */
.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.2;
}

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

    .hero h1 {
        font-size: 2.6rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--glass-bg);
        backdrop-filter: blur(24px);
        padding: 24px 28px;
        box-shadow: var(--shadow);
        border-bottom: 1px solid var(--glass-border);
        gap: 16px;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    .hero {
        padding: 120px 20px 80px;
    }

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

    .hero p {
        font-size: 1.05rem;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 28px;
    }

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

    section {
        padding: 70px 20px;
    }

    .about-content {
        padding: 28px 24px;
    }

    .howto-step {
        flex-direction: column;
        gap: 14px;
        padding: 20px;
    }

    .back-to-top {
        bottom: 24px;
        right: 24px;
        width: 46px;
        height: 46px;
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .hero .btn {
        padding: 14px 32px;
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

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

    .contact-info {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 24px 20px;
    }

    .testimonial {
        padding: 24px 20px;
    }

    .article-card {
        padding: 20px 18px;
    }

    .banner-slide {
        padding: 32px 20px;
        min-height: 160px;
    }

    .banner-slide h3 {
        font-size: 1.2rem;
    }
}

/* ---------- 暗色模式额外微调 ---------- */
[data-theme="dark"] .card,
[data-theme="dark"] .testimonial,
[data-theme="dark"] .article-card,
[data-theme="dark"] .contact-info .item,
[data-theme="dark"] .about-content,
[data-theme="dark"] .howto-step {
    border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .hero .btn {
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.2);
}

[data-theme="dark"] .hero .btn:hover {
    box-shadow: 0 16px 48px rgba(255, 215, 0, 0.35);
}

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

.mt-4 {
    margin-top: 16px;
}

.mb-4 {
    margin-bottom: 16px;
}

/* ---------- 打印优化 ---------- */
@media print {
    header,
    .back-to-top,
    .theme-toggle,
    .nav-toggle {
        display: none !important;
    }

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

    .hero {
        padding: 40px 20px;
        background: #f4f4f4 !important;
        color: #000 !important;
    }

    .hero h1 {
        -webkit-text-fill-color: #000;
    }

    section {
        padding: 40px 20px;
        break-inside: avoid;
    }

    .card,
    .testimonial,
    .article-card {
        box-shadow: none;
        border: 1px solid #ddd;
        backdrop-filter: none;
    }
}