/* 全局样式 */
:root {
    --primary-color: #512bd4;
    --secondary-color: #6939ba;
    --accent-color: #8456ce;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f8f8;
    --bg-tertiary: #e8e8e8;
    --text-primary: #1e1e1e;
    --text-secondary: #464646;
    --text-muted: #707070;
    --border-color: #d4d4d4;
    --success-color: #107c10;
    --warning-color: #ca5010;
    --error-color: #d13438;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 背景动画 */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(81, 43, 212, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(105, 57, 186, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 40% 90%, rgba(132, 86, 206, 0.03) 0%, transparent 50%);
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    height: 64px;
    box-shadow: var(--shadow-sm);
}

/* API 广告横幅 */
.api-banner {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #512bd4 0%, #6939ba 50%, #8456ce 100%);
    z-index: 999;
    animation: slideDown 0.5s ease;
    box-shadow: 0 4px 12px rgba(81, 43, 212, 0.2);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

.api-banner-content {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.api-banner-icon {
    font-size: 1.5rem;
    color: #ffd700;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.api-banner-text {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    font-size: 0.95rem;
    flex-wrap: wrap;
}

.api-banner-text strong {
    font-size: 1.05rem;
    font-weight: 700;
}

.api-banner-divider {
    color: rgba(255, 255, 255, 0.5);
}

.api-banner-highlight {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 700;
    border: 1px solid rgba(255, 215, 0, 0.4);
}

.api-banner-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.api-banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    background: white;
    color: #512bd4;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.api-banner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    background: #f8f8f8;
}

.api-banner-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.api-banner-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.api-banner.hidden {
    display: none;
}

/* 当广告显示时调整容器位置 */
body:not(.api-banner-closed) .container {
    margin-top: 120px;
}

body.api-banner-closed .container {
    margin-top: 80px;
}

.nav-container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-brand i {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-search {
    position: relative;
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
}

.nav-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.nav-search input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition);
}

.nav-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(81, 43, 212, 0.15);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* 容器布局 */
.container {
    display: grid;
    grid-template-columns: 280px 1fr 60px;
    gap: 2rem;
    max-width: 1920px;
    margin: 120px auto 0;
    padding: 2rem;
    min-height: calc(100vh - 120px);
    transition: margin-top 0.3s ease;
}

/* 侧边栏 */
.sidebar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 112px);
    overflow-y: auto;
    box-shadow: var(--shadow-sm);
}

.sidebar-header {
    margin-bottom: 1.5rem;
}

.sidebar-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.sidebar-header i {
    color: var(--primary-color);
}

.chapter {
    margin-bottom: 1rem;
}

.chapter-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: 0.9rem;
}

.chapter-title:hover {
    background: var(--bg-tertiary);
    transform: translateX(4px);
}

.chapter-title i {
    color: var(--primary-color);
    transition: var(--transition);
}

.chapter.expanded .chapter-title i {
    transform: rotate(90deg);
}

.chapter-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.chapter.expanded .chapter-items {
    max-height: 1000px;
}

.chapter-item {
    padding: 0.5rem 1rem;
    margin: 0.25rem 0 0.25rem 1rem;
    border-left: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
    color: var(--text-secondary);
    position: relative;
}

.chapter-item:hover {
    border-left-color: var(--primary-color);
    color: var(--text-primary);
    background: rgba(81, 43, 212, 0.05);
    transform: translateX(2px);
}

.chapter-item.active {
    border-left-color: var(--accent-color);
    color: var(--primary-color);
    background: rgba(81, 43, 212, 0.08);
    font-weight: 600;
}

.chapter-item:active {
    transform: translateX(1px) scale(0.99);
}

/* 主内容区 */
.main-content {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    min-height: 600px;
    box-shadow: var(--shadow-sm);
}

.content-wrapper {
    padding: 3rem;
}

/* 内容淡入淡出动画 */
.content-fade-out {
    animation: contentFadeOut 0.25s cubic-bezier(0.4, 0, 0.6, 1) forwards;
    pointer-events: none; /* 动画期间禁止交互 */
}

.content-fade-in {
    animation: contentFadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes contentFadeOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }
}

@keyframes contentFadeIn {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 欢迎页面 */
.welcome-page {
    animation: fadeIn 0.5s ease;
}

.hero-section {
    text-align: center;
    padding: 4rem 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(20deg); }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(81, 43, 212, 0.05), rgba(132, 86, 206, 0.05));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.stat-info {
    text-align: left;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.features-section {
    padding: 4rem 2rem;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.start-learning {
    text-align: center;
    padding: 3rem 0;
}

.cta-button {
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.cta-button i {
    margin-right: 0.5rem;
}

/* Markdown内容样式 */
.markdown-content {
    animation: fadeIn 0.5s ease;
}

.content-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.back-button {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.back-button:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

#contentTitle {
    flex: 1;
    font-size: 2rem;
    color: var(--text-primary);
}

.content-body {
    font-size: 1rem;
    line-height: 1.8;
    max-width: 100%;
    overflow-x: hidden;
    word-wrap: break-word;
}

.content-body h1,
.content-body h2,
.content-body h3,
.content-body h4 {
    margin: 2rem 0 1rem;
    color: var(--text-primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.content-body h1 {
    font-size: 2rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.content-body h2 {
    font-size: 1.75rem;
}

.content-body h3 {
    font-size: 1.5rem;
}

.content-body p {
    margin: 1rem 0;
    color: var(--text-secondary);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.content-body ul,
.content-body ol {
    margin: 1rem 0;
    padding-left: 2rem;
    color: var(--text-secondary);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.content-body li {
    margin: 0.5rem 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.content-body a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.content-body a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.content-body code {
    padding: 0.2rem 0.4rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
    color: var(--accent-color);
}

.content-body pre {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: #1e1e1e;
    border-radius: 12px;
    overflow-x: auto;
    box-shadow: var(--shadow-md);
    max-width: 100%;
    word-break: break-all;
    white-space: pre-wrap;
    border: 1px solid var(--border-color);
}

.content-body pre code {
    padding: 0;
    background: none;
    border: none;
    color: #abb2bf;
    font-size: 0.9rem;
}

.content-body blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--primary-color);
    background: rgba(81, 43, 212, 0.05);
    border-radius: 0 8px 8px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow-x: auto;
}

.content-body table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    display: block;
    overflow-x: auto;
}

.content-body th,
.content-body td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.content-body th {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 600;
}

.content-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.content-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.nav-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
}

.nav-btn:hover:not(:disabled) {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.nav-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 工具栏 */
.tools-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 96px;
    height: fit-content;
}

.tool-button {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.tool-button:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    color: var(--text-primary);
}

.close {
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    color: var(--text-primary);
}

.toc-content {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.toc-item {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.toc-item:hover {
    color: var(--primary-color);
    padding-left: 0.5rem;
}

/* 加载动画 */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    animation: loaderFadeIn 0.2s ease-out forwards;
}

@keyframes loaderFadeIn {
    to { opacity: 1; }
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f0f0f0;
}

::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* 关于页面样式 */
.about-page {
    animation: fadeIn 0.5s ease;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.author-section {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
}

.author-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.author-avatar {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    box-shadow: var(--shadow-md);
}

.author-header h2 {
    font-size: 2.5rem;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.author-intro {
    margin-bottom: 2rem;
}

.author-intro p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.05rem;
}

.author-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(81, 43, 212, 0.1), rgba(132, 86, 206, 0.1));
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.badge i {
    color: var(--accent-color);
}

.qrcode-section {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    height: fit-content;
    box-shadow: var(--shadow-sm);
}

.qrcode-section h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.qrcode-section h3 i {
    color: var(--primary-color);
}

.qrcode-container {
    width: 100%;
    max-width: 300px;
    margin: 0 auto 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.qrcode-container img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    background: white;
    padding: 0.5rem;
}

.qrcode-placeholder {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--text-muted);
}

.qrcode-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.qrcode-placeholder p {
    text-align: center;
    line-height: 1.6;
}

.qrcode-placeholder code {
    display: block;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 4px;
    color: var(--accent-color);
    font-size: 0.85rem;
}

.qrcode-hint {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.mobile-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1999;
}

.mobile-sidebar-overlay.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: 250px 1fr 60px;
    }
}

@media (max-width: 992px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-search {
        margin: 0 1rem;
        max-width: 300px;
    }
    
    .api-banner-content {
        padding: 0.5rem 1rem;
        gap: 0.5rem;
    }
    
    .api-banner-text {
        font-size: 0.85rem;
        gap: 0.5rem;
    }
    
    .api-banner-desc {
        display: none;
    }
    
    .container {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1rem;
    }
    
    body:not(.api-banner-closed) .container {
        margin-top: 120px;
    }
    
    body.api-banner-closed .container {
        margin-top: 70px;
    }
    
    .sidebar {
        position: fixed;
        left: -100%;
        top: 64px;
        width: 280px;
        height: calc(100vh - 64px);
        z-index: 2000;
        transition: left 0.3s ease;
        max-height: calc(100vh - 64px);
        border-radius: 0;
        border-left: none;
    }
    
    .sidebar.mobile-active {
        left: 0;
        box-shadow: var(--shadow-lg);
    }
    
    .tools-sidebar {
        position: fixed;
        bottom: 20px;
        right: 20px;
        flex-direction: row;
        background: rgba(30, 41, 59, 0.95);
        backdrop-filter: blur(10px);
        padding: 0.5rem;
        border-radius: 12px;
        border: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-brand span {
        font-size: 1rem;
    }
    
    .nav-search {
        display: none;
    }
    
    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .api-banner-text span:not(.api-banner-highlight) {
        display: none;
    }
    
    .api-banner-text {
        gap: 0.5rem;
    }
    
    .api-banner-divider {
        display: none;
    }
    
    .api-banner-btn {
        font-size: 0.85rem;
        padding: 0.4rem 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .features-section {
        padding: 2rem 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .main-content {
        overflow-x: hidden;
    }
    
    .content-wrapper {
        padding: 1rem;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .content-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    #contentTitle {
        font-size: 1.5rem;
        width: 100%;
    }
    
    .content-body {
        font-size: 0.95rem;
    }
    
    .content-body h1 {
        font-size: 1.5rem;
    }
    
    .content-body h2 {
        font-size: 1.3rem;
    }
    
    .content-body h3 {
        font-size: 1.1rem;
    }
    
    .content-body pre {
        padding: 1rem;
        font-size: 0.85rem;
        margin-left: -1rem;
        margin-right: -1rem;
        border-radius: 0;
        max-width: calc(100vw - 2rem);
    }
    
    .content-body pre code {
        font-size: 0.85rem;
        word-break: break-all;
        white-space: pre-wrap;
    }
    
    .content-body table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .content-navigation {
        flex-direction: column;
    }
    
    .nav-btn {
        width: 100%;
        padding: 1rem;
    }
    
    .cta-button {
        padding: 0.875rem 2rem;
        font-size: 1rem;
        width: 100%;
        max-width: 300px;
    }
    
    .author-header {
        flex-direction: column;
        text-align: center;
    }
    
    .author-avatar {
        width: 100px;
        height: 100px;
        font-size: 3rem;
    }
    
    .author-header h2 {
        font-size: 1.75rem;
    }
    
    .author-section,
    .qrcode-section {
        padding: 1.5rem;
    }
    
    .author-badges {
        justify-content: center;
    }
    
    .modal-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .tools-sidebar {
        gap: 0.5rem;
    }
    
    .tool-button {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 0.75rem;
    }
    
    .nav-brand {
        font-size: 1rem;
    }
    
    .nav-brand i {
        font-size: 1.25rem;
    }
    
    .nav-links {
        gap: 0.75rem;
        font-size: 0.85rem;
    }
    
    .container {
        padding: 0.5rem;
    }
    
    .main-content {
        border-radius: 12px;
        overflow-x: hidden;
    }
    
    .content-wrapper {
        padding: 0.75rem;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card i {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .back-button {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    #contentTitle {
        font-size: 1.25rem;
    }
    
    .content-body {
        font-size: 0.9rem;
    }
    
    .content-body h1 {
        font-size: 1.3rem;
    }
    
    .content-body h2 {
        font-size: 1.15rem;
    }
    
    .content-body h3 {
        font-size: 1rem;
    }
    
    .content-body pre {
        padding: 0.75rem;
        margin: 1rem -0.75rem;
        border-radius: 0;
        max-width: calc(100vw - 1rem);
    }
    
    .content-body pre code {
        font-size: 0.8rem;
    }
    
    .content-body table {
        font-size: 0.85rem;
        display: block;
        overflow-x: auto;
    }
    
    .content-body th,
    .content-body td {
        padding: 0.5rem;
        white-space: nowrap;
    }
    
    .content-body img {
        max-width: 100%;
        height: auto;
    }
}
