/* 起名结果页面专用样式 - 简洁版 */

/* 避免冲突，使用特定的容器类名 */
.quming-page {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 20px 0;
}

.quming-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

.quming-content {
    display: block;
}

.quming-main {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 面包屑导航 */
.quming-breadcrumb {
    background: #fff;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
    color: #666;
}

.quming-breadcrumb a {
    color: #007bff;
    text-decoration: none;
}

.quming-breadcrumb a:hover {
    color: #0056b3;
}

.quming-breadcrumb .separator {
    margin: 0 8px;
    color: #999;
}

/* 结果头部 - 简洁表格设计 */
.quming-header {
    padding: 30px 20px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.quming-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #333;
    text-align: center;
}

/* 名字类型导航 */
.name-type-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.name-type-nav a {
    display: inline-block;
    padding: 8px 16px;
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
    border-radius: 20px;
    border: 1px solid #dee2e6;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.name-type-nav a:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

.name-type-nav a.on {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

/* 信息表格容器 */
.info-table {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 基本信息表格 */
.basic-info {
    width: 100%;
    border-collapse: collapse;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.basic-info td {
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    font-size: 14px;
}

.info-label {
    background: #e9ecef;
    font-weight: 600;
    color: #495057;
    width: 20%;
    text-align: center;
}

.info-value {
    background: white;
    color: #333;
    width: 30%;
}

.info-value.highlight {
    background: #fff3cd;
    color: #856404;
    font-weight: 600;
}

/* 五行表格 */
.wuxing-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wuxing-table th,
.wuxing-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid #dee2e6;
    font-size: 14px;
}

.wuxing-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.wuxing-label {
    background: #e9ecef;
    font-weight: 600;
    color: #495057;
}

.wuxing-count {
    font-weight: 600;
}

.wuxing-count.jin {
    color: #ffc107;
}

.wuxing-count.mu {
    color: #28a745;
}

.wuxing-count.shui {
    color: #007bff;
}

.wuxing-count.huo {
    color: #dc3545;
}

.wuxing-count.tu {
    color: #6f42c1;
}

/* 推荐名字区域 */
.quming-section {
    padding: 30px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.quming-section:last-child {
    border-bottom: none;
}

.section-title {
    font-size: 20px;
    color: #333;
    margin: 0 0 20px 0;
    text-align: center;
    font-weight: 600;
}

.section-desc {
    color: #666;
    text-align: center;
    margin: 0 0 30px 0;
    font-size: 14px;
}

/* 高分推荐名字 */
.recommend-names {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.name-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    transition: box-shadow 0.3s ease;
}

.name-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.name-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f5f5f5;
}

.name-link {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
}

.name-link:hover {
    color: #007bff;
}

.name-score {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.score-num {
    font-size: 18px;
    font-weight: 600;
    color: #e74c3c;
}

.score-level {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

/* 名字详情 */
.name-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
}

.detail-label {
    font-weight: 600;
    color: #333;
    min-width: 80px;
    flex-shrink: 0;
}

.detail-value {
    color: #666;
    flex: 1;
}

.wuxing-combo {
    color: #007bff;
    font-weight: 600;
}

.wuge-config {
    color: #28a745;
    font-weight: 600;
}

/* 字符详情 */
.char-analysis {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f5f5f5;
}

/* 单字符显示时的样式 */
.char-analysis.single-char {
    grid-template-columns: 1fr;
    justify-items: center;
    max-width: 600px;
    margin: 15px auto 0;
}

.char-analysis.single-char .char-card {
    width: 100%;
    max-width: 500px;
    padding: 20px 25px;
}

/* 单字符时的属性布局优化 */
.char-analysis.single-char .char-props {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.char-analysis.single-char .char-meaning,
.char-analysis.single-char .char-source {
    margin-bottom: 12px;
    padding: 12px 15px;
}

.char-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
}

.char-name {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin-bottom: 15px;
    width: 60px;
    height: 60px;
    line-height: 60px;
    background: #fff url('/common/static/qiming/img/word.png') no-repeat center center;
    background-size: contain;
    border: 2px solid #007bff;
    border-radius: 8px;
    margin: 0 auto 15px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.char-props {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-bottom: 10px;
}

.char-prop {
    font-size: 12px;
    color: #666;
    background: white;
    padding: 4px 8px;
    border-radius: 3px;
}

.char-meaning {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    background: white;
    padding: 8px;
    border-radius: 4px;
    border-left: 3px solid #007bff;
    margin-bottom: 8px;
}

.char-source {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    border-left: 3px solid #28a745;
}

/* 名字网格容器 - 简洁的标签布局 */
.names-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

/* 移除ul/li结构的默认样式，使用简单的标签显示 */
.names-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: contents;
}

.names-grid li {
    list-style: none;
    display: contents;
}

/* 统一的名字标签样式 - 胶囊形状 */
.names-grid a,
.names-grid span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: white;
    color: #2c5aa0;
    text-decoration: none;
    border-radius: 20px;
    border: 1px solid #d6e3f0;
    font-size: 14px;
    font-weight: 500;
    min-width: 70px;
    height: 36px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.names-grid a:hover {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e4080 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(44, 90, 160, 0.3);
    border-color: #2c5aa0;
}

/* 为span元素添加不同样式 */
.names-grid span {
    background: #fff8e1;
    color: #f57c00;
    border-color: #ffcc02;
}

.names-grid span:hover {
    background: #f57c00;
    color: white;
    border-color: #f57c00;
}

/* 清除后端HTML的默认样式，让所有内容都变成inline */
.names-grid div,
.names-grid p,
.names-grid table,
.names-grid tbody,
.names-grid tr {
    display: contents;
}

.names-grid br {
    display: none;
}

/* 表格单元格也变成标签样式 */
.names-grid td,
.names-grid th {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: white;
    color: #2c5aa0;
    border-radius: 20px;
    border: 1px solid #d6e3f0;
    font-size: 14px;
    font-weight: 500;
    min-width: 70px;
    height: 36px;
    margin: 0;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.names-grid th {
    background: #e3f2fd;
    color: #1565c0;
    font-weight: 600;
}

.names-grid td:hover,
.names-grid th:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(44, 90, 160, 0.2);
}

/* 服务广告 */
.service-ads {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.service-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-3px);
}

.service-icon {
    font-size: 30px;
    margin-bottom: 10px;
    display: block;
}

.service-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.service-desc {
    font-size: 13px;
    opacity: 0.9;
    margin: 0 0 15px 0;
}

.service-btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.service-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {

    .quming-container {
        padding: 0 10px;
    }

    .quming-title {
        font-size: 20px;
    }

    /* 手机端导航优化 */
    .name-type-nav {
        gap: 8px;
        margin-bottom: 20px;
    }

    .name-type-nav a {
        padding: 6px 12px;
        font-size: 13px;
    }

    /* 表格响应式 */
    .basic-info,
    .wuxing-table {
        font-size: 12px;
    }

    .basic-info td,
    .wuxing-table th,
    .wuxing-table td {
        padding: 8px 10px;
    }

    .info-label {
        width: 25%;
    }

    .info-value {
        width: 25%;
    }

    .name-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .char-analysis {
        grid-template-columns: 1fr;
    }

    .char-name {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    /* 手机端名字网格优化 */
    .names-grid {
        padding: 15px;
        gap: 6px;
    }

    .names-grid a,
    .names-grid span,
    .names-grid td,
    .names-grid th {
        padding: 6px 12px;
        font-size: 13px;
        min-width: 60px;
        height: 32px;
    }

    .service-ads {
        grid-template-columns: 1fr;
    }

    .quming-section {
        padding: 20px 15px;
    }

    .char-props {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .quming-page {
        padding: 10px 0;
    }

    .quming-header {
        padding: 20px 15px;
    }

    .quming-title {
        font-size: 18px;
    }

    /* 超小屏幕名字网格优化 */
    .names-grid {
        padding: 10px;
        gap: 4px;
    }

    .names-grid a,
    .names-grid span,
    .names-grid td,
    .names-grid th {
        padding: 5px 10px;
        font-size: 12px;
        min-width: 50px;
        height: 28px;
    }

    .detail-item {
        flex-direction: column;
        gap: 5px;
    }

    .detail-label {
        min-width: auto;
    }
}

/* 广告位样式 */
.ad-container {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* 今日热门起名样式 */
.hot-names-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.hot-name-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
}

.hot-name-item:hover {
    background: linear-gradient(135deg, #fff8f0 0%, #f0f8ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.rank-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    margin-right: 12px;
    flex-shrink: 0;
}

.rank-1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    color: #333;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.rank-2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%);
    color: #333;
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.3);
}

.rank-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #b8860b 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(205, 127, 50, 0.3);
}

.rank-4,
.rank-5 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.name-info {
    flex: 1;
}

.name-link {
    font-size: 15px;
    font-weight: 600;
    color: #2d3748;
    text-decoration: none;
    font-family: '楷体', KaiTi, serif;
}

.name-link:hover {
    color: #667eea;
}

.name-stats {
    font-size: 11px;
    color: #888;
    display: block;
    margin-top: 2px;
}

.trend-icon {
    font-size: 14px;
    opacity: 0.7;
}

/* 起名小贴士样式 */
.tips-container {
    position: relative;
    height: 120px;
    overflow: hidden;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
}

.tip-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.5s ease;
    display: flex;
    align-items: flex-start;
    padding: 15px;
    gap: 12px;
}

.tip-item.active {
    opacity: 1;
    transform: translateX(0);
}

.tip-icon {
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 5px;
}

.tip-content h5 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}

.tip-content p {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.tip-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px 0;
    border-top: 1px solid #e9ecef;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #667eea;
    transform: scale(1.2);
}

/* 常用起名用字样式 */
.char-tabs {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.char-tab-btns {
    display: flex;
    background: #e9ecef;
    border-radius: 8px 8px 0 0;
}

.char-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    font-weight: 500;
}

.char-tab-btn.active {
    background: #007bff;
    color: white;
}

.char-tab-btn:hover:not(.active) {
    background: rgba(0, 123, 255, 0.1);
}

.tab-icon {
    font-size: 16px;
}

.char-tab-content {
    display: none;
    padding: 20px;
}

.char-tab-content.active {
    display: block;
}

.char-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.char-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
}

.char-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #28a745);
    border-radius: 8px 8px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.char-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.char-item:hover::before {
    opacity: 1;
}

.char-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.char-text {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
    font-family: '楷体', KaiTi, serif;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.char-frequency {
    font-size: 12px;
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.char-meaning {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.char-footer {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.char-note {
    margin: 0;
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.char-note .icon-info {
    font-size: 14px;
}

/* 诗词起名样式 */
.poetry-names-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.poetry-name-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.poetry-name-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.name-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.poetry-name {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    font-family: '楷体', KaiTi, serif;
}

.poetry-source {
    font-size: 11px;
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.name-details {
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
}

.poem-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.poem-title {
    font-weight: 600;
    color: #333;
}

.poem-author {
    color: #888;
    font-size: 12px;
}

.poem-snippet {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    font-style: italic;
}

.poetry-footer {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.poetry-note {
    margin: 0;
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* 最新文章样式 */
.articles-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.article-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.article-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.article-title {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
}

.article-title a {
    color: #2d3748;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-title a:hover {
    color: #007bff;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #888;
}

.article-category a {
    color: #667eea;
    text-decoration: none;
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
}

.article-category a:hover {
    background: rgba(102, 126, 234, 0.2);
}

.article-time {
    color: #999;
}

.articles-footer {
    margin-top: 20px;
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.view-all-articles {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.view-all-articles:hover {
    color: #0056b3;
}

/* 响应式设计 */
@media (max-width: 768px) {

    .hot-names-container,
    .poetry-names-container,
    .articles-container {
        grid-template-columns: 1fr;
        padding: 15px;
    }

    .char-list {
        grid-template-columns: 1fr;
    }

    .tips-container {
        height: 140px;
    }

    .tip-item {
        padding: 12px;
    }

    .char-tab-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .hot-name-item {
        padding: 10px 12px;
    }

    .rank-badge {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }

    .name-link {
        font-size: 14px;
    }

    .poetry-name {
        font-size: 16px;
    }

    .char-text {
        font-size: 20px;
    }

    .tips-container {
        height: 160px;
    }
}