/* Common styles shared between articles and docs */

/* 滚动条样式 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #F1F5F9; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }
/* Firefox 滚动条样式 */
* {
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 #F1F5F9;
}

/* Nav link */
.nav-link {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}
.nav-link:hover { color: #1E293B; }
.nav-link.active {
    color: #7C3AED;
    border-bottom-color: #7C3AED;
    font-weight: 600;
}


/* Mobile menu */
.mobile-menu { display: none; }
.mobile-menu.open { display: flex; }
.mobile-menu a { text-align: center; }

/* Sidebar - 桌面端基础样式 */
.sidebar {
    width: 240px;
    background: white;
    border-right: 1px solid #E2E8F0;
    height: calc(100vh - 56px);
    position: sticky;
    top: 56px;
    overflow-y: auto;
    flex-shrink: 0;
}
.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid #E2E8F0;
}
.sidebar-title {
    font-size: 12px;
    font-weight: 600;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.sidebar-nav {
    padding: 8px 0;
}
.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 14px;
    color: #475569;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}
.sidebar-item:hover {
    background: #EFF6FF;
    color: #2563EB;
}
.sidebar-item.active {
    background: #EFF6FF;
    border-left-color: #2563EB;
    color: #2563EB;
    font-weight: 600;
}
.sidebar-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Sidebar overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    top: 56px;
    background: rgba(0, 0, 0, 0.4);
    z-index: 40;
    transition: opacity 0.3s;
}
.sidebar-overlay.active {
    display: block;
}

/* Mobile sidebar toggle */
.sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 40px !important;
    height: 40px !important;
    background: #2563EB;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    z-index: 100;
    cursor: pointer;
    padding: 0;
    border: none;
}

/* CTA按钮 - 统一风格 */
.btn-cta-glow {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    background-size: 200% 200%;
    color: white;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-cta-glow:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    background-position: 100% 0;
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -260px;
        top: 56px;
        height: calc(100vh - 56px);
        width: 240px;
        z-index: 50;
        transition: left 0.3s;
        background: white;
        border-right: 1px solid #E2E8F0;
        overflow-y: auto;
        flex-shrink: 0;
    }
    .sidebar.open {
        left: 0;
    }
    .sidebar-toggle {
        display: flex;
    }
    .sidebar-toggle.hidden {
        display: none !important;
    }
    .sidebar-overlay.active {
        display: block;
    }
    .main-content {
        padding: 16px;
    }
}

@media (min-width: 1024px) {
    .sidebar-toggle {
        display: none !important;
    }
    .sidebar-overlay {
        display: none !important;
    }
}

@media (max-width: 640px) {
    .main-content {
        padding: 12px;
    }
}

/* Footer Tag Cloud */
.footer-tag {
    display: inline-block;
    padding: 2px 8px;
    margin: 1px 3px;
    background-color: #1f2937;
    border-radius: 8px;
    color: #9ca3af;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.25rem;
}
.footer-tag:hover {
    background-color: #374151;
}
