﻿* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background: #f5f0e8;
    min-height: 100vh;
    color: #5d4e37;
    line-height: 1.8;
}

/* 顶部横幅 */
.top-banner {
    background: linear-gradient(135deg, #8b5a2b 0%, #a67c52 50%, #8b5a2b 100%);
    padding: 60px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid #c9a961;
}
.top-banner h1 {
    font-size: 42px;
    color: #fff8e7;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: 4px;
}
.top-banner .subtitle {
    color: rgba(255,248,231,0.85);
    font-size: 18px;
    letter-spacing: 2px;
}

/* 主容器 */
.main-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 表单卡片 */
.form-card {
    background: #fff8e7;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 8px 40px rgba(139,90,43,0.15);
    border: 2px solid #d4b896;
}
.form-title {
    font-size: 26px;
    color: #8b5a2b;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 700;
}
.form-title .icon {
    font-size: 36px;
    margin-right: 10px;
}

/* 表单组 */
.form-group {
    margin-bottom: 25px;
}
.form-group label {
    display: block;
    font-size: 16px;
    color: #8b5a2b;
    margin-bottom: 10px;
    font-weight: 600;
}
.form-group label .required {
    color: #e74c3c;
    margin-left: 3px;
}
.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #d4b896;
    border-radius: 10px;
    font-size: 16px;
    color: #5d4e37;
    background: #fffef5;
    transition: all 0.3s;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b5a2b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #8b5a2b;
    box-shadow: 0 0 0 3px rgba(139,90,43,0.1);
}

/* 日期选择 - 三列布局 */
.date-select-group {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}
.date-select-group .form-group {
    margin-bottom: 0;
}
.date-select-group select {
    font-size: 15px;
    padding: 14px 12px;
    padding-right: 35px;
}

/* 时辰选择 */
.shichen-select {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.shichen-option {
    position: relative;
}
.shichen-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}
.shichen-option label {
    display: block;
    padding: 12px 5px;
    text-align: center;
    border: 2px solid #d4b896;
    border-radius: 10px;
    cursor: pointer;
    background: #fffef5;
    transition: all 0.3s;
    font-size: 14px;
    color: #5d4e37;
    margin-bottom: 0;
    font-weight: 500;
    line-height: 1.4;
}
.shichen-option label .time-range {
    display: block;
    font-size: 11px;
    color: #a08040;
    margin-top: 2px;
}
.shichen-option label:hover {
    border-color: #a67c52;
    background: #faf5eb;
}
.shichen-option input:checked + label {
    border-color: #8b5a2b;
    background: linear-gradient(135deg, #8b5a2b, #a67c52);
    color: #fff8e7;
    font-weight: 700;
}
.shichen-option input:checked + label .time-range {
    color: rgba(255,248,231,0.8);
}

/* 性别选择 */
.gender-group {
    display: flex;
    gap: 20px;
}
.gender-option {
    flex: 1;
    position: relative;
}
.gender-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}
.gender-option label {
    display: block;
    padding: 15px;
    text-align: center;
    border: 2px solid #d4b896;
    border-radius: 10px;
    cursor: pointer;
    background: #fffef5;
    transition: all 0.3s;
    font-size: 16px;
    color: #5d4e37;
    margin-bottom: 0;
}
.gender-option label:hover {
    border-color: #a67c52;
}
.gender-option input:checked + label {
    border-color: #8b5a2b;
    background: linear-gradient(135deg, #8b5a2b, #a67c52);
    color: #fff8e7;
    font-weight: 700;
}

/* 提交按钮 */
.submit-btn {
    display: block;
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #8b5a2b, #a67c52);
    color: #fff8e7;
    border: none;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(139,90,43,0.3);
    transition: all 0.3s;
    font-family: inherit;
    letter-spacing: 2px;
    margin-top: 10px;
}
.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(139,90,43,0.4);
}

/* 说明文字 */
.notice-box {
    background: linear-gradient(135deg, #f0f8e8, #fff8e7);
    border: 1px solid #b8d4a0;
    border-radius: 12px;
    padding: 20px;
    margin-top: 25px;
}
.notice-box .notice-title {
    color: #5a7c3a;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
}
.notice-box p {
    font-size: 14px;
    color: #6b5b4f;
    line-height: 2;
}

/* 底部装饰 */
.bottom-deco {
    text-align: center;
    margin-top: 40px;
    color: #a08040;
    font-size: 14px;
}

/* 农历提示 */
.lunar-tip {
    background: linear-gradient(135deg, #fff3cd, #ffeeba);
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #856404;
}
.lunar-tip strong {
    color: #8b5a2b;
}

@media (max-width: 768px) {
    .top-banner h1 { font-size: 28px; }
    .top-banner { padding: 40px 15px; }
    .form-card { padding: 20px; }
    .gender-group { flex-direction: column; gap: 10px; }
    .date-select-group { grid-template-columns: 1fr; gap: 8px; }
    .shichen-select { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .shichen-option label { padding: 10px 3px; font-size: 12px; }
    .form-title { font-size: 20px; }
    .main-container { padding: 20px 12px; }
}

@media (max-width: 480px) {
    .shichen-select { grid-template-columns: repeat(2, 1fr); }
}
/* ========== 历史记录卡片 - 与公司起名/宝宝起名一致 ========== */
.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%;
    }
}