/* 歇后语大全 列表/首页/搜索页样式 */

.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;
}

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;
}

/* 分类 chips */
.class-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.class-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    padding: 7px 18px;
    color: #4a5568;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.15s;
}

.class-chip span {
    background: #edf2f7;
    color: #718096;
    border-radius: 50px;
    padding: 0 8px;
    font-size: 12px;
}

.class-chip:hover {
    border-color: #667eea;
    color: #667eea;
}

.class-chip.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.class-chip.active span {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

/* 歇后语卡片网格 */
.xy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.xy-card {
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.xy-card:hover {
    transform: translateY(-3px);
    border-color: #667eea;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
}

.xy-meta {
    margin-bottom: 8px;
}

.xy-class {
    background: #ebf4ff;
    color: #667eea;
    border-radius: 50px;
    padding: 2px 12px;
    font-size: 12px;
}

.xy-ask {
    font-size: 17px;
    font-weight: 600;
    color: #2d3748;
    line-height: 1.6;
    margin: 0 0 12px;
    flex: 1;
}

.xy-card:hover .xy-ask {
    color: #667eea;
}

.xy-link {
    font-size: 13px;
    color: #a0aec0;
}

.xy-card:hover .xy-link {
    color: #667eea;
}

/* 随机推荐 */
.random-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 10px;
}

.random-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    color: #4a5568;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.15s;
}

.random-item:hover {
    border-color: #667eea;
    color: #667eea;
}

.random-arrow {
    color: #a0aec0;
    font-size: 14px;
}

.random-item:hover .random-arrow {
    color: #667eea;
}

/* 搜索结果条目 */
.search-result-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-result-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 13px 18px;
    text-decoration: none;
    transition: border-color 0.15s;
}

.search-result-item:hover {
    border-color: #667eea;
}

.sr-ask {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}

.sr-divider {
    color: #a0aec0;
}

.sr-answer {
    font-size: 16px;
    color: #667eea;
    font-weight: 600;
}

.sr-class {
    margin-left: auto;
    background: #f7fafc;
    color: #718096;
    border-radius: 50px;
    padding: 2px 12px;
    font-size: 12px;
}

/* 空提示 */
.empty-tip {
    text-align: center;
    padding: 50px 20px;
    color: #a0aec0;
    background: white;
    border: 1px dashed #e2e8f0;
    border-radius: 12px;
}

.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;
    }

    .xy-grid,
    .random-list {
        grid-template-columns: 1fr;
    }

    .search-box button {
        padding: 0 20px;
    }

    .sr-class {
        margin-left: 0;
    }
}
