﻿
/* ========== 历史记录卡片 - 与八字算命/宝宝起名/公司起名一致 ========== */
.names-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.names-section h3 {
    color: #c9302c;
    text-align: center;
    margin-bottom: 25px;
    font-size: 22px;
}

/* 卡片网格 - 3列布局 */
.names-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

/* 单个卡片 - 横向flex布局 */
.name-card {
    background: #fff;
    border-radius: 12px;
    padding: 15px 18px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border-left: 4px solid #ddd;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.name-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

/* 左侧类型标签 */
.card-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 60px;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
}

/* 中间信息区域 */
.card-middle {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.fullname {
    font-size: 17px;
    font-weight: bold;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wuxing {
    font-size: 12px;
    color: #888;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.wuxing span {
    display: inline-block;
    padding: 2px 8px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 11px;
    color: #666;
}

/* 卡片内信息行 */
.name-card .info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

/* 性别标签 */
.gender-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
}

.gender-boy {
    background: #e3f2fd;
    color: #1976d2;
}

.gender-girl {
    background: #fce4ec;
    color: #c2185b;
}

.gender-tag.company-tag {
    background: #fff3e0 !important;
    color: #e65100 !important;
}

/* 辈分标签 */
.history-beifen {
    background: #fff3cd;
    color: #856404;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 11px;
}

/* 右侧按钮 */
.card-right {
    min-width: 80px;
}

.detail-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 16px;
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.detail-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s;
}

.pagination a {
    background: #fff;
    color: #c9302c;
    border: 1px solid #c9302c;
}

.pagination a:hover {
    background: #c9302c;
    color: #fff;
}

.pagination .current {
    background: #c9302c;
    color: #fff;
    border: 1px solid #c9302c;
}

.pagination .disabled {
    background: #f5f5f5;
    color: #999;
    border: 1px solid #ddd;
    cursor: not-allowed;
}

.pagination .info {
    background: transparent;
    border: none;
    color: #666;
    margin: 0 10px;
}

/* 响应式 */
@media (max-width: 992px) {
    .names-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .names-grid {
        grid-template-columns: 1fr;
    }
    .name-card {
        padding: 12px 15px;
        gap: 10px;
    }
    .fullname {
        font-size: 15px;
    }
    .detail-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .name-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .card-right {
        width: 100%;
    }
    .detail-btn {
        width: 100%;
    }
}