/* ========================================
   竞彩足球 - 纯净极简导航站
   全局样式表
   ======================================== */

/* CSS 变量 - 浅色主题 */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f0f1f3;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #a1a1a6;
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --border: #e5e5e7;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --max-width: 980px;
    --transition: 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    --font-stack: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* 深色主题 */
[data-theme="dark"] {
    --bg-primary: #000000;
    --bg-secondary: #1c1c1e;
    --bg-tertiary: #2c2c2e;
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-tertiary: #6e6e73;
    --accent: #2997ff;
    --accent-hover: #40a9ff;
    --border: #38383a;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.3);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.4);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-stack);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition), color var(--transition);
}

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

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

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

/* ========================================
   导航栏
   ======================================== */
.site-nav {
    width: 100%;
    padding: 16px 24px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    transition: background-color var(--transition), border-color var(--transition);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

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

.nav-links a {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    transition: color var(--transition);
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

/* 主题切换按钮 */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition);
    font-size: 1rem;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    position: relative;
    flex-shrink: 0;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 1.5px;
    background: var(--text-primary);
    position: absolute;
    left: 6px;
    transition: all var(--transition);
}

.menu-toggle span:nth-child(1) { top: 10px; }
.menu-toggle span:nth-child(2) { top: 15px; }
.menu-toggle span:nth-child(3) { top: 20px; }

.menu-toggle.active span:nth-child(1) {
    top: 15px;
    transform: rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    top: 15px;
    transform: rotate(-45deg);
}

/* ========================================
   面包屑导航
   ======================================== */
.breadcrumb {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 12px 24px;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.breadcrumb a {
    color: var(--text-tertiary);
}

.breadcrumb a:hover {
    color: var(--text-secondary);
}

.breadcrumb span {
    margin: 0 6px;
}

/* ========================================
   首页 - 极简入口区
   ======================================== */
.hero-section {
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/hero-bg.webp') center/cover no-repeat;
    opacity: 0.3;
    z-index: 0;
}

[data-theme="dark"] .hero-section::before {
    opacity: 0.1;
}

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

.hero-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 48px;
    letter-spacing: -0.01em;
}

/* 入口按钮组 */
.entry-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 32px;
}

.entry-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    padding: 16px 36px;
    font-size: 1.0625rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.entry-btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: var(--shadow-md);
}

.entry-btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.entry-btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.entry-btn-secondary:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.entry-btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1.5px solid var(--accent);
}

.entry-btn-outline:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}

/* 测速提示 */
.speed-hint {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    margin-top: 8px;
}

/* ========================================
   平台白皮书区块
   ======================================== */
.whitepaper-section {
    background: var(--bg-secondary);
    padding: 80px 24px;
    transition: background-color var(--transition);
}

.whitepaper-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.whitepaper-section h2 {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.whitepaper-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-top: 32px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.whitepaper-section p {
    font-size: 0.9375rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* ========================================
   内页通用样式
   ======================================== */
.page-hero {
    position: relative;
    padding: 80px 24px 60px;
    text-align: center;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.2;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

[data-theme="dark"] .page-hero::before {
    opacity: 0.08;
}

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

.page-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.15;
    margin-bottom: 16px;
}

.page-hero p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.page-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.page-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-top: 40px;
    margin-bottom: 16px;
}

.page-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-top: 28px;
    margin-bottom: 12px;
}

.page-content p {
    font-size: 0.9375rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.page-content ul, .page-content ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

.page-content li {
    font-size: 0.9375rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* ========================================
   节点列表
   ======================================== */
.node-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 12px;
}

.node-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.node-item:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--accent);
}

.node-name {
    font-weight: 500;
    font-size: 0.9375rem;
}

.node-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

.node-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #30d158;
}

.node-dot.offline {
    background: #ff453a;
}

.node-dot.slow {
    background: #ffd60a;
}

.node-link {
    padding: 8px 20px;
    font-size: 0.8125rem;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #fff;
    font-weight: 500;
    transition: all var(--transition);
}

.node-link:hover {
    background: var(--accent-hover);
    color: #fff;
}

/* ========================================
   APP下载页
   ======================================== */
.app-download-section {
    text-align: center;
    padding: 60px 24px;
}

.qr-wrapper {
    display: inline-block;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin: 32px 0;
}

.qr-wrapper img {
    width: 200px;
    height: 200px;
    border-radius: var(--radius-sm);
}

.download-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 32px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all var(--transition);
    border: 1.5px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.download-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.download-btn svg {
    width: 24px;
    height: 24px;
}

/* ========================================
   测速工具
   ======================================== */
.speed-test-panel {
    max-width: 480px;
    margin: 40px auto;
    text-align: center;
}

.speed-gauge {
    width: 240px;
    height: 240px;
    margin: 0 auto 32px;
    border-radius: 50%;
    border: 3px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: border-color var(--transition);
    position: relative;
    overflow: hidden;
}

.speed-gauge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/speed-test-bg.webp') center/cover no-repeat;
    opacity: 0.15;
}

.speed-value {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--accent);
    position: relative;
    z-index: 1;
}

.speed-unit {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    position: relative;
    z-index: 1;
}

.speed-start-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 48px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
}

.speed-start-btn:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.speed-results {
    margin-top: 32px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.speed-result-item {
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    text-align: center;
}

.speed-result-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}

.speed-result-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ========================================
   FAQ
   ======================================== */
.faq-list {
    max-width: var(--max-width);
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 24px 0;
}

.faq-question {
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--text-primary);
    transition: color var(--transition);
}

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

.faq-arrow {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform var(--transition);
    color: var(--text-tertiary);
}

.faq-item.active .faq-arrow {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding-top: 16px;
}

.faq-answer p {
    font-size: 0.9375rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* ========================================
   App下载栏目（额外）
   ======================================== */
.app-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 60px 0;
}

.app-showcase-img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.app-features {
    list-style: none;
    padding: 0;
    margin: 24px 0;
}

.app-features li {
    padding: 12px 0;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.app-features li::before {
    content: '✓';
    color: var(--accent);
    font-weight: 700;
    flex-shrink: 0;
}

/* ========================================
   页脚
   ======================================== */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 48px 24px 32px;
    transition: background-color var(--transition), border-color var(--transition);
}

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    margin-bottom: 24px;
}

.footer-links a {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-copy {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    line-height: 1.8;
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 16px 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
        z-index: 100;
    }

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

    .site-nav {
        position: relative;
    }

    .menu-toggle {
        display: block;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .entry-buttons {
        flex-direction: column;
        align-items: center;
    }

    .entry-btn {
        width: 100%;
        max-width: 300px;
    }

    .page-hero h1 {
        font-size: 1.75rem;
    }

    .app-showcase {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .speed-results {
        grid-template-columns: 1fr;
    }

    .whitepaper-section h2 {
        font-size: 1.375rem;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
}

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

    .hero-logo {
        width: 60px;
        height: 60px;
    }

    .page-hero h1 {
        font-size: 1.5rem;
    }

    .qr-wrapper img {
        width: 160px;
        height: 160px;
    }

    .speed-gauge {
        width: 200px;
        height: 200px;
    }

    .speed-value {
        font-size: 2.5rem;
    }
}
