/* 全局样式与变量 */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #ffffff;
    --bg-light: #f3f6ff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --card-bg: #ffffff;
    --shadow-sm: 0 4px 6px -1px rgba(37, 99, 235, 0.05), 0 2px 4px -1px rgba(37, 99, 235, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(37, 99, 235, 0.1), 0 4px 6px -2px rgba(37, 99, 235, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(37, 99, 235, 0.1), 0 10px 10px -5px rgba(37, 99, 235, 0.04);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: var(--font-family);
    color: var(--text-main);
    background-color: var(--bg-color);
}

body {
    background: transparent;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* 动态背景 Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 1;
}

/* 容器与网格 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--bg-light);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-item {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-item:hover {
    color: var(--primary-color);
}

.nav-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.nav-btn:hover {
    background-color: var(--primary-hover);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    transition: 0.3s;
}

/* 首屏 Hero */
.hero-section {
    padding: 160px 0 100px;
    text-align: center;
    position: relative;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* 通用区块样式 */
.section {
    padding: 80px 0;
}

.section-light {
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    font-weight: 700;
    color: var(--text-main);
    position: relative;
}

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

/* 卡片 */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(37, 99, 235, 0.3);
}

/* 优势区块 */
.feature-icon {
    font-size: 40px;
    margin-bottom: 20px;
    background: var(--bg-light);
    width: 80px;
    height: 80px;
    line-height: 80px;
    text-align: center;
    border-radius: 50%;
    color: var(--primary-color);
}

.feature-card h3 {
    margin-bottom: 15px;
    font-size: 20px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 15px;
}

/* 套餐价格区块 */
.pricing-table-container {
    overflow-x: auto;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.pricing-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.pricing-table th, .pricing-table td {
    padding: 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.pricing-table th {
    background-color: var(--bg-light);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 14px;
}

.pricing-table tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.02);
}

.highlight-row {
    background-color: rgba(37, 99, 235, 0.05);
}

.pricing-table .price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 16px;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px;
    background-color: #f3f4f6;
    color: #4b5563;
}
.badge-bronze { background-color: #fffbeb; color: #b45309; }
.badge-gold { background-color: #fef08a; color: #854d0e; }
.badge-diamond { background-color: #e0f2fe; color: #0369a1; }
.badge-master { background-color: #f3e8ff; color: #7e22ce; }

/* 节点状态 */
.node-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.node-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.node-flag {
    font-size: 24px;
}

.node-name {
    font-weight: 600;
    font-size: 16px;
}

.node-ping {
    font-family: monospace;
    font-weight: bold;
    color: #10b981; /* 绿色 */
}

/* 用户评价 */
.review-stars {
    color: #fbbf24;
    font-size: 20px;
    margin-bottom: 15px;
}

.review-text {
    font-style: italic;
    margin-bottom: 20px;
    color: var(--text-main);
}

.review-author {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
}

/* FAQ 常见问题 */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
}

.faq-question {
    padding: 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.faq-question:hover {
    background-color: var(--bg-light);
}

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

.faq-item.active .faq-answer {
    padding: 0 20px 20px;
    max-height: 500px;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-icon {
    transition: transform 0.3s;
    font-size: 20px;
    color: var(--primary-color);
}

/* 知识库板块 */
.kb-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    display: block;
}

.kb-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.kb-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.kb-desc {
    font-size: 14px;
    color: var(--text-muted);
}

/* 页脚 */
.footer {
    background-color: #1e293b;
    color: #f8fafc;
    padding: 60px 0 20px;
    text-align: center;
}

.footer-logo {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 15px;
    color: #fff;
}

.footer-desc {
    color: #94a3b8;
    margin-bottom: 30px;
}

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

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fff;
}

.copyright {
    color: #64748b;
    font-size: 14px;
    border-top: 1px solid #334155;
    padding-top: 20px;
}

/* 文章页面独立样式 */
.article-page {
    padding-top: 120px;
    padding-bottom: 60px;
}

.article-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.article-title {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--text-main);
}

.article-meta {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.article-content h2 {
    font-size: 24px;
    margin: 30px 0 15px;
    color: var(--primary-color);
}

.article-content p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.article-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.article-content a:hover {
    text-decoration: underline;
}

.back-link {
    display: inline-block;
    margin-bottom: 30px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.back-link:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        padding: 20px;
        transform: translateY(-150%);
        transition: transform 0.3s ease-in-out;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        opacity: 0;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
    }

    .menu-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-buttons {
        flex-direction: column;
        padding: 0 20px;
    }

    .section {
        padding: 60px 0;
    }
}
