
.xinyue_container {
    background: #f0f2f8;
}
@media screen and (max-width: 760px) {
    .xinyue_container {
        padding: 15px 18px;
    }
}
/* 移动端悬浮按钮 - 默认隐藏，由JS控制显示(移动端且有选中时显示) */
.mobile-fab {
    position: fixed;
    bottom: 84px;
    right: 20px;
    width: 34px;
    height: 34px;
    border-radius: 28px;
    background: #3b82f6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: none;          /* 默认隐藏 */
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    border: none;
    color: white;
    font-weight: bold;
    font-size: 20px;
}

.mobile-fab:hover {
    transform: scale(1.05);
    background: #2563eb;
}

.fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: bold;
    width: 16px;
    height: 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* 修改移动端适配部分：确保移动端 FAB 容器存在但可见性由 JS 控制 */
@media (max-width: 780px) {
    .mobile-fab {
        display: flex;   /* 保证在移动端flex容器存在, 但可视性由JS控制隐藏/显示 */
    }
}
/* 页面头部 */
.cpu-header {
    margin-bottom: 28px;
}

.cpu-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1d2b5f;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cpu-header h1 span {
    background: linear-gradient(135deg, #6b5cff, #9b7bff);
    padding: 4px 12px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 40px;
    color: white;
    letter-spacing: normal;
}

.cpu-desc {
    color: #5a5e6b;
    margin-top: 8px;
    font-size: 14px;
}

/* 筛选栏 */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    gap: 16px;
}

.filter-chips {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.chip {
    padding: 6px 18px;
    border-radius: 40px;
    background: white;
    border: 1px solid var(--color-third-line);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-second-title);
    cursor: pointer;
    transition: all 0.2s ease;
}

.chip:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: #f5f3ff;
}

.chip.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    box-shadow: 0 4px 8px rgba(107, 92, 255, 0.2);
}

.search-wrapper {
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.search-input {
    width: 300px;
}


/* 右侧对比栏 */
.compare-sidebar {
    width: 340px;
    flex-shrink: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    border: 1px solid #eef2f8;
}

.compare-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px 12px 20px;
    border-bottom: 1px solid #eef2f6;
    background: white;
}

.compare-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-count {
    background: #3b82f6;
    color: white;
    border-radius: 30px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 500;
}

.clear-compare {
    background: none;
    border: none;
    font-size: 13px;
    color: #ef4444;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 40px;
    transition: all 0.2s;
    font-weight: 500;
}

.clear-compare:hover {
    background: #fee2e2;
}

.compare-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 480px;
}

.empty-compare {
    text-align: center;
    padding: 48px 20px;
    color: #94a3b8;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.empty-compare svg {
    opacity: 0.5;
}

.compare-action-btn {
    padding: 10px 20px;
    background: #3b82f6;
    color: white;
    border: none;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
    margin: 12px 16px 18px 16px;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(59,130,246,0.2);
}

.compare-action-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}


/* 对比卡片样式 */
.compare-item {
    background: #f8fafc;
    border-radius: 20px;
    padding: 14px;
    transition: all 0.2s;
    border: 1px solid #eef2f8;
}

.compare-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.cpu-compare-name {
    font-weight: 700;
    font-size: 15px;
    color: #0f172a;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.cpu-compare-name a {
    text-decoration: none;
    color: #0f172a;
    transition: color 0.2s;
}

.cpu-compare-name a:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.brand-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 30px;
    background: #e2e8f0;
    color: #1e293b;
    font-weight: 500;
}

.brand-amd {
    background: #ffedea;
    color: #c2410c;
}

.brand-intel {
    background: #e6f0ff;
    color: #1e40af;
}

.remove-compare-btn {
    background: white;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #94a3b8;
    font-size: 16px;
}

.remove-compare-btn:hover {
    background: #fee2e2;
    color: #ef4444;
}

.compare-spec {
    font-size: 12px;
    color: #475569;
    margin-bottom: 10px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.compare-stats {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    justify-content: space-between;
}

.stat {
    flex: 1;
    background: white;
    border-radius: 16px;
    padding: 6px 4px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.stat-label {
    font-size: 10px;
    color: #64748b;
}

.stat-value {
    font-weight: 700;
    font-size: 15px;
    color: #0f172a;
}

.stat-value.price {
    color: #f97316;
}




.cpu-list-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
}
.cpu-card {
    background: white;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    border: 0px solid transparent;
    border-bottom: 1px solid rgba(189, 189, 206, 0.2);
}
.cpu-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}
.cpu-card.selected {
    background: #f0f9ff;
}
.compare-checkbox {
    width: 22px;
    height: 22px;
    border-radius: 8px;
    border: 2px solid #cbd5e1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    background: white;
}
.compare-checkbox.checked {
    background: #3b82f6;
    border-color: #3b82f6;
}
.compare-checkbox.checked::after {
    content: '✓';
    color: white;
    font-size: 13px;
    font-weight: bold;
}
.cpu-logo {
    width: 76px;
    height: 76px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cpu-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.cpu-info {
    flex: 1;
    min-width: 0;
}
.cpu-name {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.cpu-tag {
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 500;
}
.tag-recommend {
    background: #dcfce7;
    color: #166534;
}
.tag-value {
    background: #fef3c7;
    color: #b45309;
}
.cpu-specs {
    font-size: 13px;
    color: #475569;
    margin-bottom: 8px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.performance-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}
.performance-label {
    font-size: 12px;
    color: #475569;
    width: 40px;
    flex-shrink: 0;
}
.performance-bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}
.performance-fill {
    height: 100%;
    border-radius: 10px;
}
.fill-single {
    background: linear-gradient(90deg, #10b981, #34d399);
    background: #62c597;
}
.fill-multi {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    background: #e67346;
}
.performance-score {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    width: 36px;
    text-align: right;
    flex-shrink: 0;
}
.cpu-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}
.cpu-price {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 40px;
    cursor: pointer;
}
.btn-detail {
    font-size: 12px;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}
.btn-detail:hover {
    text-decoration: underline;
}

@media (max-width: 780px) {
    .compare-layout {
        flex-direction: column;
    }
    .compare-sidebar {
        width: 100%;
        position: static;
        margin-top: 20px;
        max-height: 460px;
    }
}
@media (max-width: 620px) {
    .cpu-list-container {
        gap: 8px;
    }
    .cpu-card {
        flex-wrap: wrap;
        padding: 6px 9px;
        gap: 10px;
        border-radius: 8px;
    }
    .cpu-actions {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        padding-top: 4px;
        border-top: 1px solid #f1f5f9;
    }
    .cpu-logo{
        display: none;
    }
    .cpu-specs {
        font-size: 11px;
        gap: 6px;
    }
    .cpu-price {
        font-size: 12px;
        padding: 2px 12px;
    }
}
