/* ==================== 对标监控样式 ==================== */

/* 结果容器 - 8列网格布局 */
.results-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
    padding: 0 0 16px 0;
}

/* 爆款卡片 - 卡片式布局 */
.outlier-card {
    display: flex;
    flex-direction: column;
    background: var(--glass);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.outlier-card:hover {
    background: rgba(75, 167, 255, 0.08);
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* 排名标签 */
.outlier-rank {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.outlier-card:nth-child(1) .outlier-rank {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #0a0f1c;
}

.outlier-card:nth-child(2) .outlier-rank {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    color: #0a0f1c;
}

.outlier-card:nth-child(3) .outlier-rank {
    background: linear-gradient(135deg, #cd7f32, #b87333);
    color: #0a0f1c;
}

/* 缩略图容器 - Shorts 竖屏 9:16 */
.outlier-thumb-container {
    position: relative;
    width: 100%;
    aspect-ratio: 9/16;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.outlier-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--panel-2);
    transition: transform 0.3s ease;
}

.outlier-card:hover .outlier-thumb {
    transform: scale(1.05);
}

/* 来源标签 */
.outlier-source-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 4px;
    background: rgba(91, 224, 179, 0.9);
    color: #0a0f1c;
    z-index: 2;
}

/* 卡片内容 */
.outlier-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.outlier-title {
    font-weight: 600;
    font-size: 11px;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
    line-height: 1.3;
    min-height: 28px;
}

.outlier-time {
    font-size: 10px;
    color: var(--primary);
    font-weight: 500;
}

.outlier-channel {
    font-size: 10px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 统计数据 - 新布局 */
.outlier-stats-row {
    display: flex;
    gap: 5px;
}

.outlier-stats-row.scores {
    gap: 10px;
}

/* 兼容旧样式 */
.outlier-stats {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.outlier-stat {
    font-size: 11px;
    color: var(--muted);
    background: var(--panel-2);
    padding: 3px 6px;
    border-radius: 4px;
}

.outlier-stat.viral-ratio {
    background: rgba(91, 224, 179, 0.15);
    color: var(--primary-strong);
    font-weight: 600;
}

.outlier-stat.score {
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
    font-weight: 600;
}

/* 操作按钮 */
.outlier-actions {
    display: flex;
    gap: 6px;
    padding: 0 12px 12px;
}

.outlier-actions .btn-sm {
    flex: 1;
    font-size: 11px;
    padding: 6px 8px;
}

/* 标签 */
.outlier-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.outlier-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

/* 金框边框：超级黑马 - 金色霓虹发光效果 */
.outlier-card.rank-gold {
    border: 3px solid #ffd700 !important;
    box-shadow:
        0 0 6px rgba(255, 215, 0, 0.7),
        0 0 12px rgba(255, 215, 0, 0.4);
    animation: goldPulse 2s ease-in-out infinite;
}

@keyframes goldPulse {

    0%,
    100% {
        box-shadow: 0 0 6px rgba(255, 215, 0, 0.7), 0 0 12px rgba(255, 215, 0, 0.4);
    }

    50% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 1), 0 0 18px rgba(255, 215, 0, 0.6);
    }
}

.outlier-card.rank-gold:hover {
    box-shadow:
        0 0 12px rgba(255, 215, 0, 1),
        0 0 20px rgba(255, 215, 0, 0.7);
}

/* 红框边框：千万巨兽 - 深红霓虹发光效果 */
.outlier-card.rank-red {
    border: 3px solid #ff3333 !important;
    box-shadow:
        0 0 6px rgba(255, 51, 51, 0.7),
        0 0 12px rgba(255, 51, 51, 0.4);
    animation: redPulse 2s ease-in-out infinite;
}

@keyframes redPulse {

    0%,
    100% {
        box-shadow: 0 0 6px rgba(255, 51, 51, 0.7), 0 0 12px rgba(255, 51, 51, 0.4);
    }

    50% {
        box-shadow: 0 0 10px rgba(255, 51, 51, 1), 0 0 18px rgba(255, 51, 51, 0.6);
    }
}

.outlier-card.rank-red:hover {
    box-shadow:
        0 0 12px rgba(255, 51, 51, 1),
        0 0 20px rgba(255, 51, 51, 0.7);
}

/* 绿框边框：长效稳定 - 翠绿霓虹发光效果 */
.outlier-card.rank-green {
    border: 3px solid #10b981 !important;
    box-shadow:
        0 0 6px rgba(16, 185, 129, 0.7),
        0 0 12px rgba(16, 185, 129, 0.4);
    animation: greenPulse 2s ease-in-out infinite;
}

@keyframes greenPulse {

    0%,
    100% {
        box-shadow: 0 0 6px rgba(16, 185, 129, 0.7), 0 0 12px rgba(16, 185, 129, 0.4);
    }

    50% {
        box-shadow: 0 0 10px rgba(16, 185, 129, 1), 0 0 18px rgba(16, 185, 129, 0.6);
    }
}

.outlier-card.rank-green:hover {
    box-shadow:
        0 0 12px rgba(16, 185, 129, 1),
        0 0 20px rgba(16, 185, 129, 0.7);
}

/* 兼容旧: 高亮低粉爆款 */
.outlier-card.highlighted {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.05);
}

.outlier-card.highlighted:hover {
    border-color: #ffd700;
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.2);
}

/* 作者信息 */
.outlier-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 3px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.outlier-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.outlier-avatar-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.outlier-author-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.outlier-author-name {
    font-size: 11px;
    font-weight: 500;
    color: var(--fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.outlier-author-subs {
    font-size: 10px;
    color: var(--muted);
}

/* 响应式 - 6列 */
@media (max-width: 1600px) {
    .results-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* 响应式 - 4列 */
@media (max-width: 1200px) {
    .results-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 响应式 - 3列 */
@media (max-width: 900px) {
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 响应式 - 2列 */
@media (max-width: 600px) {
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==================== 徽章统计仪表盘 ==================== */
#outlier-heatmap {
    margin-bottom: 16px;
    background: var(--glass);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 16px;
}

.rank-dashboard {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.filter-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    background: var(--panel-2);
    color: var(--muted);
}

.filter-chip:hover {
    transform: translateY(-2px);
}

.filter-chip.active {
    color: var(--text);
}

/* 全部 */
.filter-chip.all.active {
    background: rgba(75, 167, 255, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}

/* 超级黑马 - 金色 */
.filter-chip.gold {
    background: rgba(255, 215, 0, 0.1);
}

.filter-chip.gold:hover,
.filter-chip.gold.active {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    color: #ffd700;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
}

/* 千万巨兽 - 红色 */
.filter-chip.red {
    background: rgba(255, 51, 51, 0.1);
}

.filter-chip.red:hover,
.filter-chip.red.active {
    background: rgba(255, 51, 51, 0.2);
    border-color: #ff3333;
    color: #ff4444;
    box-shadow: 0 0 12px rgba(255, 51, 51, 0.5);
}

/* 长效稳定 - 翠绿色 */
.filter-chip.green {
    background: rgba(16, 185, 129, 0.1);
}

.filter-chip.green:hover,
.filter-chip.green.active {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

.chip-count {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

/* ==================== 对标 Tab 切换 ==================== */
.outlier-tab-group {
    display: flex;
    gap: 4px;
    background: transparent;
    padding: 0;
    border-radius: 10px;
}

.outlier-tab {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--muted);
    white-space: nowrap;
}

.outlier-tab:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

/* 对标 Tab 激活状态 */
.outlier-tab[data-tab="outlier-main"].active {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.3), rgba(255, 215, 0, 0.3));
    color: var(--text);
}

/* 词效分析 Tab 激活状态 */
.outlier-tab[data-tab="outlier-stats"].active {
    background: linear-gradient(135deg, rgba(75, 167, 255, 0.3), rgba(168, 85, 247, 0.3));
    color: var(--text);
}

/* 面板切换 */
.outlier-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

/* ==================== 词效分析样式 ==================== */
.keyword-stats-info {
    background: rgba(75, 167, 255, 0.1);
    border: 1px solid rgba(75, 167, 255, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text);
}

.keyword-stats-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.keyword-stats-table-wrapper {
    flex: 1;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.keyword-stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.keyword-stats-table th,
.keyword-stats-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.keyword-stats-table th {
    background: var(--panel-2);
    font-weight: 600;
    color: var(--text);
    position: sticky;
    top: 0;
    z-index: 1;
    cursor: help;
}

.keyword-stats-table th:hover {
    background: var(--panel);
}

.keyword-stats-table tr:hover {
    background: rgba(75, 167, 255, 0.05);
}

.keyword-stats-table td {
    color: var(--muted);
}

/* 关键词列 */
.keyword-stats-table td:first-child {
    font-weight: 500;
    color: var(--text);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 状态标签 */
.keyword-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.keyword-status.P0 {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.keyword-status.P1 {
    background: rgba(75, 167, 255, 0.2);
    color: #4ba7ff;
}

.keyword-status.P2 {
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
}

.keyword-status.P3 {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.keyword-status.待验证 {
    background: rgba(250, 204, 21, 0.2);
    color: #facc15;
}

.keyword-status.观察 {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

.keyword-status.冷冻 {
    background: rgba(103, 232, 249, 0.2);
    color: #67e8f9;
}

.keyword-status.污染 {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
}