/* ==================== 全局样式 ==================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

:root {
    /* macOS 风格配色方案 */
    --primary-color: #007AFF; /* Apple Blue */
    --primary-dark: #0056B3;
    --primary-light: #409CFF;
    --secondary-color: #409CFF; /* Light Blue */
    --accent-color: #0A84FF; /* Blue variant */
    
    --success-color: #34C759;
    --warning-color: #FF9500;
    --danger-color: #FF3B30;
    
    /* 背景色 - 更干净的层次 */
    --bg-body: #F5F5F7; /* 浅灰背景 */
    --bg-card: #FFFFFF;
    --bg-sidebar: #F0F0F5; /* 模拟 App 侧边栏 */
    --bg-glass: rgba(255, 255, 255, 0.75); /* 降低不透明度，增加通透感 */
    --bg-code: #F5F5F7;
    
    /* 文本颜色 */
    --text-primary: #1D1D1F;
    --text-secondary: #86868B;
    --text-light: #A1A1A6;
    
    --border-color: rgba(0, 0, 0, 0.06);
    --border-hover: rgba(0, 0, 0, 0.12);
    
    /* 阴影 - 更细腻 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 30px 60px rgba(0, 0, 0, 0.12);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

/* 深色主题 */
[data-theme="dark"] {
    --primary-color: #0A84FF;
    --primary-dark: #409CFF;
    --bg-body: #000000;
    --bg-card: #1C1C1E;
    --bg-sidebar: #2C2C2E;
    --bg-glass: rgba(28, 28, 30, 0.75);
    --bg-code: #2C2C2E;
    
    --text-primary: #F5F5F7;
    --text-secondary: #86868B;
    --text-light: #636366;
    
    --border-color: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.2);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 30px 60px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-body);
    overflow-x: hidden;
    /* 全局噪点纹理 */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    
    /* Sticky Footer 布局 */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    position: relative;
    z-index: 1;
}

/* 全局图片自适应 */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* ==================== 动画定义 ==================== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-dot {
    0% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(52, 199, 89, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); }
}

@keyframes wave-flow {
    0% { background-position: 0 0; }
    100% { background-position: 100% 0; }
}

@keyframes rotate-glow {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.animate-in {
    opacity: 0;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ==================== 导航栏 ==================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    height: 64px;
    display: flex;
    align-items: center;
    transition: background 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 24px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.nav-brand:hover {
    opacity: 0.8;
}

.logo-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0 2rem;
}

.nav-menu a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

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

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-menu a.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    transition: background 0.2s;
}

.icon-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
    padding: 10px;
    -webkit-tap-highlight-color: transparent;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ==================== Hero 区域 ==================== */
.hero {
    padding: 120px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    text-align: left;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(0, 122, 255, 0.1);
    border-radius: 20px;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 122, 255, 0.2);
}

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

.hero-title span {
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 99px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 122, 255, 0.4);
}

[data-theme="dark"] .btn-primary:hover {
    background: #0062cc;
    color: white;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn-primary:hover::after {
    left: 100%;
    transition: 0.5s ease-in-out;
}

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

.btn-secondary:hover {
    background: #F5F5F7;
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .btn-secondary:hover {
    background: #2C2C2E;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0,122,255,0.15) 0%, rgba(88,86,214,0.1) 40%, transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    pointer-events: none;
    filter: blur(40px);
    animation: rotate-glow 20s linear infinite;
}

/* App Window Mockup */
.app-window-mockup {
    width: 100%;
    max-width: 520px;
    aspect-ratio: 16/10;
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    transform: rotateY(-5deg) rotateX(2deg);
    transition: transform 0.5s ease;
}

.hero-visual:hover .app-window-mockup {
    transform: rotateY(0) rotateX(0);
}

.window-sidebar {
    width: 160px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
}

.window-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding-left: 4px;
}

.window-dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red { background: #FF5F57; border: 1px solid rgba(0,0,0,0.1); }
.dot-yellow { background: #FEBC2E; border: 1px solid rgba(0,0,0,0.1); }
.dot-green { background: #28C840; border: 1px solid rgba(0,0,0,0.1); }

.sidebar-menu { display: flex; flex-direction: column; gap: 4px; }

.sidebar-item {
    height: 34px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-item:hover { background: rgba(0,0,0,0.03); }
.sidebar-item.active { background: rgba(0,0,0,0.06); color: var(--text-primary); }
[data-theme="dark"] .sidebar-item { color: #A1A1A6; }
[data-theme="dark"] .sidebar-item.active { background: rgba(255,255,255,0.1); color: #F5F5F7; }

.sidebar-icon-svg { width: 16px; height: 16px; opacity: 0.8; }
.active .sidebar-icon-svg { color: var(--primary-color); opacity: 1; }

.window-main {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
}

.mockup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.mockup-title-real { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }

.mockup-status {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.75rem; font-weight: 600;
    color: var(--success-color);
    background: rgba(52, 199, 89, 0.1);
    padding: 4px 10px; border-radius: 8px;
}

.mockup-status-dot {
    width: 6px; height: 6px;
    background: var(--success-color);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--success-color);
    animation: pulse-dot 2s infinite;
}

.mockup-graph {
    flex: 1;
    background: linear-gradient(180deg, rgba(0,122,255,0.05) 0%, rgba(0,122,255,0) 100%);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    min-height: 100px;
}

.mockup-grid-lines {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-image: linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 20px 20px;
}
[data-theme="dark"] .mockup-grid-lines {
    background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
}

.mockup-wave {
    position: absolute; bottom: 0; left: 0; right: 0; height: 60%;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1440 320" xmlns="http://www.w3.org/2000/svg"><path fill="%23007AFF" fill-opacity="0.2" d="M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,250.7C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: 200% 100%;
    background-repeat: repeat-x;
    animation: wave-flow 20s linear infinite;
}

.mockup-stats-row { display: flex; gap: 16px; margin-bottom: 20px; }

.mockup-stat-box {
    flex: 1;
    background: var(--bg-body);
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.stat-label {
    font-size: 0.75rem; color: var(--text-secondary);
    margin-bottom: 4px; display: flex; align-items: center; gap: 6px;
}

.stat-value {
    font-size: 1.1rem; font-weight: 600;
    color: var(--text-primary); font-variant-numeric: tabular-nums;
}

.mockup-toggles { display: flex; flex-direction: column; gap: 12px; }

.mockup-toggle-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0; border-bottom: 1px solid var(--border-color);
}
.mockup-toggle-item:last-child { border-bottom: none; }
.mockup-toggle-item span { font-size: 0.9rem; font-weight: 500; }

.mockup-switch {
    width: 36px; height: 20px;
    background: #E9E9EA; border-radius: 20px;
    position: relative; transition: background 0.3s;
}
[data-theme="dark"] .mockup-switch { background: #39393D; }

.mockup-switch::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 16px; height: 16px; background: white;
    border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}

.mockup-switch.active { background: var(--success-color); }
.mockup-switch.active::after { transform: translateX(16px); }

.hero-stats-strip {
    display: flex; gap: 40px; padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.stat-mini { display: flex; flex-direction: column; }
.stat-mini strong { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); line-height: 1; }
.stat-mini span { font-size: 0.85rem; color: var(--text-secondary); margin-top: 4px; }

/* ==================== Bento Grid ==================== */
.features { padding: 80px 0; }

.section-header {
    text-align: center; margin-bottom: 60px;
    max-width: 700px; margin-left: auto; margin-right: auto;
}

.section-title {
    font-size: 2.5rem; font-weight: 700; color: var(--text-primary);
    margin-bottom: 16px; letter-spacing: -0.02em;
}

.section-subtitle { font-size: 1.1rem; color: var(--text-secondary); }

.bento-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(240px, auto); gap: 24px;
}

.bento-card {
    background: var(--bg-card); border-radius: 24px; padding: 32px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(255,255,255,0.1);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex; flex-direction: column; justify-content: space-between;
    overflow: hidden; position: relative; z-index: 1;
}

.bento-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: var(--shadow-lg); border-color: var(--border-hover); z-index: 2;
}

.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }

.bento-icon {
    width: 56px; height: 56px; background: var(--bg-body);
    border-radius: 16px; display: flex; align-items: center; justify-content: center;
    font-size: 1.75rem; margin-bottom: 24px; color: var(--primary-color);
    transition: transform 0.3s ease;
}

.bento-card:hover .bento-icon { transform: scale(1.1) rotate(5deg); }
[data-theme="dark"] .bento-icon { background: rgba(255, 255, 255, 0.1); }

.bento-content h3 { font-size: 1.35rem; font-weight: 600; margin-bottom: 12px; color: var(--text-primary); }
.bento-content p { color: var(--text-secondary); font-size: 1rem; line-height: 1.6; }

.bento-card.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white; border: none;
    background-image: linear-gradient(135deg, var(--primary-color), var(--secondary-color)),
                      url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='1'/%3E%3C/g%3E%3C/svg%3E");
}
.bento-card.highlight .bento-icon { background: rgba(255, 255, 255, 0.2); color: white; }
.bento-card.highlight h3, .bento-card.highlight p { color: white; }

/* ==================== Trust Grid ==================== */
.trust-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-card);
}
@media (max-width: 640px) {
    .trust-grid { grid-template-columns: 1fr !important; }
    .trust-grid > div:first-child { border-right: none !important; border-bottom: 1px solid var(--border-color); }
}

/* ==================== Quick Start & Articles ==================== */
.quick-start { padding: 80px 0; background: var(--bg-body); }
.steps-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }

.step-card {
    background: var(--bg-card); padding: 0; border-radius: 20px;
    overflow: hidden; box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color); transition: transform 0.3s ease;
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.step-header {
    padding: 24px; border-bottom: 1px solid var(--border-color);
    display: flex; align-items: center; gap: 16px;
}
.step-num {
    width: 32px; height: 32px; background: var(--text-primary);
    color: var(--bg-card); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.9rem;
}
.step-title { font-size: 1.1rem; font-weight: 600; color: var(--text-primary); }
.step-body { padding: 24px; }
.step-desc { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 16px; }
.step-link { font-size: 0.9rem; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }

.latest-articles { padding: 80px 0; }
.articles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }

.article-card {
    background: var(--bg-card); border-radius: 20px; overflow: hidden;
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.article-content { padding: 24px; }
.article-badge {
    display: inline-block; padding: 4px 10px; background: var(--bg-body);
    color: var(--text-secondary); border-radius: 6px;
    font-size: 0.75rem; font-weight: 600; margin-bottom: 12px; text-transform: uppercase;
}
.article-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; color: var(--text-primary); line-height: 1.4; }
.article-excerpt { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; margin-bottom: 20px; }
.article-meta { font-size: 0.85rem; color: var(--text-light); display: flex; gap: 16px; }

/* ==================== CTA & Footer ==================== */
.cta-section {
    padding: 100px 0; background: var(--bg-card);
    text-align: center; border-top: 1px solid var(--border-color);
}
.cta-content { max-width: 600px; margin: 0 auto; }
.cta-title { font-size: 2.5rem; font-weight: 700; color: var(--text-primary); margin-bottom: 16px; letter-spacing: -0.02em; }
.cta-subtitle { font-size: 1.2rem; color: var(--text-secondary); margin-bottom: 40px; }

.footer {
    background: var(--bg-body); padding: 80px 0 40px;
    border-top: 1px solid var(--border-color); color: var(--text-secondary);
}
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 60px; }
.footer-brand .brand-name { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); display: block; margin-bottom: 16px; }
.footer-section .footer-title {
    color: var(--text-primary); font-size: 0.9rem; font-weight: 600;
    margin-bottom: 20px; text-transform: uppercase; letter-spacing: 0.05em;
}
.footer-section ul { list-style: none; }
.footer-section li { margin-bottom: 12px; }
.footer-section a { color: var(--text-secondary); font-size: 0.9rem; }
.footer-section a:hover { color: var(--primary-color); }

/* Related Resources Section (meta-section) */
.meta-section{padding:60px 0}
.meta-section h2{font-size:1.5rem;font-weight:700;color:var(--text-primary);text-align:center;margin-bottom:32px}

/* ==================== 通用内容页样式 (修复其他页面布局) ==================== */

/* 页面头部 (非 Hero) */
.page-header {
    text-align: center;
    padding: 80px 0 40px;
    background: linear-gradient(to bottom, rgba(0,122,255,0.03), transparent);
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

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

/* 内容容器 */
.page-content {
    padding: 40px 0 80px;
    max-width: 800px;
    margin: 0 auto;
}

/* 全局排版样式 (针对 main 下的标准元素) */
main h1, main h2, main h3, main h4, main h5, main h6 {
    color: var(--text-primary);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    line-height: 1.2;
}
main h1 { font-size: 2.5rem; font-weight: 700; }
main h2 { font-size: 2rem; font-weight: 600; }
main h3 { font-size: 1.5rem; font-weight: 600; }
main p { margin-bottom: 1em; }
main ul, main ol { margin-bottom: 1em; padding-left: 1.5em; }
main li { margin-bottom: 0.5em; }

/* 兼容旧版 Grid 系统 */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}
[class*="col-"] {
    padding: 0 15px;
    box-sizing: border-box;
}
.col-md-3 { width: 25%; }
.col-md-4 { width: 33.33%; }
.col-md-8 { width: 66.66%; }
.col-md-9 { width: 75%; }
.col-12 { width: 100%; }

@media (max-width: 768px) {
    .col-md-3, .col-md-4, .col-md-8, .col-md-9 { width: 100%; }
}

/* 文章/教程排版 */
.article-body, .tutorial-content, .markdown-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.article-body h2, .tutorial-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 48px;
    margin-bottom: 24px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.article-body h3, .tutorial-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.article-body p, .tutorial-content p {
    margin-bottom: 24px;
}

.article-body ul, .tutorial-content ul,
.article-body ol, .tutorial-content ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.article-body li, .tutorial-content li {
    margin-bottom: 8px;
}

.article-body a, .tutorial-content a {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.article-body a:hover, .tutorial-content a:hover {
    color: var(--primary-dark);
}

.article-body blockquote, .tutorial-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    padding-left: 20px;
    margin: 32px 0;
    font-style: italic;
    color: var(--text-secondary);
    background: rgba(0,122,255,0.03);
    border-radius: 0 8px 8px 0;
}

.article-body img, .tutorial-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin: 32px 0;
    border: 1px solid var(--border-color);
}

/* 代码块样式 */
pre, .code-block-enhanced {
    background: var(--bg-code);
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 24px 0;
    border: 1px solid var(--border-color);
    font-family: 'SF Mono', Menlo, Monaco, Consolas, monospace;
    font-size: 0.9rem;
    position: relative;
}

code {
    font-family: 'SF Mono', Menlo, Monaco, Consolas, monospace;
    background: rgba(0,0,0,0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--secondary-color);
}
[data-theme="dark"] code { background: rgba(255,255,255,0.1); color: #FF9F0A; }

pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* 搜索模态框 (JS 生成) */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: flex-start;
    padding: 80px 20px;
}
.search-modal.active { display: flex; }

.search-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.search-modal-content {
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: calc(100vh - 160px);
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: fadeUp 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

.search-modal-header {
    padding: 0;
    border-bottom: 1px solid var(--border-color);
}

.search-modal-input-wrapper {
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 12px;
}

.search-modal-icon {
    font-size: 1.2rem;
    color: var(--text-light);
    flex-shrink: 0;
}

.search-modal-input {
    flex: 1;
    padding: 20px 0;
    font-size: 1.1rem;
    border: none;
    background: transparent;
    color: var(--text-primary);
    outline: none;
}

.search-modal-input::placeholder {
    color: var(--text-light);
}

.search-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-body);
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.search-modal-close:hover {
    background: var(--bg-sidebar);
    color: var(--text-primary);
}

.search-modal-results {
    flex: 1;
    max-height: 400px;
    overflow-y: auto;
    padding: 12px;
}

.search-modal-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    color: var(--text-light);
}

.search-modal-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.search-modal-empty p {
    font-size: 0.95rem;
    margin: 0;
}

.search-result-item {
    display: block;
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 8px;
    border: 1px solid transparent;
    text-decoration: none;
}

.search-result-item:last-child {
    margin-bottom: 0;
}

.search-result-item:hover,
.search-result-item.active {
    background: var(--bg-body);
    border-color: var(--border-color);
}

.search-result-item.active {
    border-color: var(--primary-color);
    background: rgba(0, 122, 255, 0.05);
}

.search-result-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 6px;
}

.search-result-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.4;
}

.search-result-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.search-modal-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-body);
}

.search-modal-tips {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-light);
    flex-wrap: wrap;
}

.search-modal-tips kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.7rem;
    font-family: inherit;
    color: var(--text-secondary);
    margin-right: 4px;
}

@media (max-width: 640px) {
    .search-modal {
        padding: 20px 16px;
    }

    .search-modal-content {
        max-height: calc(100vh - 40px);
    }

    .search-modal-tips {
        display: none;
    }
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed; bottom: 30px; right: 30px;
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--bg-card); color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; opacity: 0; visibility: hidden;
    transition: all 0.3s; z-index: 900;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--primary-color); }

/* 表格样式 */
table {
    width: 100%; border-collapse: collapse; margin: 24px 0;
    font-size: 0.95rem;
}
th, td {
    padding: 12px 16px; text-align: left;
    border-bottom: 1px solid var(--border-color);
}
th { font-weight: 600; color: var(--text-primary); background: var(--bg-body); }
td { color: var(--text-secondary); }

/* 侧边栏/TOC 样式 */
.toc-list-enhanced {
    position: sticky;
    top: 100px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

/* ==================== Download Page Styles ==================== */
.download-hero {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(180deg, rgba(0,122,255,0.05) 0%, transparent 100%);
    border-bottom: 1px solid var(--border-color);
}

.download-card-large {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 40px;
    max-width: 800px;
    margin: -40px auto 60px; /* Overlap effect */
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 10;
    text-align: center;
}

.download-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 30px 0;
    padding: 20px;
    background: var(--bg-body);
    border-radius: 12px;
}

.meta-item strong {
    display: block;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.meta-item span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.checksum-area {
    margin-top: 20px;
    text-align: left;
}

.checksum-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: block;
}

.checksum-code {
    display: flex;
    gap: 10px;
    align-items: center;
    background: var(--bg-code);
    padding: 10px 16px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-primary);
    word-break: break-all;
    border: 1px solid var(--border-color);
}

/* ==================== Documentation/Sidebar Layout ==================== */
.layout-sidebar {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    padding: 40px 0;
    align-items: start;
}

.sidebar {
    position: sticky;
    top: 100px;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border-color);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 4px;
}

.sidebar-nav a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: all 0.2s;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background: rgba(0,122,255,0.08);
    color: var(--primary-color);
    font-weight: 500;
}

.doc-content {
    min-width: 0; /* Prevent grid blowout */
}

@media (max-width: 900px) {
    .layout-sidebar {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: static;
        max-height: none;
        margin-bottom: 40px;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 60px;
}

.page-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.2s;
}

.page-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ==================== Blog Page Styles ==================== */

/* Mobile Promo Banner */
.mobile-promo-banner { display: none; }
@media (max-width: 768px) {
    .mobile-promo-banner { display: block; text-align: center; padding: 12px 16px 6px; background: var(--bg-secondary); border-bottom: 1px solid var(--border-color); }
    .mobile-promo-banner a { display: block; }
    .mobile-promo-banner img { max-width: 100%; height: auto; border-radius: 6px; display: block; margin: 0 auto; }
    .mobile-promo-banner .promo-label { font-size: 0.5rem; color: var(--text-secondary); opacity: 0.45; margin: 2px 0 0; line-height: 1; }
}

/* Page Hero */
.page-hero {
    padding: 100px 0 60px;
    text-align: center;
    background: linear-gradient(180deg, rgba(0,122,255,0.05) 0%, transparent 100%);
    border-bottom: 1px solid var(--border-color);
}

.page-hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}

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

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Blog Categories */
.blog-categories {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.category-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.category-btn:hover, .category-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.rss-subscribe-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 149, 0, 0.1);
    color: var(--warning-color);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.rss-subscribe-btn:hover {
    background: rgba(255, 149, 0, 0.2);
}

/* Blog Layout */
.blog-section {
    padding: 60px 0;
}

.blog-hero-search { max-width: 480px; margin: 1.5rem auto 0; width: 100%; }
.blog-hero-search-box { display: flex; align-items: center; gap: 10px; background: rgba(118, 118, 128, 0.12); border: 1px solid transparent; border-radius: 10px; padding: 11px 14px; transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease; }
.blog-hero-search-box:focus-within { background: var(--bg-card); border-color: rgba(0, 122, 255, 0.35); box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1), 0 4px 16px rgba(0, 0, 0, 0.06); }
[data-theme="dark"] .blog-hero-search-box { background: rgba(118, 118, 128, 0.24); }
[data-theme="dark"] .blog-hero-search-box:focus-within { background: var(--bg-card); border-color: rgba(10, 132, 255, 0.45); box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.15), 0 4px 16px rgba(0, 0, 0, 0.2); }
.blog-hero-search-icon { color: var(--text-secondary); flex-shrink: 0; display: flex; align-items: center; transition: color 0.2s ease; }
.blog-hero-search-icon svg { width: 18px; height: 18px; }
.blog-hero-search-box:focus-within .blog-hero-search-icon { color: var(--primary-color); }
.blog-hero-search-input { flex: 1; border: none; background: transparent; color: var(--text-primary); font-size: 16px; outline: none; min-width: 0; font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif; }
.blog-hero-search-input::placeholder { color: var(--text-secondary); opacity: 0.65; }
.blog-hero-search-input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.blog-hero-search-clear { opacity: 0; transform: scale(0.7); pointer-events: none; align-items: center; justify-content: center; width: 28px; height: 28px; border: none; background: rgba(118, 118, 128, 0.2); color: var(--text-secondary); border-radius: 50%; cursor: pointer; flex-shrink: 0; display: flex; transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease; }
.blog-hero-search-clear svg { width: 14px; height: 14px; }
.blog-hero-search-clear:hover { background: rgba(118, 118, 128, 0.35); color: var(--text-primary); }
.blog-hero-search-clear.visible { opacity: 1; transform: scale(1); pointer-events: auto; }
.blog-hero-search-count { font-size: 0.78rem; color: var(--text-secondary); flex-shrink: 0; white-space: nowrap; font-variant-numeric: tabular-nums; opacity: 0; transition: opacity 0.2s ease; }
.blog-hero-search-count.visible { opacity: 1; }
.blog-no-results { display: none; text-align: center; padding: 60px 20px; grid-column: 1 / -1; }
.blog-no-results.visible { display: block; }
.blog-no-results-icon { font-size: 3rem; margin-bottom: 16px; }
.blog-no-results-title { font-size: 1.25rem; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.blog-no-results-text { color: var(--text-secondary); font-size: 0.95rem; }

.blog-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
}

@media (max-width: 900px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }
}

/* Featured Post */
.featured-post {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    background: var(--bg-card);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.featured-post:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.featured-post-image {
    background: var(--bg-sidebar);
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-post-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 768px) {
    .featured-post {
        grid-template-columns: 1fr;
    }
    .featured-post-image {
        min-height: 200px;
    }
    .featured-post-content {
        padding: 24px;
    }
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
}

.blog-card {
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.blog-card-image {
    height: 200px;
    background: var(--bg-sidebar);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-placeholder-image {
    font-size: 3rem;
}
.blog-placeholder-image.large {
    font-size: 5rem;
}

.blog-category {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(246, 247, 248, 0.96);
    color: #1D1D1F;
    border: 1px solid rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(4px);
}

[data-theme="dark"] .blog-category {
    background: rgba(246, 247, 248, 0.94);
    color: #1D1D1F;
    border-color: rgba(0, 0, 0, 0.12);
}

.blog-category.guide { color: #1E8E3E; }
.blog-category.comparison { color: #3C3AAD; }
.blog-category.tutorial { color: #0B57D0; }
.blog-category.tips { color: #B06000; }
.blog-category.troubleshooting { color: #C5221F; }

.blog-card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.blog-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--text-primary);
}

.blog-card-excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
    flex: 1;
}

.blog-card-footer {
    margin-top: auto;
}

.blog-read-more {
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 24px;
    margin-bottom: 32px;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.search-box {
    display: flex;
    gap: 8px;
}

.search-input {
    flex: 1;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-body);
    color: var(--text-primary);
}

.search-btn {
    padding: 0 16px;
    border-radius: 8px;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
}

.popular-post-item {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.popular-post-item:last-child {
    margin-bottom: 0;
}

.popular-post-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-sidebar);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.popular-post-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
    line-height: 1.4;
}

.popular-post-meta {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Popular Posts List (Sidebar) */
.popular-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.popular-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.popular-item:last-child {
    border-bottom: none;
}

.popular-item:hover {
    opacity: 0.8;
}

.popular-item:hover .popular-content h4 {
    color: var(--primary-color);
}

.popular-number {
    width: 28px;
    height: 28px;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.popular-item:nth-child(1) .popular-number {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.popular-item:nth-child(2) .popular-number {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
}

.popular-item:nth-child(3) .popular-number {
    background: linear-gradient(135deg, #CD7F32, #8B4513);
}

.popular-content {
    flex: 1;
    min-width: 0;
}

.popular-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-views {
    font-size: 0.8rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 4px;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    padding: 6px 12px;
    background: var(--bg-sidebar);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.2s;
    cursor: pointer;
}

.tag-item:hover {
    background: var(--primary-color);
    color: white;
}

.tag-item.active {
    background: var(--primary-color);
    color: white;
}

.cta-widget {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
    border: none;
}

.cta-widget-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.cta-widget h3 {
    color: white;
    margin-bottom: 8px;
}

.cta-widget p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

.btn-small {
    padding: 8px 20px;
    font-size: 0.9rem;
    background: white;
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-small:hover {
    background: #f5f5f7;
    transform: translateY(-2px);
}

/* Animated Background */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(circle at 15% 50%, rgba(0, 122, 255, 0.03), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(88, 86, 214, 0.03), transparent 25%);
    pointer-events: none;
}

/* ==================== 响应式调整 ==================== */
@media (max-width: 1024px) {
    .hero .container { grid-template-columns: 1fr; text-align: center; gap: 60px; }
    .hero-content { text-align: center; display: flex; flex-direction: column; align-items: center; }
    .hero-subtitle { margin-left: auto; margin-right: auto; }
    .hero-stats-strip { justify-content: center; }
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
    .span-3 { grid-column: span 2; }
    .steps-container { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .hero { overflow: hidden; }
    .hero-title { font-size: 2rem; word-break: break-word; overflow-wrap: break-word; }
    .hero .container { padding: 0 20px; }
    .hero-subtitle { font-size: 1.05rem; overflow-wrap: break-word; }
    .hero-buttons { flex-direction: column; gap: 12px; width: 100%; }
    .hero-buttons .btn { width: 100%; justify-content: center; }
    .hero-stats-strip { flex-wrap: wrap; gap: 20px; justify-content: center; }
    .hero-glow { width: 400px; height: 400px; }
    .hero-visual { display: none !important; }
    .bento-grid { grid-template-columns: 1fr; }
    .span-2, .span-3 { grid-column: span 1; }
    .footer-content { grid-template-columns: 1fr; gap: 32px; }
    .nav-menu { display: none; }
    .hamburger { display: flex; }
    .navbar .container { padding: 0 16px; }
    .nav-actions { gap: 8px; }
}

@media (max-width: 420px) {
    .navbar .container { padding: 0 12px; }
    .nav-actions { gap: 6px; }
    .nav-brand { gap: 8px; font-size: 1.1rem; }
    .nav-brand span { display: none; }
    .icon-btn { width: 32px; height: 32px; }
}

.nav-menu.active {
    display: flex; flex-direction: column; position: absolute;
    top: 64px; left: 0; right: 0; background: var(--bg-card);
    padding: 24px; border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg); animation: fadeUp 0.3s ease;
}

/* ==================== Page Hero Content ==================== */
.page-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

/* ==================== Quick Navigation ==================== */
.quick-nav {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 32px;
}

.quick-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.quick-nav-item:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quick-nav-icon {
    font-size: 1.2rem;
}

/* ==================== Download Stats ==================== */
.download-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.download-stat-item {
    text-align: center;
}

.download-stat-item .stat-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.download-stat-item .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.download-stat-item .stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.stat-divider {
    width: 1px;
    height: 60px;
    background: var(--border-color);
    align-self: center;
}

@media (max-width: 768px) {
    .quick-nav {
        gap: 10px;
    }

    .quick-nav-item {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .download-stats {
        gap: 20px;
    }

    .stat-divider {
        display: none;
    }

    .download-stat-item .stat-value {
        font-size: 2rem;
    }
}

/* ==================== Download Page Enhanced Styles ==================== */
.download-section {
    padding: 60px 0;
}

.download-content-enhanced {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}

.download-main-enhanced {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.download-card-enhanced {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 32px;
    border: 1px solid var(--border-color);
    position: relative;
    transition: all 0.3s ease;
}

.download-card-enhanced:hover {
    box-shadow: var(--shadow-lg);
}

.download-card-enhanced.featured-download {
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 30px rgba(0, 122, 255, 0.1);
}

.featured-badge, .pro-badge {
    position: absolute;
    top: -12px;
    left: 24px;
    padding: 6px 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 20px;
}

.pro-badge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
}

.download-card-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.download-app-icon {
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.download-card-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.download-card-title h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.version-badge {
    padding: 4px 12px;
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 20px;
}

.download-card-desc {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.download-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 20px;
    background: var(--bg-body);
    border-radius: 12px;
    margin-bottom: 24px;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.spec-icon {
    font-size: 1.5rem;
}

.spec-info {
    display: flex;
    flex-direction: column;
}

.spec-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.spec-value {
    font-weight: 600;
    color: var(--text-primary);
}

.download-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.btn-glow {
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.3);
}

.btn-glow:hover {
    box-shadow: 0 6px 30px rgba(0, 122, 255, 0.4);
}

/* Pro Features */
.pro-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0;
    padding: 20px;
    background: var(--bg-body);
    border-radius: 12px;
}

.pro-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.check-icon {
    color: var(--success-color);
    font-weight: 700;
}

/* Install Guide */
.install-guide {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 32px;
    border: 1px solid var(--border-color);
}

.install-guide h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    margin-bottom: 24px;
}

.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.guide-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.step-num {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
}

.step-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Version History */
.version-history-enhanced {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 32px;
    border: 1px solid var(--border-color);
}

.version-history-enhanced h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.history-desc {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.history-card {
    background: var(--bg-body);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.history-version {
    font-weight: 700;
    font-size: 1rem;
}

.history-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.history-changes {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.change-tag {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(52, 199, 89, 0.1);
    color: var(--success-color);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    margin-right: 8px;
}

.change-tag.new {
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary-color);
}

.change-tag.improve {
    background: rgba(255, 149, 0, 0.1);
    color: var(--warning-color);
}

.view-all-versions {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: var(--primary-color);
    font-weight: 500;
}

.btn-small {
    padding: 6px 14px;
    font-size: 0.85rem;
}

/* Download Sidebar */
.download-sidebar-enhanced {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 100px;
}

.sidebar-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border-color);
}

.sidebar-card h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    margin-bottom: 16px;
}

.requirements {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.req-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.req-icon {
    color: var(--success-color);
    font-weight: 700;
}

.resource-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.resource-links li a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    padding: 10px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.resource-links li a:hover {
    background: var(--bg-body);
    color: var(--primary-color);
}

.security-notice {
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.1), rgba(0, 122, 255, 0.1));
    border-color: rgba(52, 199, 89, 0.3);
}

.security-notice p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Responsive for Download Page */
@media (max-width: 1024px) {
    .download-content-enhanced {
        grid-template-columns: 1fr;
    }

    .download-sidebar-enhanced {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .download-specs {
        grid-template-columns: 1fr;
    }

    .history-grid {
        grid-template-columns: 1fr;
    }

    .download-sidebar-enhanced {
        grid-template-columns: 1fr;
    }

    .download-card-enhanced {
        padding: 24px;
    }
}

/* ==================== Tutorial Page Styles ==================== */
.tutorial-section {
    padding: 60px 0;
}

.tutorial-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
}

.tutorial-sidebar-enhanced {
    position: sticky;
    top: 100px;
}

.toc-sticky {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border-color);
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

.toc-header {
    margin-bottom: 16px;
}

.toc-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toc-list-enhanced {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toc-list-enhanced li {
    margin: 0;
}

.toc-link-enhanced {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.2s;
    text-decoration: none;
}

.toc-link-enhanced:hover {
    background: var(--bg-body);
    color: var(--text-primary);
}

.toc-link-enhanced.active {
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary-color);
    font-weight: 500;
}

.toc-number {
    width: 24px;
    height: 24px;
    background: var(--bg-body);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.toc-link-enhanced.active .toc-number {
    background: var(--primary-color);
    color: white;
}

/* Tutorial Content */
.tutorial-content-enhanced {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid var(--border-color);
    overflow-wrap: break-word;
    word-wrap: break-word;
    min-width: 0;
}

.tutorial-chapter {
    margin-bottom: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--border-color);
}

.tutorial-chapter:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.chapter-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.chapter-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.chapter-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.chapter-content {
    line-height: 1.8;
    color: var(--text-primary);
}

.chapter-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 32px 0 16px;
    color: var(--text-primary);
}

.chapter-content p {
    margin-bottom: 16px;
}

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

.chapter-content li {
    margin-bottom: 8px;
}

/* Code blocks in tutorial */
.code-block {
    background: var(--bg-code);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    overflow-x: auto;
    border: 1px solid var(--border-color);
}

.code-block code {
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Tip/Warning boxes in tutorial */
.tip-box, .warning-box-tutorial {
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    display: flex;
    gap: 16px;
}

.tip-box {
    background: rgba(0, 122, 255, 0.1);
    border-left: 4px solid var(--primary-color);
}

.warning-box-tutorial {
    background: rgba(255, 149, 0, 0.1);
    border-left: 4px solid var(--warning-color);
}

.tip-box .tip-icon, .warning-box-tutorial .warning-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Responsive for Tutorial Page */
@media (max-width: 992px) {
    .tutorial-layout {
        grid-template-columns: 1fr;
    }

    .tutorial-sidebar-enhanced {
        display: none;
    }

    .toc-sticky {
        max-height: none;
    }
}

@media (max-width: 768px) {
    .tutorial-content-enhanced {
        padding: 16px;
        border-radius: 12px;
    }

    .tutorial-content-enhanced .info-box,
    .tutorial-content-enhanced .warning-box,
    .tutorial-content-enhanced .note-box-enhanced {
        overflow: hidden;
        overflow-wrap: break-word;
    }

    .chapter-header {
        flex-direction: column;
        text-align: center;
    }

    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ==================== Tools Page Additional Styles ==================== */
.features-grid-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.feature-card-enhanced {
    background: var(--bg-body);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-card-enhanced:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon-large {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.feature-card-enhanced h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.feature-card-enhanced p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* Info and Warning boxes */
.info-box, .warning-box, .highlight-box {
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}

.info-box {
    background: rgba(0, 122, 255, 0.1);
    border: 1px solid rgba(0, 122, 255, 0.2);
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.info-icon, .warning-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-content strong, .warning-content strong {
    display: block;
    margin-bottom: 4px;
}

.highlight-box {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    text-align: center;
}

.highlight-box h3 {
    margin-bottom: 16px;
}

/* ==================== Tutorial Content Enhanced Styles ==================== */
.tutorial-section-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 32px;
    border: 1px solid var(--border-color);
}

.tutorial-section-card:last-child {
    margin-bottom: 0;
}

.section-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.tutorial-section-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.section-intro {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 24px;
    line-height: 1.6;
}

.tutorial-step-card {
    background: var(--bg-body);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.tutorial-step-card:last-child {
    margin-bottom: 0;
}

.tutorial-step-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.tutorial-step-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.tutorial-step-card p:last-child {
    margin-bottom: 0;
}

.step-number-badge {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 12px;
}

/* Styled Lists */
.styled-list {
    padding-left: 24px;
    margin: 16px 0;
}

.styled-list li {
    margin-bottom: 10px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.styled-list li strong {
    color: var(--text-primary);
}

/* Inline Code */
.inline-code {
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'SF Mono', Menlo, Monaco, monospace;
    font-size: 0.9em;
}

[data-theme="dark"] .inline-code {
    background: rgba(0, 122, 255, 0.2);
}

/* Code Block Enhanced */
.code-block-enhanced {
    background: var(--bg-code);
    border-radius: 12px;
    overflow: hidden;
    margin: 20px 0;
    border: 1px solid var(--border-color);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .code-header {
    background: rgba(255, 255, 255, 0.05);
}

.code-lang {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.copy-btn {
    padding: 4px 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--primary-dark);
}

.code-block-enhanced pre {
    margin: 0;
    padding: 16px;
    background: transparent;
    border: none;
    border-radius: 0;
    overflow-x: auto;
}

.code-block-enhanced pre code {
    font-family: 'SF Mono', Menlo, Monaco, monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    background: transparent;
    color: #FF9F0A;
}

/* Code Block Wrapper and Copy Button (from code-copy.js) */
.code-block-wrapper {
    position: relative;
}

.code-copy-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
}

.code-block-wrapper:hover .code-copy-btn {
    opacity: 1;
}

.code-copy-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.code-copy-btn.copied {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.code-copy-btn svg {
    width: 16px;
    height: 16px;
}

/* For code-block-enhanced with existing copy button, hide auto-generated one */
.code-block-enhanced .code-copy-btn {
    display: none;
}

/* Note Boxes Enhanced */
.note-box-enhanced {
    display: flex;
    gap: 16px;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    align-items: flex-start;
}

.note-box-enhanced.info {
    background: rgba(0, 122, 255, 0.1);
    border-left: 4px solid var(--primary-color);
}

.note-box-enhanced.warning {
    background: rgba(255, 149, 0, 0.1);
    border-left: 4px solid var(--warning-color);
}

.note-box-enhanced.success {
    background: rgba(52, 199, 89, 0.1);
    border-left: 4px solid var(--success-color);
}

.note-box-enhanced.danger {
    background: rgba(255, 59, 48, 0.1);
    border-left: 4px solid var(--danger-color);
}

.note-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.note-content {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.note-content strong {
    display: block;
    margin-bottom: 4px;
}

/* Info Box in Tutorial */
.tutorial-step-card .info-box {
    background: rgba(0, 122, 255, 0.08);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 16px;
    margin-bottom: 0;
    border: none;
}

.tutorial-step-card .info-box .info-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.tutorial-step-card .info-box span {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Reading Progress Card */
.reading-progress-card {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.progress-bar-bg {
    height: 6px;
    background: var(--bg-body);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

/* Responsive for Tutorial Content */
@media (max-width: 768px) {
    .tutorial-section-card {
        padding: 16px;
        overflow: hidden;
        overflow-wrap: break-word;
    }

    .tutorial-step-card {
        padding: 14px;
        overflow: hidden;
        overflow-wrap: break-word;
    }

    .tutorial-step-card .info-box {
        flex-direction: column;
        gap: 8px;
    }

    .section-icon {
        font-size: 2rem;
    }

    .tutorial-section-card h2 {
        font-size: 1.3rem;
    }
}

/* ==================== Tutorial Visual Steps ==================== */
.steps-visual {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.visual-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-body);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.visual-step-num {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.visual-step-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

.visual-step-arrow {
    color: var(--text-secondary);
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Two Column List */
.two-column-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.column-item {
    display: flex;
    gap: 14px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    align-items: flex-start;
}

.column-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.column-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: var(--text-primary);
}

.column-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Mode Cards Enhanced */
.mode-cards-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-top: 24px;
    align-items: stretch;
}

.mode-card-enhanced {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    border: 1px solid var(--border-color);
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 240px;
    min-width: 0;
}

.mode-card-enhanced:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.mode-card-enhanced.recommended {
    border: 2px solid var(--primary-color);
    background: linear-gradient(180deg, rgba(0, 122, 255, 0.08) 0%, var(--bg-card) 100%);
}

.recommended-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.mode-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    line-height: 1;
}

.mode-card-enhanced h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.mode-card-enhanced p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

.mode-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.mode-badge.primary {
    background: rgba(0, 122, 255, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Mode Cards followed by Step Card spacing */
.mode-cards-enhanced + .tutorial-step-card {
    margin-top: 32px;
}

/* Responsive for Visual Steps */
@media (max-width: 768px) {
    .steps-visual {
        flex-direction: column;
        align-items: stretch;
    }

    .visual-step-arrow {
        transform: rotate(90deg);
        align-self: center;
    }

    .two-column-list {
        grid-template-columns: 1fr;
    }

    .mode-cards-enhanced {
        grid-template-columns: 1fr;
    }
}

/* ==================== Tutorial Additional Styles ==================== */

/* Feature Highlight */
.feature-highlight {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.08), rgba(88, 86, 214, 0.08));
    border-radius: 12px;
    margin-top: 16px;
    border: 1px solid rgba(0, 122, 255, 0.15);
}

.highlight-icon {
    font-size: 1.5rem;
}

.feature-highlight p {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* Rules Grid */
.rules-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.rule-type-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.rule-type-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.rule-type-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
}

.rule-type-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.rule-type-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Advanced Features Grid */
.advanced-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.advanced-feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
}

.advanced-feature-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.advanced-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: block;
}

.advanced-feature-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.advanced-feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.advanced-feature-card .styled-list {
    margin-top: 12px;
}

.advanced-feature-card .styled-list li {
    font-size: 0.85rem;
}

/* FAQ Enhanced Styles */
.faq-enhanced {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.faq-item-enhanced {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item-enhanced:hover {
    border-color: var(--primary-color);
}

.faq-question {
    display: flex;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    gap: 16px;
    transition: background 0.2s ease;
}

.faq-question:hover {
    background: rgba(0, 122, 255, 0.05);
}

.faq-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 8px;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.faq-question h3 {
    flex: 1;
    font-weight: 600;
    font-size: 1.05rem;
    margin: 0;
    line-height: 1.4;
    color: var(--text-primary);
}

.faq-question span:nth-child(2) {
    flex: 1;
    font-weight: 600;
    font-size: 1rem;
}

.faq-toggle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

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

.faq-answer-enhanced {
    display: none;
    padding: 0 20px 20px;
    gap: 12px;
}

.faq-item-enhanced.active .faq-answer-enhanced {
    display: flex;
}

.answer-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(52, 199, 89, 0.15);
    border-radius: 8px;
    color: var(--success-color);
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.answer-content {
    flex: 1;
}

.answer-content p {
    margin: 0;
    line-height: 1.7;
    color: var(--text-secondary);
}

.answer-content ol {
    margin: 12px 0 0 0;
    padding-left: 20px;
}

.answer-content li {
    margin-bottom: 8px;
    color: var(--text-secondary);
    line-height: 1.6;
}


/* Info Box */
.info-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(0, 122, 255, 0.08);
    border-radius: 12px;
    margin-top: 16px;
    border: 1px solid rgba(0, 122, 255, 0.15);
}

.info-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-box p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Section Intro */
.section-intro {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

/* Tutorial Sidebar Enhanced (grid child, width set by grid-template-columns) */

.toc-sticky {
    position: sticky;
    top: 100px;
}

.toc-header {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    padding-left: 8px;
}

.toc-list-enhanced {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toc-link-enhanced {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.toc-link-enhanced:hover {
    background: rgba(0, 122, 255, 0.08);
    color: var(--primary-color);
}

.toc-link-enhanced.active {
    background: rgba(0, 122, 255, 0.12);
    color: var(--primary-color);
    font-weight: 500;
}

.toc-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.toc-link-enhanced:hover .toc-number,
.toc-link-enhanced.active .toc-number {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Tutorial Right Sidebar */
.tutorial-right-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-ad {
    position: sticky;
    top: 100px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    text-align: center;
}

.sidebar-ad p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive for Tutorial Additional Styles */
@media (max-width: 1200px) {
    .advanced-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .rules-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .advanced-features-grid {
        grid-template-columns: 1fr;
    }

    .faq-question {
        padding: 16px;
    }

    .faq-answer-enhanced {
        padding: 0 16px 16px;
    }
}

/* ==================== Tools Page Styles ==================== */

/* Tools Input Elements */
.tools-textarea {
    width: 100%;
    min-height: 200px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tools-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.tools-textarea::placeholder {
    color: var(--text-light);
}

.tools-select {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: border-color 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2386868B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.tools-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.tools-input {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tools-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.tools-input::placeholder {
    color: var(--text-light);
}

/* Info/Warning Content */
.info-content,
.warning-content {
    flex: 1;
}

.info-content p,
.warning-content p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Warning Box Specific */
.warning-box {
    background: rgba(255, 149, 0, 0.08);
    border-color: rgba(255, 149, 0, 0.3);
}

.warning-box .warning-icon {
    color: var(--warning-color);
}

/* Button Small Variant */
.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* ==================== Article Page Styles ==================== */

/* Article Page Layout */
.article-page {
    padding: 40px 0 80px;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    align-items: start;
}

@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
    }
}

.article-main {
    min-width: 0;
}

/* Breadcrumb Navigation */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-secondary);
    transition: color 0.2s;
}

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

.breadcrumb .separator {
    color: var(--text-light);
}

.breadcrumb .current {
    color: var(--text-primary);
    font-weight: 500;
}

/* Article Header */
.article-header {
    margin-bottom: 40px;
}

.article-category {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 16px;
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary-color);
}

.article-category.guide {
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary-color);
}

.article-category.tips {
    background: rgba(255, 149, 0, 0.1);
    color: var(--warning-color);
}

.article-category.troubleshooting {
    background: rgba(255, 59, 48, 0.1);
    color: var(--danger-color);
}

.article-category.comparison {
    background: rgba(88, 86, 214, 0.1);
    color: var(--secondary-color);
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

@media (max-width: 768px) {
    .article-title {
        font-size: 1.8rem;
    }
}

.article-meta {
    margin-bottom: 24px;
}

.article-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-icon {
    font-size: 1rem;
}

/* Article Share Buttons */
.article-share {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.share-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 600;
}

[data-theme="dark"] .share-btn {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.share-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.share-btn.twitter:hover {
    background: #1DA1F2;
    border-color: #1DA1F2;
    color: white;
}

.share-btn.facebook:hover {
    background: #4267B2;
    border-color: #4267B2;
    color: white;
}

.share-btn.linkedin:hover {
    background: #0077B5;
    border-color: #0077B5;
    color: white;
}

/* Table of Contents */
.table-of-contents {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 40px;
}

.toc-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.toc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toc-item {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.toc-item:hover {
    background: var(--bg-sidebar);
    color: var(--text-primary);
}

.toc-item.active {
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

/* Article Content */
.article-content {
    line-height: 1.8;
    color: var(--text-primary);
}

.article-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 48px 0 24px;
    color: var(--text-primary);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.article-content h2:first-child {
    margin-top: 0;
}

.article-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 32px 0 16px;
    color: var(--text-primary);
}

.article-content p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.article-content ul,
.article-content ol {
    margin: 20px 0;
    padding-left: 28px;
}

.article-content li {
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.article-content code {
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'SF Mono', Menlo, Monaco, monospace;
    font-size: 0.9em;
}

.article-content pre {
    background: var(--bg-code);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    overflow-x: auto;
    margin: 24px 0;
    font-family: 'SF Mono', Menlo, Monaco, monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.article-content pre code {
    background: transparent;
    padding: 0;
    color: var(--text-primary);
}

/* Article Highlight Box */
.article-content .highlight-box {
    text-align: left;
}

.article-content .highlight-box h3 {
    margin-top: 0;
    margin-bottom: 16px;
}

.article-content .highlight-box pre {
    margin: 0;
    border: none;
    border-radius: 8px;
}

/* Performance Stats in Article */
.performance-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Article Feedback */
.article-feedback {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    margin: 48px 0;
}

.feedback-question {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.feedback-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.feedback-btn {
    padding: 12px 24px;
    border-radius: 99px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.feedback-btn:hover {
    border-color: var(--primary-color);
}

.feedback-btn.helpful:hover {
    background: rgba(52, 199, 89, 0.1);
    border-color: var(--success-color);
    color: var(--success-color);
}

.feedback-btn.not-helpful:hover {
    background: rgba(255, 59, 48, 0.1);
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.feedback-thankyou {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--success-color);
    font-weight: 500;
}

.feedback-thankyou .check-icon {
    font-size: 1.2rem;
}

/* Article Tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 32px 0;
}

.tag-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.article-tags .tag {
    padding: 6px 14px;
    background: var(--bg-sidebar);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.article-tags .tag:hover {
    background: var(--primary-color);
    color: white;
}

/* Related Articles */
.related-articles {
    margin-top: 64px;
    padding-top: 48px;
    border-top: 1px solid var(--border-color);
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

.related-articles .section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text-primary);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.related-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.3s;
}

.related-card-link:hover {
    text-decoration: none;
}

.related-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.related-card-link:hover .related-card {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.related-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: var(--bg-sidebar);
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-image .blog-placeholder-image {
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.related-image .blog-placeholder-image.small {
    font-size: 2.5rem;
}

.related-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.related-category {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary-color);
}

.related-category.guide {
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary-color);
}

.related-category.tips {
    background: rgba(255, 149, 0, 0.1);
    color: var(--warning-color);
}

.related-category.troubleshooting {
    background: rgba(255, 59, 48, 0.1);
    color: #ff3b30;
}

.related-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    display: flex;
    gap: 6px;
    margin-top: auto;
}

/* Related Cards Responsive */
@media (max-width: 480px) {
    .related-card {
        flex-direction: column;
    }

    .related-image {
        width: 100%;
        min-width: 100%;
        padding: 24px;
    }
}

/* Featured Post Title and Tags for Blog Page */
.featured-post-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    line-height: 1.3;
}

.featured-post-excerpt {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.featured-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.featured-post-tags .tag {
    padding: 4px 12px;
    background: var(--bg-sidebar);
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Article Sidebar (uses blog-sidebar class) */
.article-page .blog-sidebar {
    position: sticky;
    top: 100px;
}

@media (max-width: 1024px) {
    .article-page .blog-sidebar {
        position: static;
    }
}

/* CTA Widget in Article Page */
.article-page .cta-widget {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
    border: none;
}

.cta-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.cta-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: white;
}

.cta-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* ==========================================
   Mobile Touch Optimizations for SEO
   ========================================== */
@media (max-width: 768px) {
    /* Larger touch targets for mobile - minimum 44px per Google guidelines */
    .btn {
        min-height: 48px;
        padding: 14px 28px;
    }

    .btn-small {
        min-height: 44px;
        padding: 12px 20px;
    }

    /* Better tap targets for navigation */
    .nav-menu a {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 12px 16px;
    }

    /* Improve touch on cards */
    .feature-card, .blog-card, .tool-card {
        -webkit-tap-highlight-color: transparent;
    }

    /* Prevent text selection on buttons */
    .btn {
        -webkit-user-select: none;
        user-select: none;
    }

    /* Smoother scroll */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    /* Improve readability on small screens */
    body {
        font-size: 16px;
        -webkit-text-size-adjust: 100%;
    }

    /* Better link spacing for touch */
    .article-body a, .tutorial-content a {
        padding: 4px 0;
    }
}
