/* ============================================
   dafen.php 姓名打分页专属样式
============================================ */

.score-result-page {
    margin-top: 20px;
}

.score-header-card {
    background: #fff;
    border-radius: 20px;
    padding: 30px 35px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
    margin-bottom: 25px;
}

.score-big-wrap {
    display: flex;
    align-items: center;
    gap: 40px;
}

.score-ring {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}
.score-ring svg {
    transform: rotate(-90deg);
}
.score-number-wrap {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}
.score-number-wrap .score-number {
    font-size: 36px;
    font-weight: 900;
    color: #C41A1A;
    line-height: 1;
}
.score-number-wrap .score-label {
    font-size: 16px;
    color: #999;
}

.score-desc-wrap {
    flex: 1;
}
.score-desc-wrap h3 {
    font-size: 24px;
    font-weight: 800;
    color: #333;
    margin-bottom: 8px;
    letter-spacing: 4px;
}
.score-desc-wrap p {
    font-size: 16px;
    color: #666;
    line-height: 1.8;
}

.score-section {
    margin-bottom: 25px;
}

.score-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
    padding-left: 14px;
    border-left: 4px solid #C41A1A;
}
.score-section-title i {
    color: #C41A1A;
    margin-right: 8px;
}

.score-ge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.score-ge-item {
    background: #fff;
    border-radius: 14px;
    padding: 18px 20px 20px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
    transition: transform 0.3s;
}
.score-ge-item:hover {
    transform: translateY(-3px);
}

.ge-header {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}
.ge-number {
    font-size: 32px;
    font-weight: 800;
    color: #333;
    line-height: 1.2;
}
.ge-wuxing {
    font-size: 14px;
    color: #999;
}
.ge-pfen {
    font-size: 14px;
    font-weight: 600;
    margin: 4px 0 8px;
}
.ge-info {
    font-size: 14px;
    color: #555;
    line-height: 1.9;
    max-height: 400px;
    overflow-y: auto;
    padding-top: 10px;
    border-top: 1px solid #f5f5f5;
}
.ge-info strong {
    color: #C41A1A;
}
.ge-info br {
    display: block;
    content: "";
    margin: 4px 0;
}

.score-sancai-box {
    background: #fff;
    border-radius: 14px;
    padding: 22px 26px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
}

.sancai-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 2px solid #f5f5f5;
    flex-wrap: wrap;
    gap: 10px;
}
.sancai-config {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}
.sancai-pfen {
    font-size: 15px;
    color: #999;
}
.sancai-score {
    font-size: 22px;
    font-weight: 700;
    color: #C41A1A;
}

.sancai-info {
    padding-top: 14px;
    font-size: 15px;
    color: #555;
    line-height: 2;
    max-height: 500px;
    overflow-y: auto;
}
.sancai-info strong {
    color: #C41A1A;
}
.sancai-info br {
    display: block;
    content: "";
    margin: 2px 0;
}

/* 打分结果样式 */
.score-dashboard {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* 顶部综合评分 */
.score-overview {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #fff 0%, #fef5f0 100%);
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0e0db;
    display: flex;
    align-items: center;
    gap: 24px;
}

.score-circle-mini {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    position: relative;
}

.score-circle-mini svg {
    width: 100%;
    height: 100%;
}

.score-overview-info {
    flex: 1;
}

.score-overview-name {
    font-size: 24px;
    font-weight: 800;
    color: #333;
    margin-bottom: 4px;
}

.score-overview-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.score-level-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    margin-left: 8px;
    line-height: 1.5; /* ★★★ 添加行高，让文字垂直居中 ★★★ */
    vertical-align: middle; /* ★★★ 与相邻元素垂直居中 ★★★ */
}

/* 五格数理表格 */
.wuge-compact {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
}

.wuge-title {
    font-size: 21px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wuge-title i {
    color: #C41A1A;
}

.wuge-table {
    width: 100%;
    border-collapse: collapse;
}

.wuge-table th {
    background: #faf5f2;
    padding: 8px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #666;
    border-bottom: 2px solid #f0e0db;
}

.wuge-table td {
    padding: 8px;
    text-align: center;
    font-size: 17px;
    border-bottom: 1px solid #f5f5f5;
}

.wuge-table .wg-name {
    font-weight: 700;
    color: #333;
}

.wuge-table .wg-num {
    font-weight: 800;
    font-size: 18px;
    color: #C41A1A;
}

.wuge-table .wg-score {
    font-weight: 600;
}

/* 五格详解卡片 */
.wuge-detail-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.wuge-detail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--ge-color);
}

.wuge-detail-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.wuge-detail-name {
    font-size: 21px;
    font-weight: 700;
}

.wuge-detail-info {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.wuge-detail-num {
    font-size: 24px;
    font-weight: 800;
    color: #333;
}

.wuge-detail-meta {
    font-size: 13px;
    color: #666;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.wuge-detail-content {
    font-size: 15px;
    color: #666;
    line-height: 1.7;
    padding-top: 12px;
    border-top: 1px solid #f5f5f5;
    word-break: break-word;
}

/* 其他四格详解网格 */
.wuge-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    grid-column: 1 / -1;
}

/* 三才配置大卡片 */
.sancai-full {
    grid-column: 1 / -1;
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
}

.sancai-full-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.sancai-config-tag {
    padding: 8px 20px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 800;
    background: #fef0ed;
    color: #C41A1A;
    letter-spacing: 2px;
}

.sancai-score-tag {
    font-size: 14px;
    font-weight: 700;
    color: #666;
}

.sancai-full-content {
    font-size: 15px;
    color: #666;
    line-height: 1.8;
    word-break: break-word;
}

/* 汉字信息 */
.chars-compact {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
    grid-column: 1 / -1;
}

.chars-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chars-title i {
    color: #C41A1A;
}

.chars-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.char-badge {
    flex: 1;
    min-width: 120px;
    background: #faf5f2;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    border: 1px solid #f0e0db;
}

.char-badge-main {
    font-size: 28px;
    font-weight: 800;
    color: #333;
    display: block;
    margin-bottom: 4px;
}

.char-badge-info {
    font-size: 12px;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    justify-content: center;
}

.char-badge-info span {
    background: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

/* 三才配置行（在五格表格内） */
.wuge-sancai-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 12px;
    margin-top: 10px;
    background: #faf5f2;
    border-radius: 10px;
    border: 1px solid #f0e0db;
}

.wuge-sancai-label {
    font-size: 19px;
    color: #816420;
    font-weight: 600;
}

.wuge-sancai-config {
    font-size: 18px;
    font-weight: 700;
    color: #C41A1A;
    letter-spacing: 2px;
}

.wuge-sancai-score {
    font-size: 18px;
    font-weight: 700;
}

/* 响应式 */
@media (max-width: 768px) {
    .score-dashboard {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .score-overview {
        grid-column: 1;
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .wuge-detail-grid {
        grid-template-columns: 1fr;
        grid-column: 1;
    }
    
    .sancai-full {
        grid-column: 1;
    }
    
    .chars-compact {
        grid-column: 1;
    }
    
    .score-overview-name {
        font-size: 20px;
    }
    
    .wuge-table th,
    .wuge-table td {
        padding: 6px 4px;
        font-size: 12px;
    }
    
    .wuge-table .wg-num {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .score-ge-grid {
        grid-template-columns: 1fr;
    }
}