/* ============================================
   qiming.php 起名结果页专属样式
   分数贴在名字右侧
   手机端用字信息纵向排列
============================================ */

/* ★★★ 结果区域锚点样式 - 已按你的要求修改 ★★★ */
#resultSection {
    scroll-margin-top: 85px; /* 滚动时留出顶部空间 */
}

/* 名字卡片头部 - 分数贴在右边 */
.name-card-header-right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 2px solid #f5f5f5;
    flex-wrap: wrap;
    gap: 10px;
}

.name-card-header-right .name-display {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    flex: 1;
}

.name-card-header-right .name-display .name-full {
    font-size: 28px;
    font-weight: 800;
    color: #333;
    letter-spacing: 2px;
}

.name-card-header-right .name-display .name-match {
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    background: #f5f5f5;
    color: #999;
}

.name-card-header-right .name-display .name-match.best {
    background: #fef0ed;
    color: #C41A1A;
}

.name-card-header-right .name-gender {
    flex-shrink: 0;
}

.name-card-header-right .name-score-right {
    display: flex;
    align-items: baseline;
    gap: 2px;
    flex-shrink: 0;
    background: #fef5f0;
    padding: 4px 16px 4px 12px;
    border-radius: 20px;
    border: 1px solid #f0e0db;
}

.name-card-header-right .name-score-right .score-number {
    font-size: 32px;
    font-weight: 900;
    color: #C41A1A;
    line-height: 1;
}

.name-card-header-right .name-score-right .score-label {
    font-size: 14px;
    color: #999;
}

/* PC端显示 */
.pc-only {
    display: flex;
}

/* 手机端隐藏 */
.mobile-only {
    display: none;
}

/* ★★★ 手机端最佳匹配悬浮标签样式 - 已按你的要求修改 ★★★ */
.best-match-badge-mobile {
    position: absolute;
    top: -20px;
    left: -25px;
    background: linear-gradient(135deg, #C41A1A, #e74c3c);
    color: #fff;
    padding: 5px 16px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(196, 26, 26, 0.3);
    z-index: 10;
    white-space: nowrap;
}

/* 手机端用字信息 - 上面是字，下面是信息 */
.char-item-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: #f9f9f9;
    padding: 10px 16px;
    border-radius: 12px;
    min-width: 100px;
    flex: 1;
}

.char-item-mobile .char-char {
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

.char-item-mobile .char-detail-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    color: #999;
    line-height: 1.4;
}

.char-item-mobile .char-detail-mobile span {
    color: #666;
    font-weight: 500;
}

.char-item-mobile .char-detail-mobile .char-label {
    font-size: 10px;
    color: #ccc;
    font-weight: 400;
}

/* ===== qiming.php 名字结果样式 ===== */

.bazi-analysis {
    background: #fff;
    border-radius: 18px;
    padding: 24px 28px;
    margin-bottom: 28px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
}
.bazi-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 14px;
}
.bazi-title i {
    color: #C41A1A;
    margin-right: 8px;
}

.bazi-info-top {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 40px;
    padding: 12px 16px;
    margin-bottom: 14px;
    background: #f8f5f2;
    border-radius: 10px;
    border: 1px solid #f0e8e0;
}
.bazi-info-item {
    font-size: 16px;
    color: #666;
}
.bazi-info-item strong {
    color: #333;
}

.bazi-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 40px;
    padding: 0 4px;
}
.bazi-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.bazi-label {
    font-size: 14px;
    color: #999;
    font-weight: 500;
}
.bazi-value {
    font-size: 17px;
    font-weight: 600;
    color: #333;
}
.bazi-advice {
    margin-top: 14px;
    padding: 14px 18px;
    background: #f8f5f2;
    border-radius: 10px;
    font-size: 15px;
    color: #666;
    line-height: 1.8;
}
.bazi-advice i {
    color: #C41A1A;
    margin-right: 8px;
}

.name-list-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    padding-left: 14px;
    border-left: 4px solid #C41A1A;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.name-list-title i {
    color: #C41A1A;
    margin-right: 8px;
}

/* ★★★ 分页信息样式 ★★★ */
.page-info {
    font-size: 14px;
    color: #999;
    font-weight: 400;
    margin-left: auto;
}

.name-card {
    background: #fff;
    border-radius: 18px;
    padding: 24px 28px 22px;
    margin-bottom: 24px;
    margin-top: 14px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}
.name-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.name-card-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f5f5f5;
    flex-wrap: wrap;
    position: relative;
}

.name-score {
    display: flex;
    align-items: baseline;
    gap: 2px;
}
.score-number {
    font-size: 36px;
    font-weight: 900;
    color: #C41A1A;
    line-height: 1;
}
.score-label {
    font-size: 16px;
    color: #999;
}

.name-display {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.name-full {
    font-size: 28px;
    font-weight: 800;
    color: #333;
    letter-spacing: 2px;
}
.name-match {
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    background: #f5f5f5;
    color: #999;
}
.name-match.best {
    background: #fef0ed;
    color: #C41A1A;
}

.name-gender {
    flex-shrink: 0;
}
.gender-tag {
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}
.gender-tag.male {
    background: #e3f2fd;
    color: #1976d2;
}
.gender-tag.female {
    background: #fce4ec;
    color: #c62828;
}
.gender-tag.unisex {
    background: #f5f5f5;
    color: #888;
}

.char-info-list {
    display: flex;
    gap: 20px;
    padding: 18px 0;
    flex-wrap: wrap;
}

.char-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f9f9f9;
    padding: 10px 16px;
    border-radius: 12px;
    min-width: 160px;
}
.char-char {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    width: 44px;
    text-align: center;
}
.char-detail p {
    font-size: 14px;
    color: #999;
    line-height: 1.6;
}
.char-detail p span:last-child {
    color: #666;
    font-weight: 500;
}
.char-label {
    font-size: 12px;
    color: #ccc;
}

.char-analysis {
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.analysis-item {
    display: flex;
    gap: 10px;
    padding: 6px 0;
    font-size: 15px;
    color: #555;
    line-height: 1.8;
}
.analysis-label {
    font-weight: 600;
    color: #333;
    flex-shrink: 0;
    min-width: 90px;
}
.analysis-text {
    flex: 1;
}
.analysis-text b {
    color: #C41A1A;
}
.wuxing-tag {
    color: #C41A1A;
    font-weight: 600;
}
.poetry-text {
    color: #666;
    line-height: 1.8;
}
.poetry-highlight {
    color: #C41A1A;
    font-weight: 700;
}

/* ★★★ 分页导航样式 ★★★ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e0e0e0;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pagination .page-link:hover {
    background: #f5f5f5;
    border-color: #ccc;
    color: #333;
}

.pagination .page-link.active {
    background: #C41A1A;
    border-color: #C41A1A;
    color: #fff;
    font-weight: 700;
}

.pagination .page-dots {
    color: #999;
    font-size: 14px;
    padding: 0 4px;
}

/* ★★★ 按钮加载状态样式 ★★★ */
.btn-submit-small {
    transition: all 0.3s ease;
}
.btn-submit-small:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .pc-only {
        display: none !important;
    }
    .mobile-only {
        display: flex !important;
    }
    
    .name-card-header {
        padding-top: 20px;
    }
    
    .name-card-header-right {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .name-card-header-right .name-display {
        width: 100%;
        justify-content: center;
    }
    
    .name-card-header-right .name-display .name-full {
        font-size: 22px;
    }
    
    .name-card-header-right .name-score-right {
        align-self: center;
        padding: 4px 14px 4px 10px;
    }
    
    .name-card-header-right .name-score-right .score-number {
        font-size: 26px;
    }
    
    .name-card-header .name-display .name-match {
        display: none;
    }
    
    .char-info-list-mobile {
        display: flex !important;
        gap: 10px;
        flex-wrap: nowrap;
        padding: 14px 0;
    }
    
    .char-item-mobile {
        min-width: 80px;
        flex: 1 1 calc(33.33% - 10px);
        padding: 8px 12px;
    }
    
    .char-item-mobile .char-char {
        font-size: 24px;
    }
    
    .char-item-mobile .char-detail-mobile {
        font-size: 11px;
    }

    .bazi-info-top {
        flex-direction: column;
        gap: 6px;
        padding: 10px 14px;
    }
    .bazi-info-item {
        font-size: 14px;
    }
    .bazi-content {
        gap: 8px 16px;
    }
    .bazi-item {
        width: 100%;
    }
    .bazi-value {
        font-size: 15px;
    }
    
    .pagination {
        gap: 6px;
        margin: 20px 0;
    }
    
    .pagination .page-link {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .name-card-header-right .name-display .name-full {
        font-size: 18px;
    }
    
    .name-card-header-right .name-score-right .score-number {
        font-size: 22px;
    }
    
    /* ★★★ 手机端最佳匹配标签调整 - 已按你的要求修改 ★★★ */
    .best-match-badge-mobile {
        top: -20px;
        left: -25px;
        padding: 5px 15px;
        font-size: 12px;
    }
    
    .char-item-mobile {
        flex: 1 1 calc(50% - 10px);
        min-width: 60px;
    }
    
    .char-item-mobile .char-char {
        font-size: 20px;
    }

    .bazi-analysis {
        padding: 16px 18px;
    }
    .bazi-title {
        font-size: 17px;
    }
    .bazi-advice {
        font-size: 14px;
        padding: 10px 14px;
    }
    
    .pagination .page-link {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 12px;
    }
}

@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
    .pc-only {
        display: flex !important;
    }
    .char-info-list-mobile {
        display: none !important;
    }
    
    .best-match-badge-mobile {
        display: none;
    }
}