/* 成语大全列表/首页/搜索页样式 */

.dict-hero {
    text-align: center;
    padding: 30px 0 20px;
}

.dict-hero h1 {
    font-size: 32px;
    color: #2d3748;
    margin-bottom: 10px;
}

.dict-hero h1 i {
    color: #667eea;
    margin-right: 8px;
}

.dict-hero p {
    color: #718096;
    font-size: 16px;
    margin-bottom: 26px;
}

.search-box {
    display: flex;
    gap: 0;
    max-width: 640px;
    margin: 0 auto;
    border: 2px solid #667eea;
    border-radius: 50px;
    overflow: hidden;
    background: white;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    padding: 13px 24px;
    font-size: 16px;
    color: #2d3748;
}

.search-box button {
    border: none;
    background: #667eea;
    color: white;
    padding: 0 32px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-box button:hover {
    background: #5a67d8;
}

.hot-chars {
    margin-top: 16px;
    font-size: 14px;
    color: #a0aec0;
}

.hot-chars .hot-label {
    color: #dd6b20;
}

.hot-chars a {
    display: inline-block;
    margin: 0 4px;
    color: #667eea;
    text-decoration: none;
    font-size: 15px;
}

.hot-chars a:hover {
    text-decoration: underline;
}

section h2 {
    font-size: 20px;
    color: #2d3748;
    margin: 32px 0 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #edf2f7;
}

section h2 i {
    color: #667eea;
    margin-right: 8px;
}

.count-tip {
    font-size: 13px;
    color: #a0aec0;
    font-weight: normal;
    margin-left: 8px;
}

/* 分类树 */
.cate-tree {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
}

.cate-root {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
}

.cate-root-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 700;
    color: #2d3748;
    text-decoration: none;
    margin-bottom: 10px;
}

.cate-root-name:hover {
    color: #667eea;
}

.cate-count {
    background: #ebf4ff;
    color: #667eea;
    border-radius: 50px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: normal;
}

.cate-children {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cate-children a {
    background: #f7fafc;
    border-radius: 6px;
    padding: 3px 12px;
    color: #4a5568;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.15s;
}

.cate-children a:hover {
    background: #667eea;
    color: white;
}

/* 成语卡片网格 */
.cy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.cy-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px 10px;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.cy-card:hover {
    transform: translateY(-3px);
    border-color: #667eea;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
}

.cy-word {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
    letter-spacing: 2px;
}

.cy-card:hover .cy-word {
    color: #667eea;
}

.cy-pinyin {
    font-size: 12px;
    color: #a0aec0;
}

/* 空提示 */
.empty-tip {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 20px;
    color: #a0aec0;
}

.empty-tip i {
    font-size: 40px;
    margin-bottom: 12px;
}

.empty-tip p {
    margin: 0;
}

/* 分页 */
.pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin-top: 30px;
}

.pager a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    padding: 8px 20px;
    color: #4a5568;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.15s;
}

.pager a:hover {
    border-color: #667eea;
    color: #667eea;
}

.pager-info {
    color: #a0aec0;
    font-size: 14px;
}

@media (max-width: 768px) {
    .dict-hero h1 {
        font-size: 24px;
    }

    .cate-tree {
        grid-template-columns: 1fr;
    }

    .cy-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .search-box button {
        padding: 0 20px;
    }
}
