/* === 球速体育(中国)官方网站 - QS SPORTS === */
/* === style.css - 完整样式表 === */

/* === CSS变量 (主题) === */
:root {
    --bg: #f8f9fa;
    --text: #222;
    --primary: #1a1a2e;
    --accent: #e94560;
    --accent2: #f39c12;
    --card: #fff;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --radius: 16px;
    --max-w: 1200px;
    --font: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --glass-bg: rgba(255,255,255,0.15);
    --glass-border: rgba(255,255,255,0.2);
    --glass-shadow: 0 8px 32px rgba(0,0,0,0.1);
    --transition: 0.3s ease;
    --scroll-top-bg: var(--accent);
    --footer-bg: var(--primary);
    --footer-text: #ccc;
    --nav-bg: var(--primary);
    --hero-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --section-alt-bg: #f0f2f5;
    --card-hover-transform: translateY(-4px);
    --card-hover-shadow: 0 12px 40px rgba(0,0,0,0.1);
    --accent-gradient: linear-gradient(135deg, var(--accent), var(--accent2));
}

/* === 暗色模式 === */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #121212;
        --text: #e0e0e0;
        --card: #1e1e1e;
        --primary: #0d0d1a;
        --shadow: 0 4px 20px rgba(0,0,0,0.4);
        --glass-bg: rgba(30,30,30,0.4);
        --glass-border: rgba(255,255,255,0.1);
        --section-alt-bg: #1a1a1a;
        --hero-gradient: linear-gradient(135deg, #0d0d1a 0%, #1a1a2e 50%, #0f3460 100%);
        --card-hover-shadow: 0 12px 40px rgba(0,0,0,0.5);
    }
    .card p,
    .testimonial-card p,
    .faq-answer,
    .howto-step p,
    .article-card p,
    .contact-info p {
        color: #aaa !important;
    }
    .section-title p {
        color: #888 !important;
    }
}

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

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

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

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: #c0392b;
}

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

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

/* === 滚动条美化 === */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c0392b;
}

/* === 动画关键帧 === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* === 毛玻璃通用类 === */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius);
}

/* === 头部 (Header) === */
header {
    background: var(--nav-bg);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
    transition: background 0.3s;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    max-width: var(--max-w);
    margin: 0 auto;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo span {
    color: var(--accent);
}

nav {
    display: flex;
    gap: 24px;
    align-items: center;
}

nav a {
    color: #fff;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: border 0.2s, color 0.2s;
}
nav a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 4px;
    transition: transform 0.2s;
}
.menu-toggle:hover {
    transform: rotate(90deg);
}

/* === 英雄区 (Hero) === */
.hero {
    background: var(--hero-gradient);
    color: #fff;
    padding: 80px 24px 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent));
}

.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.1) 0%, transparent 60%),
                radial-gradient(circle at 70% 50%, rgba(243,156,18,0.1) 0%, transparent 60%);
    animation: pulse 6s infinite ease-in-out;
    pointer-events: none;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 32px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* === 按钮 === */
.btn {
    display: inline-block;
    padding: 14px 36px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

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

.btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.6);
}
.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
    transform: translateY(-2px);
}

/* === 通用 section === */
section {
    padding: 72px 24px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out 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; }
section:nth-child(10) { animation-delay: 0.9s; }
section:nth-child(11) { animation-delay: 1.0s; }

.section-title {
    text-align: center;
    margin-bottom: 48px;
}

.section-title h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-gradient);
    margin: 8px auto 0;
    border-radius: 2px;
}

.section-title p {
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.05rem;
}

/* === 卡片网格 === */
.about-grid,
.products-grid,
.advantages-grid,
.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

/* === 卡片通用 === */
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s;
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    transform: var(--card-hover-transform);
    box-shadow: var(--card-hover-shadow);
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--primary);
}

.card p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}

.icon-box {
    width: 48px;
    height: 48px;
    background: var(--accent-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 1.6rem;
    color: #fff;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover .icon-box {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 15px rgba(233,69,96,0.3);
}

.products-grid .card {
    text-align: center;
}
.products-grid .icon-box {
    margin: 0 auto 16px;
}

/* === 用户评价 === */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.testimonial-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent);
    transition: transform 0.3s, box-shadow 0.3s;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.testimonial-card p {
    font-style: italic;
    color: #444;
    margin-bottom: 12px;
    position: relative;
    padding-left: 20px;
}

.testimonial-card p::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -5px;
    font-size: 2rem;
    color: var(--accent);
    opacity: 0.3;
}

.testimonial-card .author {
    font-weight: 700;
    color: var(--primary);
}

/* === FAQ === */
.faq-item {
    border-bottom: 1px solid #e0e0e0;
    padding: 16px 0;
    transition: background 0.2s;
}

.faq-item:hover {
    background: rgba(233,69,96,0.02);
}

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

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

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--accent);
    transition: transform 0.3s, content 0.3s;
}

.faq-item.active .faq-question::after {
    content: '−';
    transform: rotate(180deg);
}

.faq-answer {
    padding: 8px 0 16px;
    color: #555;
    line-height: 1.7;
    display: none;
    animation: fadeInUp 0.3s ease-out;
}

.faq-item.active .faq-answer {
    display: block;
}

/* === 步骤 (HowTo) === */
.howto-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    counter-reset: step;
}

.howto-step {
    background: var(--card);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    position: relative;
    padding-left: 64px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.howto-step:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.howto-step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 20px;
    top: 28px;
    width: 32px;
    height: 32px;
    background: var(--accent-gradient);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    transition: transform 0.3s;
}

.howto-step:hover::before {
    transform: scale(1.15);
}

.howto-step h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--primary);
}

.howto-step p {
    color: #666;
    font-size: 0.95rem;
}

/* === 资讯卡片 === */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}

.article-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.article-card .content {
    padding: 24px;
}

.article-card .date {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-card .date::before {
    content: '📅';
    font-size: 0.9rem;
}

.article-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary);
    transition: color 0.2s;
}

.article-card:hover h3 {
    color: var(--accent);
}

.article-card p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.article-card .read-more {
    font-weight: 600;
    color: var(--accent);
    transition: gap 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.article-card .read-more:hover {
    gap: 8px;
}

/* === 联系我们 === */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.contact-info {
    background: var(--card);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.contact-info:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.contact-info h3 {
    font-size: 1.3rem;
    margin-bottom: 16px;
    color: var(--primary);
}

.contact-info p {
    margin-bottom: 8px;
    color: #555;
}

.contact-info .label {
    font-weight: 600;
    color: var(--primary);
}

/* === 底部 (Footer) === */
footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 48px 24px 24px;
    transition: background 0.3s;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    max-width: var(--max-w);
    margin: 0 auto;
}

.footer-grid h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
}

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

.footer-grid a {
    display: block;
    color: #aaa;
    padding: 4px 0;
    font-size: 0.9rem;
    transition: color 0.2s, padding-left 0.2s;
}

.footer-grid a:hover {
    color: #fff;
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    margin-top: 32px;
    text-align: center;
    font-size: 0.9rem;
    max-width: var(--max-w);
    margin-left: auto;
    margin-right: auto;
}

/* === 返回顶部 === */
.scroll-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: var(--scroll-top-bg);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 99;
    backdrop-filter: blur(4px);
}

.scroll-top:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(233,69,96,0.4);
}

/* === 响应式 === */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    .hero {
        padding: 60px 16px 70px;
    }
    .header-inner {
        padding: 10px 16px;
    }
    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--nav-bg);
        flex-direction: column;
        padding: 16px 24px;
        gap: 12px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    nav.open {
        display: flex;
        animation: fadeInUp 0.3s ease-out;
    }
    .menu-toggle {
        display: block;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .section-title h2 {
        font-size: 1.8rem;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    section {
        padding: 48px 16px;
    }
    .hero h1 {
        font-size: 1.6rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .btn {
        padding: 12px 28px;
        font-size: 0.9rem;
    }
    .card {
        padding: 24px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .howto-step {
        padding-left: 56px;
    }
    .howto-step::before {
        left: 16px;
        top: 24px;
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
}

/* === 暗色模式下的额外调整 === */
@media (prefers-color-scheme: dark) {
    .faq-item {
        border-color: #333;
    }
    .faq-question {
        color: var(--text);
    }
    .section-title h2 {
        color: #fff;
    }
    .contact-info h3,
    .card h3,
    .howto-step h4,
    .article-card h3 {
        color: #fff;
    }
    .contact-info .label {
        color: #ccc;
    }
    .testimonial-card .author {
        color: #ccc;
    }
    .article-card .date {
        color: #777;
    }
    .footer-grid h4 {
        color: #fff;
    }
    .footer-grid a {
        color: #999;
    }
    .footer-grid a:hover {
        color: #fff;
    }
}