/* ============================================================
   流量预计 - 共享组件样式（全模块通用，自包含，不依赖页面主题）
   ============================================================ */

/* ---------- 面板 ---------- */
.ts-panel {
    background: #fff;
    border: 1px solid #f0e6d8;
    border-radius: 12px;
    padding: 18px 20px;
    margin-top: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
    font-size: 14px;
    color: #333;
}
.ts-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}
.ts-title {
    font-size: 16px;
    font-weight: 700;
    color: #d4611e;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ts-sub {
    font-size: 12px;
    color: #b0b0b0;
}

/* 加载 / 错误 */
.ts-loading {
    padding: 26px 0;
    text-align: center;
    color: #999;
    font-size: 13px;
}
.ts-loading .ts-spin {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid #ffe3c8;
    border-top-color: #ff7d1a;
    border-radius: 50%;
    animation: ts-rotate .8s linear infinite;
    vertical-align: -6px;
    margin-right: 8px;
}
@keyframes ts-rotate { to { transform: rotate(360deg); } }
.ts-error {
    padding: 14px;
    color: #e06c5a;
    background: #fdf1ee;
    border-radius: 8px;
    font-size: 13px;
}

/* ---------- 主体：左评分环 + 右雷达 ---------- */
.ts-body {
    display: flex;
    gap: 18px;
    margin-top: 14px;
    align-items: center;
    flex-wrap: wrap;
}
.ts-detail {
    flex: 0 0 190px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.ts-ring-wrap { position: relative; width: 120px; height: 120px; }
.ts-ring-wrap svg { width: 120px; height: 120px; transform: rotate(-90deg); }
.ts-ring-bg { fill: none; stroke: #f2ede6; stroke-width: 10; }
.ts-ring-fg {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dasharray .6s ease;
}
.ts-ring-num {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.ts-ring-num b { font-size: 30px; line-height: 1; color: #333; }
.ts-ring-num span { font-size: 11px; color: #aaa; margin-top: 3px; }

.ts-level {
    display: inline-block;
    padding: 3px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}
.ts-exposure, .ts-bench {
    font-size: 13px;
    color: #666;
    text-align: center;
    line-height: 1.6;
}
.ts-bench { color: #999; font-size: 12.5px; }

/* 等级配色 */
.ts-level.lv-low  { background: #9aa5b1; }
.ts-level.lv-mid  { background: #3b82f6; }
.ts-level.lv-high { background: #ff7d1a; }
.ts-level.lv-hot  { background: linear-gradient(135deg, #ff4d4f, #d4186f); }

/* 雷达 */
.ts-radar { flex: 1; min-width: 240px; max-width: 340px; margin: 0 auto; }
.ts-radar-svg { width: 100%; height: auto; display: block; }
.ts-grid   { fill: none; stroke: #eee7dc; stroke-width: 1; }
.ts-axis   { stroke: #eee7dc; stroke-width: 1; }
.ts-poly   { fill: rgba(255, 125, 26, .25); stroke: #ff7d1a; stroke-width: 2; stroke-linejoin: round; }
.ts-dot    { fill: #ff7d1a; }
.ts-lbl    { font-size: 11px; fill: #8a8a8a; }

/* ---------- 排名条（多内容时） ---------- */
.ts-rank {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.ts-rank-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 16px;
    border: 1px solid #eee2d2;
    background: #fffaf4;
    font-size: 12.5px;
    color: #666;
    cursor: pointer;
    transition: all .15s;
    user-select: none;
}
.ts-rank-item:hover { border-color: #ff7d1a; color: #ff7d1a; }
.ts-rank-item.active {
    background: #fff1e3;
    border-color: #ff7d1a;
    color: #d4611e;
    font-weight: 700;
}
.ts-rank-item .no { color: #b0b0b0; }

/* ---------- 建议 ---------- */
.ts-tips {
    margin-top: 14px;
    padding: 10px 14px;
    background: #fffaf4;
    border-left: 3px solid #ff7d1a;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: #7a5a3a;
    line-height: 1.7;
}
.ts-note {
    margin-top: 10px;
    font-size: 12px;
    color: #c0c0c0;
    text-align: right;
}

/* ---------- 卡片内嵌徽章 ---------- */
.ts-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 14px;
    font-size: 12px;
    line-height: 1.5;
    cursor: pointer;
    user-select: none;
    background: #f6f7f9;
    border: 1px solid #e8eaee;
    color: #666;
    transition: all .15s;
}
.ts-badge:hover { transform: translateY(-1px); }
.ts-badge .ts-badge-lv {
    font-weight: 700;
    padding: 0 6px;
    border-radius: 8px;
    color: #fff;
}
.ts-badge.lv-low  .ts-badge-lv { background: #9aa5b1; }
.ts-badge.lv-mid  .ts-badge-lv { background: #3b82f6; }
.ts-badge.lv-high .ts-badge-lv { background: #ff7d1a; }
.ts-badge.lv-hot  .ts-badge-lv { background: linear-gradient(135deg, #ff4d4f, #d4186f); }
.ts-badge .ts-badge-score { font-weight: 700; color: #444; }

/* 小屏 */
@media (max-width: 640px) {
    .ts-body { flex-direction: column; }
    .ts-detail { flex-basis: auto; }
    .ts-radar { min-width: 220px; }
}
