       :root {
            --primary-color: #2c3e50;
            --secondary-color: #3498db;
            --gap: 20px;
            --nav-width: 15%;
            --content-width: 85%;
        }

        /* 基础样式 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', system-ui, sans-serif;
        }

        /* 主容器 */
        .main-container {
            display: flex;
            min-height: 100vh;
        }

/* 左侧导航样式 */
.nav-sidebar {
    width: var(--nav-width);
    background: #f8f9fa;
    padding: 15px 0;
}

.nav-menu {
    list-style: none;
}

.nav-title {
    /* 基础样式 */
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    padding: 20px 24px;
    margin-bottom: 15px;
    position: relative;
    
     padding-left: 40px; 

    /* 方案1：简约边框 
    border-left: 4px solid var(--secondary-color);
    background: linear-gradient(to right, #f8f9fa, transparent);*/

    /* 方案2：图标装饰 
     padding-left: 40px; 
     background: url(icon-category.svg) left center / 24px no-repeat; */

    /* 方案3：下划线效果 */
    /* border-bottom: 2px solid #dee2e6; */
}




.nav-item {
    margin: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-link {
    display: block;
    padding: 12px 24px;
    color: #495057;
    font-size: 16px;
    text-decoration: none;
    transition: 
        font-weight 0.2s ease,
        color 0.3s ease,
        letter-spacing 0.2s ease;
}

/* 下划线动画 */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: all 0.3s ease;
}
.nav-item:hover .nav-link::after {
    left: 0;
    width: 100%;
}
/* 下划线动画 */



.nav-item:hover {
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateX(6px);
    border: 1px solid #EFEEEE;
}


/*左侧动画效果
.nav-item::before {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--secondary-color);
    transition: left 0.3s ease;
}

.nav-item:hover::before {
    left: 0;
}
/*左侧动画效果*/



.nav-item:hover .nav-link {
    color: #2c3e50;
    font-weight: 600;
    letter-spacing: 0.3px;
}


/* 新增show类样式 */
.nav-item.show {
    background: #f8f9fa;  /* 浅灰色背景 */
    border: 1px solid #C7C4C4;
    border-left: 3px solid #3498db;  /* 左侧蓝色边框 */
    transform: translateX(5px);  /* 向右微移 */
}

.nav-item.show .nav-link {
    color: #2c3e50;  /* 文字颜色加深 */
    font-weight: 600;  /* 加粗字体 */
}

/* 保持悬停效果 */
.nav-item.show:hover {
    background: #f1f3f5;  /* 悬停时背景稍深 */
    transform: translateX(8px);  /* 悬停时位移更大 */
}
/* 新增show类样式 */


/*
.search-box {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.search-form {
    position: relative;
    display: flex;
    gap: 8px;
}

.search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.search-btn {
    background: #3498db;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}
*/
/* 新增搜索框样式 */
.search-box {
    padding: 15px 20px;
    margin-bottom: 10px;
    width: 100%; /* 确保容器宽度自适应 */
    box-sizing: border-box; /* 包含内边距 */
}

.search-form {
    display: flex;
    gap: 8px;
    width: 100%; /* 表单宽度自适应 */
}

/* 输入框自适应规则 */
.search-input {
    flex: 1 1 auto; /* 关键属性 */
    min-width: 80px; /* 最小宽度限制 */
    max-width: 100%; /* 防止溢出 */
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* 按钮自适应 */
.search-btn {
    flex: 0 0 auto; /* 禁止缩放 */
    padding: 8px 12px;
    min-width: 60px; /* 按钮最小宽度 */
    
    background: #3498db;
    border: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: #2980b9;
}

.search-btn svg {
    vertical-align: middle;
    color: white;
}
/* 新增搜索框样式 */


        /* 右侧内容区 */
        .content-area {
            width: var(--content-width);
            padding: 30px;
        }

        /* 分类区块 */
        .category-block {
            margin-bottom: 40px;
        }

        .category-title {
            font-size: 1.4rem;
            color: var(--primary-color);
            margin-bottom: 25px;
            padding-bottom: 10px;
            border-bottom: 2px solid var(--secondary-color);
        }

        /* 网站网格 */
        .website-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
            gap: var(--gap);
        }

        /* 网站卡片 */
        .website-card {
            display: flex;
            align-items: center;
            padding: 15px;
            background: #fff;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            transition: transform 0.2s;
            text-decoration: none;
            color: var(--primary-color);
            
            /*下划线动画*/
            position: relative;
            overflow: hidden;
            
        }

        .website-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }

/* 下划线动画 */
.website-card::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

.website-card:hover::after {
    width: 80%; /* 下划线展开宽度 */
}
/* 下划线动画 */


/* 可选：文字悬浮动画 */
.website-card span {
    position: relative;
    transition: transform 0.3s ease;
}

.website-card:hover span {
    transform: translateX(5px);
}
/* 可选：文字悬浮动画 */




        .website-logo {
            width: 40px;
            height: 40px;
            margin-right: 15px;
            object-fit: contain;
        }








        /* 响应式设计 */


        @media (max-width: 1500px) {
                .search-box {
                    margin: 0 5px;
                    width: 100%; /* 确保容器宽度自适应 */
                    box-sizing: border-box; /* 包含内边距 */
                }
                .search-form {
                    flex-wrap: wrap; /* 允许换行 */
                }

                .search-input {
                    flex: 1 0 100%; /* 移动端独占一行 */
                    max-width: 100%;
                    order: 1; /* 输入框在下 */
                }

                .search-btn {
                    flex: 1 0 100%; /* 按钮独占一行 */
                    order: 2;
                    text-align: center;
                }

        }


        @media (max-width: 768px) {
            .main-container {
                flex-direction: column; /* 垂直排列 */
            }
        /* 左侧分类栏 */
    .nav-sidebar {
        width: 100% !important; /* 强制全宽 */
        order: 1; /* 调整显示顺序 */
        margin-bottom: 20px;
    }

    /* 分类项横向排列 */
    .nav-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;            /* 间隙控制 */
        padding: 8px;
        list-style: none;     /* 移除默认列表样式 */
        margin: 0;
        margin-left: 20px;
    }

    /* 单个分类项样式 */
    .nav-item:not(.search-box) {
        display: inline-block; /* 宽度自适应内容 */
        padding: 5px 10px;     /* 上下5px 左右10px */
        margin: 4px;          /* 项间距 */
        border: 1px solid #e0e0e0; /* 浅灰边框 */
        border-radius: 4px;   /* 轻微圆角 */
        font-size: 14px;      /* 基准字号 */
        line-height: 1.5;     /* 行高控制 */
        color: #333;          /* 文字颜色 */
        background: #fff;     /* 白色背景 */
        text-decoration: none;
        white-space: nowrap;  /* 禁止文字换行 */
        transition: all 0.2s ease;
    }
       
    /* 悬停/激活状态 */
    .nav-item:not(.search-box):hover,
    .nav-item.active {
        border-color: #3498db; /* 品牌色边框 */
        color: #3498db;
        box-shadow: 0 2px 6px rgba(52, 152, 219, 0.15);
    }     
            
            
            
    /* 右侧内容区 */
    .content-area {
        width: 100% !important; /* 强制全宽 */
        order: 2;
        padding: 0 10px;
    }

    /* 搜索框保持独占一行 */
    .nav-item.search-box {
        width: 100%;
        margin-bottom: 15px;
    }
  
            
            
            .website-card::after {
                height: 1.5px;
            }
    .search-box {
        /*padding: 10px 15px;*/
        padding: 10px 15px 10px 0px; /* 上 右 下 左 */
    }
    .search-form {
        flex-direction: column;
    }
    .search-btn {
        width: 100%;
        padding: 10px;
    }
        }

        

        @media (max-width: 360px) {
            .main-container {
                flex-direction: column; /* 垂直排列 */
            }
               .nav-item:not(.search-box) {
        padding: 6px 20px; /* 缩小间距 */
        border-radius: 20px;
    }
    .nav-link {
        font-size: 14px;
    }
            
            
            .website-grid {
                grid-template-columns: 1fr;
            }
            .website-card {
                flex-direction: column;
                text-align: center;
            }
            .website-logo {
                margin-right: 0;
                margin-bottom: 10px;
            } 
            
            
            
            .website-card::after {
                height: 1.5px;
            }
            
            
    .search-box {
        padding: 10px;
    }
    
    .search-input {
        font-size: 16px; /* 移动端增大字号 */
    }

    .search-form {
        flex-direction: column;
    }
    .search-btn {
        width: 100%;
        padding: 10px;
    }
        }