/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00ff88;
    --primary-dark: #00cc6a;
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --bg-card: #111111;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --border-color: #1a1a1a;
    --border-light: #2a2a2a;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --gradient-primary: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    --gradient-dark: linear-gradient(180deg, #0a0a0a 0%, #050505 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ========== 导航栏样式 ========== */
.wiki-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-link {
    display: flex;
    align-items: center;
}

.nav-logo {
    height: 40px;
    width: auto;
}

.nav-divider {
    color: var(--text-muted);
    font-size: 1.5rem;
    font-weight: 300;
}

.nav-title {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-card);
    border-color: var(--border-light);
}

.nav-link-primary {
    background: var(--gradient-primary);
    color: var(--bg-dark);
    font-weight: 500;
    border: none;
}

.nav-link-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.3);
}

.nav-link svg {
    width: 16px;
    height: 16px;
}

/* ========== Hero区域 ========== */
.wiki-hero {
    position: relative;
    padding: 6rem 2rem 4rem;
    overflow: hidden;
    background: var(--gradient-dark);
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.3;
    z-index: 0;
}

.hero-content {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.badge-icon {
    font-size: 1.2rem;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.title-highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-light);
}

/* ========== 主内容区域 ========== */
.wiki-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.content-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
}

/* ========== 侧边栏 ========== */
.wiki-sidebar {
    position: relative;
}

.sidebar-sticky {
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    padding-right: 0.5rem;
}

.sidebar-sticky::-webkit-scrollbar {
    width: 4px;
}

.sidebar-sticky::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-sticky::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 2px;
}

.search-box {
    position: relative;
    margin-bottom: 2rem;
}

.search-box svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-item {
    border-radius: 6px;
    overflow: hidden;
}

.nav-item-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}

.nav-item-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--primary-color);
}

.nav-item.active .nav-item-link {
    color: var(--primary-color);
    background: rgba(0, 255, 136, 0.1);
    border-left-color: var(--primary-color);
}

.item-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

/* ========== 主文章内容 ========== */
.wiki-main {
    min-width: 0;
}

.wiki-article {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 3rem;
}

.article-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-item svg {
    width: 14px;
    height: 14px;
}

.article-content {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
}

.lead-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.section-heading {
    font-size: 1.75rem;
    font-weight: 600;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.article-content p {
    margin-bottom: 1rem;
}

/* ========== 信息框 ========== */
.info-box {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    border-left: 3px solid;
}

.info-box-primary {
    background: rgba(0, 255, 136, 0.05);
    border-color: var(--primary-color);
}

.info-box-warning {
    background: rgba(255, 165, 0, 0.05);
    border-color: #ffa500;
}

.info-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-content h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.info-content p {
    margin: 0;
}

/* ========== 功能网格 ========== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card {
    background: var(--bg-dark);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 0.9rem;
    margin: 0;
}

/* ========== 步骤列表 ========== */
.step-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0;
}

.step-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: var(--bg-dark);
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.1rem;
}

.step-content h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.step-content p {
    margin: 0;
}

/* ========== 联系卡片 ========== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem;
    background: var(--bg-dark);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.contact-card p {
    margin: 0;
    color: var(--primary-color);
}

/* ========== Telegram浮动按钮 ========== */
.telegram-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: #0088cc;
    color: white;
    border-radius: 50px;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    cursor: pointer;
}

.telegram-float:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 136, 204, 0.4);
}

.telegram-float svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.telegram-text {
    font-weight: 600;
    font-size: 0.95rem;
}

.telegram-float.scrolled .telegram-text {
    display: none;
}

.telegram-float.scrolled {
    padding: 1rem;
    border-radius: 50%;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .content-container {
        grid-template-columns: 1fr;
    }

    .wiki-sidebar {
        display: none;
    }

    .hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
        height: 60px;
    }

    .nav-logo {
        height: 32px;
    }

    .nav-divider,
    .nav-title {
        display: none;
    }

    .nav-right {
        gap: 0.5rem;
    }

    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .nav-link span {
        display: none;
    }

    .nav-link svg {
        width: 18px;
        height: 18px;
        margin: 0;
    }

    .nav-link-primary {
        padding: 0.5rem 1rem;
        min-width: auto;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .stat-divider {
        display: none;
    }

    .wiki-article {
        padding: 2rem 1.5rem;
    }

    .article-title {
        font-size: 2rem;
    }

    .telegram-float {
        bottom: 1rem;
        right: 1rem;
        padding: 0.875rem;
        border-radius: 50%;
    }

    .telegram-text {
        display: none;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .nav-container {
        height: 56px;
    }

    .nav-logo {
        height: 28px;
    }

    .nav-link {
        padding: 0.4rem 0.6rem;
    }

    .nav-link svg {
        width: 16px;
        height: 16px;
    }

    .nav-link-primary {
        padding: 0.4rem 0.75rem;
    }

    .wiki-content {
        padding: 2rem 1rem;
    }

    .wiki-article {
        padding: 1.5rem 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .article-title {
        font-size: 1.75rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .section-heading {
        font-size: 1.5rem;
    }
}
