/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f8f7fa;
    color: #333;
    line-height: 1.6;
}

/* 头部和Logo样式 */
.header {
    text-align: center;
    margin: 40px 0 60px;
}

.logo {
    display: inline-block;
    margin-bottom: 30px;
}

.logo img {
    max-height: 90px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

/* 搜索框样式 */
.neirong-container {
    margin: 0 0 60px;
    text-align: center;
}

.neirong-box {
    display: inline-flex;
    align-items: center;
    width: 100%;
    max-width: 700px;
    position: relative;
}

.neirong-box input {
    flex: 1;
    padding: 15px 20px;
    font-size: 18px;
    border: 2px solid #fee0da;
    border-radius: 30px 0 0 30px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.neirong-box input:focus {
    border-color: #fd775e;
    box-shadow: 0 2px 8px rgba(253, 119, 94, 0.2);
}

.neirong-box button {
    padding: 15px 25px;
    font-size: 18px;
    background-color: #fd775e;
    color: white;
    border: none;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.neirong-box button:hover {
    background-color: #fc5e40;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(252, 94, 64, 0.25);
}

/* 搜索联想下拉框样式 - 新增内容 */
.neirong-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #fee0da;
    border-top: none;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 4px 12px rgba(253, 119, 94, 0.15);
    z-index: 1000;
    display: none;
    max-height: 320px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 16px;
}

.suggestion-item:hover,
.suggestion-item.active {
    background-color: #fff5f2;
}

.suggestion-highlight {
    color: #fd775e;
    font-weight: 600;
}

/* 分类榜单样式 - 四列布局（关键调整：确保列宽不越界） */
.categories-container {
    margin-bottom: 60px;
    display: grid;
    /* 新增minmax：每列最小180px，超出部分平均分，不抢宽度 */
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 20px;
}

.category-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: 100%;
    /* 新增：卡片完全占满父列宽度，不缩不超 */
    width: 100%;
}

.category-title {
    font-size: 18px;
    color: #fd775e;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #fee0da;
    display: flex;
    align-items: center;
}

.category-title::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #fd775e;
    border-radius: 50%;
    margin-right: 10px;
}

.category-list {
    list-style: none;
}

.category-item {
    padding: 8px 0;
    border-bottom: 1px dashed #f0f0f0;
    transition: all 0.2s ease;
}

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

.category-item:hover {
    background-color: #fff5f2;
    padding-left: 5px;
}

/* 关键修改：给列表项链接加“单行溢出隐藏”，确保只显示一行 */
.category-item a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 14px;
    display: block;
    white-space: nowrap;    /* 禁止文字换行 */
    overflow: hidden;       /* 超出容器部分隐藏 */
    text-overflow: ellipsis;/* 超出部分显示省略号（...） */
}

.category-item a:hover {
    color: #fd775e;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .categories-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header {
        margin: 20px 0 30px;
    }
    
    .logo img {
        max-height: 60px;
    }
    
    .neirong-container {
        margin: 0 0 40px;
    }
    
    .neirong-box {
        flex-direction: column;
        max-width: 100%;
    }
    
    .neirong-box input {
        border-radius: 30px;
        width: 100%;
        margin-bottom: 10px;
        font-size: 16px;
        padding: 12px 20px;
    }
    
    .neirong-box button {
        border-radius: 30px;
        width: 100%;
        font-size: 16px;
        padding: 12px 25px;
    }
    
    .categories-container {
        grid-template-columns: 1fr;
    }
    
    /* 移动端搜索联想框样式 */
    .neirong-suggestions {
        border-radius: 0 0 30px 30px;
        border-width: 1px;
    }
    
    .suggestion-item {
        padding: 10px 15px;
        font-size: 15px;
    }
}
        /* 新增：之前你喜欢的“分类+网站卡片”样式（主色调和原页面呼应） */
        /* 1. 卡片分类标题样式 */
        .website-category-title {
            color: #e0684f; /* 和原页面风格协调的颜色 */
            font-size: 20px;
            margin: 40px 0 15px; /* 与上方“热门XX”分类保持间距 */
            padding-left: 10px;
            border-left: 4px solid #fd775e; /* 突出分类，呼应原卡片hover色 */
        }
        /* 2. 网站卡片容器（自适应网格） */
        .website-container {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }
        /* 3. 网站卡片样式（hover效果保留） */
        .website-card {
            background: white;
            border-radius: 8px;
            padding: 20px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            transition: all 0.3s ease;
        }
        .website-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 5px 15px rgba(253, 119, 94, 0.2); /* hover阴影增强 */
        }
        .website-card h3 {
            font-size: 18px;
            margin-bottom: 10px;
        }
        .website-card h3 a {
            color: #333;
            text-decoration: none;
        }
        .website-card h3 a:hover {
            color: #fd775e; /* 链接hover变色，呼应主色调 */
        }
        .website-card .intro {
            color: #666;
            font-size: 14px;
            line-height: 1.5;
            margin-bottom: 15px;
        }
        .website-card .url {
            font-size: 13px;
            color: #fd775e;
            word-break: break-all; /* 长链接自动换行 */
        }
        /* 响应式适配（和原页面小屏幕逻辑统一） */
        @media (max-width: 768px) {
            .website-container {
                grid-template-columns: 1fr; /* 小屏幕卡片单列显示 */
            }
            .website-category-title {
                font-size: 18px;
            }
        }