
.xinyue_container {
    background: #f0f2f8;
}

/* 头部导航 */
.compare-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 40px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    transition: 0.2s;
}
.back-btn:active { transform: scale(0.96); background: #f8fafc; }
.title-area h1 {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #1e2a3a, #2d3e50);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.title-area p {
    font-size: 11px;
    color: #5a6e8c;
    margin-top: 4px;
}
.title-area p a {
    color: #5a6e8c;
}
/* 工具栏 - 手机紧凑 */
.toolbar {
    background: white;
    border-radius: 28px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    border: 1px solid #eef2f8;
}
.add-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.add-label {
    font-weight: 600;
    font-size: 13px;
    color: #2d3e50;
}

.add-btn {
    background: #6c5ce7;
    border: none;
    border-radius: 40px;
    padding: 8px 20px;
    color: white;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
}
.reset-btn {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 40px;
    padding: 7px 18px;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
}
.counter-badge {
    background: #eef2ff;
    border-radius: 40px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #6c5ce7;
}

/* 表格外层 - 优化横向滚动 */
.table-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    border-radius: 24px;
    background: white;
    border: 1px solid #eef2f8;
    box-shadow: var(--shadow-card);
    -webkit-overflow-scrolling: touch;
}
.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 440px;
}
.compare-table th, .compare-table td {
    padding: 14px 15px;
    text-align: left;
    border-bottom: 1px solid #eff3f8;
    vertical-align: middle;
    font-size: 14px;
}
.compare-table th {
    background: #fafcff;
    font-weight: 600;
    color: #1e293b;
    font-size: 12px;
    border-bottom: 1px solid #e2e8f0;
}
.compare-table .param-col {
    background-color: #f8fafd;
    font-weight: 600;
    color: #2d3e50;
    width: 120px;
    position: sticky;
    left: 0;
    background: #f8fafd;
    box-shadow: 2px 0 5px -2px rgba(0,0,0,0.03);
    font-size: 14px;
    z-index: 1;
}
.cpu-name-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: wrap;
    position: relative;
}
.cpu-title {
    font-weight: 800;
    font-size: 15px;
    color: #0f172a;
}
.brand-badge {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 30px;
    font-weight: 600;
}
.brand-intel { background: #eef2ff; color: #0066cc; }
.brand-amd { background: #ffece5; color: #d93c00; }
.remove-cpu {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #94a3b8;
    padding: 0 4px;
    transition: 0.2s;
    border-radius: 30px;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.remove-cpu:active {
    background: #fee2e2;
    color: #ef4444;
}

/* ========== 统一高亮样式（修复bug） ========== */
.optimal-badge {
    background: #e0f2fe;
    border-radius: 20px;
    padding: 2px 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    color: #0369a1;
    font-size: 11px;
}
/* 对于普通数值单元格的最优展示 */
.optimal-cell {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.optimal-icon-small {
    font-size: 12px;
}

/* 进度条容器通用 */
.score-progress {
    margin-top: 6px;
    width: 100%;
    min-width: 100px;
    max-width: 170px;
}
.progress-bar-bg {
    background: #e2e8f0;
    border-radius: 20px;
    height: 8px;
    overflow: hidden;
    width: 100%;
}
.progress-fill {
    background: linear-gradient(90deg, #6c5ce7, #a29bfe);
    width: 0%;
    height: 100%;
    border-radius: 20px;
    transition: width 0.2s ease;
}
/* 当进度条对应的分数是最优时，给进度条特殊的颜色 + 外框高亮 */
.progress-best .progress-fill {
    background: linear-gradient(90deg, #0284c7, #38bdf8);
}
.score-value {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    justify-content: space-between;
    max-width: 170px;
}
.best-flag {
    font-size: 11px;
    font-weight: 600;
    background: #e0f2fe;
    border-radius: 16px;
    padding: 0 6px;
    color: #0369a1;
    margin-left: 4px;
}

.empty-state {
    text-align: center;
    padding: 50px 20px;
    background: white;
    border-radius: 28px;
    color: #94a3b8;
}
.empty-state .add-prompt {
    margin-top: 12px;
    font-weight: 500;
    color: #6c5ce7;
}
.footer-note {
    margin-top: 18px;
    text-align: center;
    font-size: 10px;
    color: #8ba0bc;
}
.rank-box {
    padding: 8px;
}
.rank-num {
    font-size: 28px;
    font-weight: 800;
    color: #6c5ce7;
}
.rank-total {
    font-size: 14px;
    color: #8a9bb0;
}
.rank-info {
    margin-top: 1px;
    margin-bottom: 5px;
    font-size: 13px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.score-percent {
    color: #8a9bb0;
}
/* 手机窄屏下进一步优化内边距 */
@media (max-width: 560px) {
    body {
        padding: 12px 10px 30px;
    }
    .compare-table th, .compare-table td {
        padding: 10px 12px;
    }
    .compare-table .param-col {
        width: 85px;
        font-size: 11px;
    }
    .cpu-title {
        font-size: 12px;
        padding-right: 20px;
    }
    .toolbar {
        padding: 10px 14px;
    }
    .add-group {
        gap: 8px;
    }
    .cpu-select {
        min-width: 150px;
        font-size: 12px;
        padding: 6px 12px;
    }
    .add-btn, .reset-btn {
        padding: 6px 14px;
        font-size: 11px;
    }
    .optimal-badge {
        padding: 1px 8px;
    }
    .rank-num {
        font-size: 16px;
    }
    .rank-total {
        font-size: 10px;
    }
    .rank-info {
        font-size: 12px;
    }
    .compare-table td {
        -min-width: 140px;
    }
    .rank-box {
        padding: 8px 0;
        min-width: 120px;
    }
    .remove-cpu {
        position: absolute;
        top: 0px;
        right: 0px;
    }
    .brand-badge {
        display: none;
    }

}

