/* ===== 市场星级页面样式 ===== */

/* 子Tab导航 */
.star-sub-tabs {
    display: flex;
    gap: 0;
    background: #fff;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    margin-bottom: 0;
    border: 1px solid #e0e0e0;
    border-bottom: none;
}
.star-sub-tab {
    flex: 1;
    padding: 10px 16px;
    font-size: 14px;
    color: #666;
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    transition: all .2s;
    border-right: 1px solid #e0e0e0;
}
.star-sub-tab:last-child { border-right: none; }
.star-sub-tab:hover { background: #e8e8e8; }
.star-sub-tab.active {
    background: #fff;
    color: #1890ff;
    font-weight: 600;
    border-bottom: 2px solid #1890ff;
}

/* 子面板 */
.star-sub-panel {
    display: none;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0 0 8px 8px;
    padding: 20px;
}
.star-sub-panel.active { display: block; }

/* 页头 */
.val-page-header {
    margin-bottom: 16px;
}
.val-page-header h1 {
    font-size: 22px;
    color: #202124;
    margin: 0 0 4px;
}
.val-subtitle {
    font-size: 13px;
    color: #999;
    margin: 0;
}

/* 星级卡片 */
.star-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.star-card {
    background: #fafafa;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}
.star-card-title {
    font-size: 15px;
    color: #666;
    margin-bottom: 8px;
}
.star-card-value {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}
.star-card-meta {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 13px;
    color: #999;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.star-card-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* 图表区域 */
.star-chart-section {
    margin-bottom: 24px;
}
.star-chart-section h3 {
    font-size: 16px;
    color: #333;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}
.star-canvas {
    width: 100% !important;
    max-width: 100%;
    height: auto;
    display: block;
}

/* 周度数据区域 */
.star-weekly-section {
    margin-bottom: 16px;
}
.star-weekly-section h3 {
    font-size: 16px;
    color: #333;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.val-date-badge {
    font-size: 12px;
    color: #999;
    font-weight: 400;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
}

/* 周度单行卡片 */
.wk-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.wk-row {
    display: grid;
    grid-template-columns: minmax(130px, 180px) 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #eee;
    border-left-width: 6px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: box-shadow 0.15s, transform 0.15s;
}
.wk-row:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}
.wk-row.zone-cheap { border-left-color: var(--bg-green, #0DAB67); }
.wk-row.zone-normal { border-left-color: var(--bg-orange, #F6C343); }
.wk-row.zone-expensive { border-left-color: var(--bg-red, #E53935); }

.wk-identity { min-width: 0; }
.wk-name {
    font-size: 14px;
    font-weight: 700;
    color: #202124;
    line-height: 1.3;
    display: block;
}

.wk-axis {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.wk-bar-track {
    flex: 1;
    height: 8px;
    background: #f0f0f0;
    border-radius: 999px;
    overflow: hidden;
    min-width: 60px;
}
.wk-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s ease;
}
.wk-bar-fill.zone-cheap { background: #0DAB67; }
.wk-bar-fill.zone-normal { background: #F6C343; }
.wk-bar-fill.zone-expensive { background: #E53935; }
.wk-zone-tag {
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.wk-zone-tag.zone-cheap { background: #d4edda; color: #155724; }
.wk-zone-tag.zone-normal { background: #fff3cd; color: #856404; }
.wk-zone-tag.zone-expensive { background: #f8d7da; color: #721c24; }

.wk-side {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    white-space: nowrap;
}
.wk-current {
    font-variant-numeric: tabular-nums;
    color: #333;
    font-weight: 500;
}
.wk-rank {
    font-variant-numeric: tabular-nums;
    color: #666;
    font-weight: 700;
    min-width: 36px;
    text-align: right;
}
.wk-change { font-size: 12px; }

/* 区间标签 */
.zone-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
.zone-cheap { background: #d4edda; color: #155724; }
.zone-normal { background: #fff3cd; color: #856404; }
.zone-expensive { background: #f8d7da; color: #721c24; }

/* 排名变化 */
.wk-change-up { color: #e53935; font-weight: 600; }
.wk-change-down { color: #0DAB67; font-weight: 600; }
.wk-change-none { color: #ccc; }
.wk-changed-tag {
    display: inline-block;
    margin-left: 4px;
    font-size: 11px;
    color: #999;
    background: #f0f0f0;
    padding: 1px 4px;
    border-radius: 2px;
}

/* 黄金指标行 */
.gold-metrics-inline {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.gold-metric-mini {
    background: #fafafa;
    border-radius: 6px;
    padding: 12px 20px;
    text-align: center;
    flex: 1;
    min-width: 120px;
}
.gm-label {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
}
.gm-value {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* 图例 */
.star-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    padding: 16px 0;
    flex-wrap: wrap;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
}
.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

/* 响应式 */
@media (max-width: 768px) {
    .star-sub-tab { padding: 8px 10px; font-size: 13px; }
    .star-card-value { font-size: 28px; }
    .val-table { font-size: 13px; }
    .val-table th, .val-table td { padding: 6px 8px; }
    .star-cards { grid-template-columns: 1fr; }
    .gold-metrics-inline { flex-direction: column; }
}

/* ===== 全球估值表样式 ===== */
.gv-table-section {
    margin-top: 28px;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.gv-table-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.gv-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.gv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    white-space: nowrap;
    min-width: 900px;
}
.gv-table thead th {
    background: #f5f7fa;
    color: #555;
    font-weight: 600;
    padding: 8px 6px;
    text-align: center;
    border-bottom: 2px solid #e0e0e0;
    line-height: 1.4;
    position: sticky;
    top: 0;
}
.gv-table thead th:first-child {
    text-align: left;
    padding-left: 12px;
}
.gv-table tbody td {
    padding: 7px 6px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}
.gv-table tbody td:first-child {
    text-align: left;
    padding-left: 12px;
    font-weight: 500;
}
.gv-table tbody tr:hover {
    background: #fafafa;
}
/* 估值分位颜色 */
.val-row-green { background: rgba(13,171,103,0.06); }
.val-row-green:hover { background: rgba(13,171,103,0.12); }
.val-row-orange { background: rgba(246,195,67,0.06); }
.val-row-orange:hover { background: rgba(246,195,67,0.12); }
.val-row-red { background: rgba(229,57,53,0.06); }
.val-row-red:hover { background: rgba(229,57,53,0.12); }
.bond-row { background: #e3f2fd; }
.bond-row:hover { background: #bbdefb; }
.gv-table-footer {
    text-align: right;
    color: #999;
    font-size: 12px;
    margin-top: 8px;
}

/* 图表底部注释 */
.star-chart-note {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
    text-align: center;
}

/* 图表图例 */
.star-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-top: 8px;
    padding: 8px 0;
}
.star-chart-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #666;
}
.star-chart-legend .legend-line {
    display: inline-block;
    width: 20px;
    height: 3px;
    border-radius: 2px;
}

/* 响应式：小屏隐藏部分列 */
@media (max-width: 768px) {
    .gv-table { font-size: 11px; }
    .gv-table thead th, .gv-table tbody td { padding: 5px 3px; }
}
.chart-note { font-size: 12px; color: #999; margin: 5px 0 15px; padding: 0 5px; line-height: 1.5; }
.gold-metric-mini .gm-value { font-size: 14px; font-weight: 600; }
.gold-metrics-inline { flex-wrap: wrap; gap: 8px; }
